ivanek / Gviz

This is the Gviz development repository. Gviz plots data and annotation information along genomic coordinates.
https://bioconductor.org/packages/Gviz/
Artistic License 2.0
75 stars 10 forks source link

The direction of a single exon gene #93

Open rejo27 opened 2 months ago

rejo27 commented 2 months ago

Dear Gviz team: I have a small question about drawing gene tracks. If the gene I want to draw has only one exon (no introns), how can I know its direction?

For example, gene1-4 in the figure. Looking forward to your reply.

ivanek commented 2 months ago

Hi @rejo27 ,

Essentially you can follow the vignette:

plotTracks(grtrack, collapseTranscripts = TRUE, shape = "arrow", 
           transcriptAnnotation = "symbol")

or

plotTracks(grtrack, collapseTranscripts = "meta", shape = "arrow", 
           transcriptAnnotation = "symbol")

Hope that helps.

rejo27 commented 2 months ago

Dear Gviz team: Thanks for your reply! I tried your suggestion and got the final gene structure. Although I can get the direction of a single exon gene, it loses the UTR information (gene2 track). I also tried to modify the code, but it seems that there is an arrow for each exon (gene3), which is not ideal. I want to achieve the effect of only displaying the arrow on the last exon without losing the UTR information, that is, the effect in the red box. Do you think such information can be achieved? test1

Looking forward to your reply.