Error in the UcscTrack() in package "Gviz"
2
0
Entering edit mode
ltzhou • 0
@7b3dc89b
Last seen 3.5 years 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:

Error of using UcscTrack()

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 • 1.9k views
ADD COMMENT
1
Entering edit mode
Robert Ivanek ▴ 750
@robert-ivanek-5892
Last seen 11 months 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)

enter image description here

ADD COMMENT
0
Entering edit mode

Hello I have the same problem also with your solution:

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)

Response:

Error in normArgTrack(track, trackids) : Unknown track: refSeqComposite
In addition: Warning message:
In .local(x, ...) :
  'track' parameter is deprecated now you go by the 'table' instead
                Use ucscTables(genome, track) to retrieve the list of tables for a track

SessionInfo:

R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 8

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.12.so;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Rome
tzcode source: system (glibc)

attached base packages:
[1] grid      stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] trackViewer_1.38.0                       org.Hs.eg.db_3.18.0                      EnrichedHeatmap_1.32.0                  
 [4] ComplexHeatmap_2.18.0                    circlize_0.4.15                          data.table_1.14.8                       
 [7] biomaRt_2.58.0                           ChIPseeker_1.38.0                        TxDb.Hsapiens.UCSC.hg38.knownGene_3.18.0
[10] GenomicFeatures_1.54.1                   AnnotationDbi_1.64.1                     BSgenome.Hsapiens.UCSC.hg38_1.4.5       
[13] BSgenome_1.70.1                          BiocIO_1.12.0                            ggplot2_3.4.4                           
[16] rtracklayer_1.62.0                       GenomicAlignments_1.38.0                 Rsamtools_2.18.0                        
[19] Biostrings_2.70.1                        XVector_0.42.0                           SummarizedExperiment_1.32.0             
[22] Biobase_2.62.0                           MatrixGenerics_1.14.0                    matrixStats_1.1.0                       
[25] Gviz_1.46.0                              GenomicRanges_1.54.1                     GenomeInfoDb_1.38.1                     
[28] IRanges_2.36.0                           S4Vectors_0.40.1                         BiocGenerics_0.48.1
ADD REPLY
0
Entering edit mode
Robert Ivanek ▴ 750
@robert-ivanek-5892
Last seen 11 months ago
Switzerland

Hi Davide,

I submitted the fix to both release (1.46.1) and devel versions (1.47.1). It should be propagated within next days. One would have to provide track and table parameters.

Best Robert

ADD COMMENT

Login before adding your answer.

Traffic: 675 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6