Error in the UcscTrack() in package "Gviz"
1
0
Entering edit mode
ltzhou • 0
@7b3dc89b
Last seen 4 months ago
United States

Hi,

I have been having trouble of running UcscTrack() in the package "Gviz" to make DMR plot.

My methylation data is using GRCh37/hg19 genome. ( whole blood tissue )

I have been following the online guide of making DMR plot : https://github.com/hansenlab/tutorial.450k/blob/master/vignettes/methylation450k.Rmd

Please see the code I used and the error I got from R as below:


# include your problematic code here with any corresponding output
# please also include the results of running the following in an R session

rTrack <- UcscTrack(genome = genome,
chromosome = chrom,
track = "refGene",
from = minbase,
to = maxbase,
trackType = "GeneRegionTrack",
rstarts = "exonStarts",
rends = "exonEnds",
gene = "name",
symbol = "name2",
transcript = "name",
strand = "strand",
fill = "darkblue",
stacking = "squish",
name = "RefSeq",
showId = TRUE,
geneSymbol = TRUE)


R keeps giving me the error like this:

I would really appreciate it if anyone would love to provide some suggestions or solutions. This is my first time of writing a post here, so sorry about the confusion if there's any.

Thank you very much!

Best, Lucy

DMR Methylation R Gviz • 150 views
1
Entering edit mode
Robert Ivanek ▴ 690
@robert-ivanek-5892
Last seen 4 days ago
Switzerland

Dear Lucy,

In this case the issue is related to the new structure of NCBI Refseq track and new names at the UCSC Genome Browser. I would recommend to check it directly on the UCSC Genome Browser. If you click on the track name below the image, you can explore and set properties for the NCBI RefSeq. The link url of this page tells you the name of the track, now it is called: "refSeqComposite". On the newly opened page you can click on table scheme for your preferred track, i.e. Curated. There you can see that the table is now called "ncbiRefSeqCurated".

Hope that helps.

Best Robert

Based on this you can update your code:

library(Gviz)

genome <- "hg19"
chrom <- "chr1"
minbase <- 65921878
maxbase <- 65980988

rTrack <- UcscTrack(genome=genome,
chromosome = chrom,
track="refSeqComposite",
table="ncbiRefSeqCurated",
from=minbase,
to=maxbase,
trackType="GeneRegionTrack",
rstarts="exonStarts",
rends="exonEnds",
gene="name",
symbol="name2",
strand="strand",
fill="darkblue",
stacking="squish",
name="RefSeq",
showId=TRUE,
geneSymbol=TRUE)

plotTracks(rTrack)