Error in `rownames : Gviz plotTracks
0
1
Entering edit mode
gpwhiz ▴ 10
@gpwhiz-19034
Last seen 5.9 years ago

Hello,

I am getting the following errors when using plotTracks in Gviz. here, I am just following examples provided in the vignette https://bioconductor.org/packages/release/bioc/vignettes/Gviz/inst/doc/Gviz.pdf

for plotting Annotation track, I used the following code

> data("cpgIslands")
> atrack <- AnnotationTrack(cpgIslands,name="CpG")
> plotTracks(atrack)
Error in `rownames<-`(`*tmp*`, value = c("1", "10", "2", "3", "4", "5",  : 
  invalid rownames length

I also tried using the GeneRegiontrack and I again I get an error when executing the plotTracks about rownames

> data(geneModels)
> gen <- genome(cpgIslands)
> chr <- as.character(unique(seqnames(cpgIslands)))
> grtrack <- GeneRegionTrack(geneModels, genome=gen,chromosome=chr, name="Gene Model")
> plotTracks(grtrack)
Error in `rownames<-`(`*tmp*`, value = c("ENST00000242109", "ENST00000345317",  : 
  invalid rownames length

I am following the directions from the tutorials, so I am confused as to what mistake i am making here.

Any advice is much appreciated.

gviz plottracks generegiontrack • 1.7k views
ADD COMMENT
0
Entering edit mode

Hi,

I have just checked the code in both release and level versions and it worked for me. Could you please your sessionInfo? 

Best, Robert

 

ADD REPLY
0
Entering edit mode

Hi Robert!

Thank you for your prompt response.

This is my Sessioninfo

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] Gviz_1.26.4                             biovizBase_1.30.1                      
 [3] ggbio_1.30.0                            ggplot2_3.1.0                          
 [5] Homo.sapiens_1.3.1                      TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
 [7] org.Hs.eg.db_3.6.0                      GO.db_3.6.0                            
 [9] OrganismDbi_1.24.0                      GenomicFeatures_1.32.2                 
[11] AnnotationDbi_1.42.1                    Biobase_2.40.0                         
[13] GenomicRanges_1.32.6                    GenomeInfoDb_1.16.0                    
[15] IRanges_2.14.10                         S4Vectors_0.20.1                       
[17] BiocGenerics_0.28.0                    

loaded via a namespace (and not attached):
 [1] ProtGenerics_1.14.0         bitops_1.0-6                matrixStats_0.54.0         
 [4] bit64_0.9-7                 RColorBrewer_1.1-2          progress_1.2.0             
 [7] httr_1.4.0                  tools_3.5.1                 backports_1.1.3            
[10] R6_2.3.0                    rpart_4.1-13                Hmisc_4.1-1                
[13] DBI_1.0.0                   lazyeval_0.2.1              colorspace_1.3-2           
[16] nnet_7.3-12                 withr_2.1.2                 gridExtra_2.3              
[19] prettyunits_1.0.2           GGally_1.4.0                curl_3.2                   
[22] bit_1.1-14                  compiler_3.5.1              graph_1.60.0               
[25] htmlTable_1.12              DelayedArray_0.8.0          rtracklayer_1.40.5         
[28] scales_1.0.0                checkmate_1.8.5             RBGL_1.58.1                
[31] stringr_1.3.1               digest_0.6.18               Rsamtools_1.34.0           
[34] foreign_0.8-70              XVector_0.20.0              dichromat_2.0-0            
[37] base64enc_0.1-3             pkgconfig_2.0.2             htmltools_0.3.6            
[40] ensembldb_2.4.1             BSgenome_1.50.0             htmlwidgets_1.3            
[43] rlang_0.3.0.1               rstudioapi_0.8              RSQLite_2.1.1              
[46] BiocInstaller_1.32.1        BiocParallel_1.16.2         acepack_1.4.1              
[49] VariantAnnotation_1.28.3    RCurl_1.95-4.11             magrittr_1.5               
[52] GenomeInfoDbData_1.2.0      Formula_1.2-3               Matrix_1.2-14              
[55] Rcpp_1.0.0                  munsell_0.5.0               stringi_1.2.4              
[58] yaml_2.2.0                  SummarizedExperiment_1.12.0 zlibbioc_1.28.0            
[61] plyr_1.8.4                  blob_1.1.1                  crayon_1.3.4               
[64] lattice_0.20-35             Biostrings_2.50.1           splines_3.5.1              
[67] hms_0.4.2                   knitr_1.21                  pillar_1.3.1               
[70] reshape2_1.4.3              biomaRt_2.38.0              XML_3.98-1.16              
[73] latticeExtra_0.6-28         data.table_1.11.8           BiocManager_1.30.4         
[76] gtable_0.2.0                reshape_0.8.8               assertthat_0.2.0           
[79] xfun_0.4                    AnnotationFilter_1.4.0      survival_2.42-3            
[82] tibble_1.4.2                GenomicAlignments_1.18.0    memoise_1.1.0              
[85] cluster_2.0.7-1  

 

Thank you so much for helping me!!

ADD REPLY
0
Entering edit mode

Hi,

I also tried the traceback, but I don't understand the problem

plotTracks(list(gtrack,atrack))
Error in `rownames<-`(`*tmp*`, value = c("1", "10", "2", "3", "4", "5",  : 
  invalid rownames length
>  traceback()
27: stop("invalid rownames length")
26: `rownames<-`(`*tmp*`, value = c("1", "10", "2", "3", "4", "5", 
    "6", "7", "8", "9"))
25: `rownames<-`(`*tmp*`, value = c("1", "10", "2", "3", "4", "5", 
    "6", "7", "8", "9"))
24: .local(x, use.names, ...)
23: elementMetadata(x, use.names = use.names, ...)
22: elementMetadata(x, use.names = use.names, ...)
21: mcols(x)
20: mcols(x)
19: .reconcileMetadatacols(ans)
18: newCompressedList0(ans_class, flesh, skeleton)
17: relist(x, f)
16: relist(x, f)
15: .splitAsList_by_factor(x, f, drop)
14: splitAsList_default(x, f, drop = drop)
13: .local(x, f, drop, ...)
12: IRanges::splitAsList(x, f, drop = drop)
11: IRanges::splitAsList(x, f, drop = drop)
10: .local(x, f, drop, ...)
9: split(ranges(x), group(x))
8: split(ranges(x), group(x))
7: unlist(range(split(ranges(x), group(x))))
6: .local(x, ...)
5: FUN(X[[i]], ...)
4: FUN(X[[i]], ...)
3: lapply(trackList, subset, from = ranges["from"], to = ranges["to"], 
       chromosome = chromosome)
2: lapply(trackList, subset, from = ranges["from"], to = ranges["to"], 
       chromosome = chromosome)
1: plotTracks(list(gtrack, atrack))
ADD REPLY
0
Entering edit mode

I have just checked your sessionInfo and realised that you have a picture of packages from current release and some older ones, for example: GenomicRanges, GenomicFeatures, Biobase and few others. Can you please update your packages and try again? 

Best

Robert

ADD REPLY

Login before adding your answer.

Traffic: 700 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