Gviz::IdeogramTrack() with chrM does not work
2
0
Entering edit mode
Robert Castelo ★ 3.2k
@rcastelo
Last seen 3 days ago
Barcelona/Universitat Pompeu Fabra

hi,

I would like to use Gviz with the mitochondrial chromosome chrM but I get the following error when calling IdeogramTrack():

library(Gviz)

itrack <- IdeogramTrack(genome="hg19", chromosome="chrM")
Error in .normargSeqlevels(seqnames) :
  supplied 'seqlevels' cannot contain NAs or empty strings ("")

traceback()
10: stop(errmsg)
9: .normargSeqlevels(seqnames)
8: Seqinfo(names(seqlengths), seqlengths)
7: newGRanges("GRanges", seqnames = seqnames, ranges = ranges, strand = strand,
       mcols = DataFrame(...), seqlengths = seqlengths, seqinfo = seqinfo)
6: GRanges(seqnames = bnames, range = IRanges(start = bands$chromStart,
       end = bands$chromEnd), name = bnames, type = as.character(bands$gieStain))
5: .local(.Object, ...)
4: initialize(value, ...)
3: initialize(value, ...)
2: new("IdeogramTrack", chromosome = chromosome, genome = genome,
       name = name, bands = bands, ...)
1: IdeogramTrack(genome = "hg19", chromosome = "chrM")

The error seems a bit cryptic so I guess that rather than a limiting feature this may be something related to a malformation of the underlying GRanges object.

thanks in advance!

robert.

sessionInfo()
R version 3.1.1 Patched (2014-10-13 r66751)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF8       LC_NUMERIC=C             
 [3] LC_TIME=en_US.UTF8        LC_COLLATE=en_US.UTF8    
 [5] LC_MONETARY=en_US.UTF8    LC_MESSAGES=en_US.UTF8   
 [7] LC_PAPER=en_US.UTF8       LC_NAME=C                
 [9] LC_ADDRESS=C              LC_TELEPHONE=C           
[11] LC_MEASUREMENT=en_US.UTF8 LC_IDENTIFICATION=C      

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

other attached packages:
 [1] Gviz_1.10.9          GenomicRanges_1.18.4
 [3] GenomeInfoDb_1.2.4   IRanges_2.0.1       
 [5] S4Vectors_0.4.0      BiocGenerics_0.12.1
 [7] BiocInstaller_1.16.1 vimcom_1.0-0        
 [9] setwidth_1.0-3       colorout_1.0-3      

loaded via a namespace (and not attached):
 [1] acepack_1.3-3.3          AnnotationDbi_1.28.1    
 [3] base64enc_0.1-2          BatchJobs_1.5           
 [5] BBmisc_1.9               Biobase_2.26.0          
 [7] BiocParallel_1.0.3       biomaRt_2.22.0          
 [9] Biostrings_2.34.1        biovizBase_1.14.1       
[11] bitops_1.0-6             brew_1.0-6              
[13] BSgenome_1.34.1          checkmate_1.5.1         
[15] cluster_2.0.1            codetools_0.2-10        
[17] colorspace_1.2-4         DBI_0.3.1               
[19] dichromat_2.0-0          digest_0.6.8            
[21] fail_1.2                 foreach_1.4.2           
[23] foreign_0.8-63           Formula_1.2-0           
[25] GenomicAlignments_1.2.1  GenomicFeatures_1.18.3  
[27] ggplot2_1.0.0            gtable_0.1.2            
[29] Hmisc_3.15-0             iterators_1.0.7         
[31] lattice_0.20-30          latticeExtra_0.6-26     
[33] MASS_7.3-39              matrixStats_0.14.0      
[35] munsell_0.4.2            nnet_7.3-9              
[37] plyr_1.8.1               proto_0.3-10            
[39] RColorBrewer_1.1-2       Rcpp_0.11.4             
[41] RCurl_1.95-4.5           reshape2_1.4.1          
[43] rpart_4.1-9              Rsamtools_1.18.2        
[45] RSQLite_1.0.0            rtracklayer_1.26.2      
[47] scales_0.2.4             sendmailR_1.2-1         
[49] splines_3.1.1            stringr_0.6.2           
[51] survival_2.37-7          tools_3.1.1             
[53] VariantAnnotation_1.12.9 XML_3.98-1.1            
[55] XVector_0.6.0            zlibbioc_1.12.0         
Gviz chrM • 1.8k views
ADD COMMENT
2
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 5.6 years ago
Switzerland

Should be fixed in  version 1.10.10

ADD COMMENT
0
Entering edit mode

Great!! thanks for the quick fix!

robert.

ADD REPLY
1
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 5.6 years ago
Switzerland

Hi Robert,

yes, the 'name' column of the bands information for the mitochondrial chromosome is an empty string, and GRanges chokes on that:

Browse[3]> bands
    chrom chromStart chromEnd name gieStain
455  chrM          0    16571          gneg

I will commit a fix to this soon. Thanks for reporting.

Florian

ADD COMMENT

Login before adding your answer.

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