Question: Nice plot of gene region (plotTracks function)
0
gravatar for Adam
2.2 years ago by
Adam0
Poland
Adam0 wrote:

Hello

I trying to make a nice plot such as in here:

https://bioconductor.org/packages/release/bioc/vignettes/Gviz/inst/doc/Gviz.pdf

I mean, chromosome at the top and gene (I need only one gene) below, exons presetned as blocks and introns as line with arrows.

My plot looks like this:

 

and my code:

library(org.Hs.eg.db)
eid <- select(org.Hs.eg.db, "GNG7", "ENTREZID", "SYMBOL")[["ENTREZID"]]
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
txid <- select(txdb, eid, "TXNAME", "GENEID")[["TXNAME"]]
exons <- exonsBy(txdb, by="tx", use.names=TRUE)
gng7exons <- exons[names(exons) %in% txid]
gng7exons[[1]]
anno <- AnnotationTrack(gng7exons)
plotTracks(list(gtrack,itrack,anno), from = 2645916, to = 2646703, cex = 0.8)

 

It is even possible to add SNP's, cpg islands, etc to this plot? Summarizing, I'm looking for something like in UCSC and I have no idea how to get it...

gviz granges plottracks • 502 views
ADD COMMENTlink modified 2.2 years ago • written 2.2 years ago by Adam0

There are dozens of plots in the Gviz User's Guide, so pointing to the entire document as an example isn't particularly helpful. In addition, the code to generate all the plots in that guide are there as well, so if you like a particular plot, is it not possible to emulate the accompanying code?

There are also examples of adding CpG islands and SNPs, along with the code to do that. Is there something in particular about the guide that you don't understand?

ADD REPLYlink written 2.2 years ago by James W. MacDonald49k

I get what I want finally, but I won't put it here. This page isn't for help others, is it?

ADD REPLYlink written 2.2 years ago by Adam0

Of course it is. Actually, that is is the main purpose of this forum...

ADD REPLYlink written 2.2 years ago by florian.hahne@novartis.com1.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 261 users visited in the last hour