Hi @komalsrathi, currently it is not possible with ggsashimi to annotate the gene name/exon number, but we will take into account your suggestion for future developments. Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I had a similar demand. I needed to show the "transcript_name" instead of "ensembl_transcript_id" from each transcript in the GTF plot. What I did was alter lines 291 and 293 of the original code from:
"try:
transcript_id = re.findall('transcript_id ("[^"]+")', tags)[0]
except KeyError:
print("ERROR: 'transcript_id' attribute is missing in the GTF file.")
exit(1)
"
to:
"try:
transcript_id = re.findall('transcript_name ("[^"]+")', tags)[0]
except KeyError:
print("ERROR: 'transcript_name' attribute is missing in the GTF file.")
exit(1)
"
Maybe if you do the same you'll have at least an indication of the gene you are plotting without the need to add anything else to the plot later!
Thanks @luxeredias, that is indeed a possibility for alternative transcript names. With respect to gene names, as pointed out originally by @komalsrathi and @PedroBarbosa, the point is where to add the gene name. For instance, when plotting a region that contains several genes it can be difficult to place the gene label in the right place. Suggestions and PR's are wellcome! As for exon numbers, I think they could be added relatively straigthforward if users are interested.
Hi @dgarrimar,
I just wanted to say I would be super interested in having exon numbers in the annotation as well. I think it would be a great addition, not least because no other tools offer that feature so far, to the best of my knowledge
Activity
dgarrimar commentedon Sep 25, 2019
Hi @komalsrathi, currently it is not possible with ggsashimi to annotate the gene name/exon number, but we will take into account your suggestion for future developments. Thanks!
PedroBarbosa commentedon Dec 18, 2019
I would like to reopen this issue just to highlight how useful and important this feature would be.
Best,
Pedro
stale commentedon Jan 21, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
luxeredias commentedon Feb 10, 2021
I had a similar demand. I needed to show the "transcript_name" instead of "ensembl_transcript_id" from each transcript in the GTF plot. What I did was alter lines 291 and 293 of the original code from:
"try:
transcript_id = re.findall('transcript_id ("[^"]+")', tags)[0]
except KeyError:
print("ERROR: 'transcript_id' attribute is missing in the GTF file.")
exit(1)
"
to:
"try:
transcript_id = re.findall('transcript_name ("[^"]+")', tags)[0]
except KeyError:
print("ERROR: 'transcript_name' attribute is missing in the GTF file.")
exit(1)
"
Maybe if you do the same you'll have at least an indication of the gene you are plotting without the need to add anything else to the plot later!
dgarrimar commentedon Feb 10, 2021
Thanks @luxeredias, that is indeed a possibility for alternative transcript names. With respect to gene names, as pointed out originally by @komalsrathi and @PedroBarbosa, the point is where to add the gene name. For instance, when plotting a region that contains several genes it can be difficult to place the gene label in the right place. Suggestions and PR's are wellcome! As for exon numbers, I think they could be added relatively straigthforward if users are interested.
bdgsilva commentedon Nov 21, 2022
Hi @dgarrimar,
I just wanted to say I would be super interested in having exon numbers in the annotation as well. I think it would be a great addition, not least because no other tools offer that feature so far, to the best of my knowledge
FilipeFerreiraMOCHSL commentedon Aug 28, 2025
Thank you for this nice tool! Super easy to use.
I'd also love to see this feature in future versions, it'd help a lot and make this tool even more elegant. Currently I'm just editing it in Inkscape.