Error in .order_seqlevels(chrom_sizes[, "chrom"]) : !anyNA(m31) is not TRUE
1
1
Entering edit mode
jason.ossart ▴ 10
@4c6c6c58
Last seen 2.8 years ago
United States

Hi,

I am trying to re-run an analysis that was running fine last week on Seurat V4. There is now an error message that seems to be due to GenomeInfoDb. Do you know if there was an update or something that could explain this error ? Thanks

In:

grange.counts <- StringToGRanges(rownames(atac_counts), sep = c(":", "-"))
grange.use <- seqnames(grange.counts) %in% standardChromosomes(grange.counts)
atac_counts <- atac_counts[as.vector(grange.use), ]
annotations <- GetGRangesFromEnsDb(ensdb = EnsDb.Mmusculus.v79)
seqlevelsStyle(annotations) <- 'UCSC'
genome(annotations) <- "mm10"

# More specifically here #

# seqlevelsStyle(annotations) <- 'UCSC'
# Error in .order_seqlevels(chrom_sizes[, "chrom"]) : 
  !anyNA(m31) is not TRUE



sessionInfo( )
> sessionInfo( )
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

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

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

other attached packages:
 [1] patchwork_1.1.1            SeuratDisk_0.0.0.9019      ggplot2_3.3.5              dplyr_1.0.7                EnsDb.Mmusculus.v79_2.99.0 ensembldb_2.17.0           AnnotationFilter_1.17.0    GenomicFeatures_1.45.0     AnnotationDbi_1.55.1      
[10] Biobase_2.53.0             GenomicRanges_1.45.0       GenomeInfoDb_1.29.2        IRanges_2.27.0             S4Vectors_0.31.0           BiocGenerics_0.39.1        Signac_1.2.1               SeuratObject_4.0.2         Seurat_4.0.3              

loaded via a namespace (and not attached):
  [1] utf8_1.2.1                  reticulate_1.20             tidyselect_1.1.1            RSQLite_2.2.7               htmlwidgets_1.5.3           grid_4.1.0                  docopt_0.7.1                BiocParallel_1.27.0        
  [9] Rtsne_0.15                  munsell_0.5.0               codetools_0.2-18            ica_1.0-2                   future_1.21.0               miniUI_0.1.1.1              withr_2.4.2                 colorspace_2.0-2           
 [17] filelock_1.0.2              knitr_1.33                  rstudioapi_0.13             ROCR_1.0-11                 tensor_1.5                  listenv_0.8.0               MatrixGenerics_1.5.0        slam_0.1-48                
 [25] GenomeInfoDbData_1.2.6      polyclip_1.10-0             bit64_4.0.5                 farver_2.1.0                parallelly_1.26.0           vctrs_0.3.8                 generics_0.1.0              xfun_0.24                  
 [33] biovizBase_1.41.0           BiocFileCache_2.1.1         lsa_0.73.2                  ggseqlogo_0.1               R6_2.5.0                    hdf5r_1.3.3                 bitops_1.0-7                spatstat.utils_2.2-0       
 [41] cachem_1.0.5                DelayedArray_0.19.1         assertthat_0.2.1            promises_1.2.0.1            BiocIO_1.3.0                scales_1.1.1                nnet_7.3-16                 gtable_0.3.0               
 [49] globals_0.14.0              goftest_1.2-2               rlang_0.4.11                RcppRoll_0.3.0              splines_4.1.0               rtracklayer_1.53.0          lazyeval_0.2.2              dichromat_2.0-0            
 [57] checkmate_2.0.0             spatstat.geom_2.2-0         BiocManager_1.30.16         yaml_2.2.1                  reshape2_1.4.4              abind_1.4-5                 backports_1.2.1             httpuv_1.6.1               
 [65] Hmisc_4.5-0                 tools_4.1.0                 ellipsis_0.3.2              spatstat.core_2.2-0         RColorBrewer_1.1-2          ggridges_0.5.3              Rcpp_1.0.6                  plyr_1.8.6                 
 [73] base64enc_0.1-3             progress_1.2.2              zlibbioc_1.39.0             purrr_0.3.4                 RCurl_1.98-1.3              prettyunits_1.1.1           rpart_4.1-15                deldir_0.2-10              
 [81] pbapply_1.4-3               cowplot_1.1.1               zoo_1.8-9                   SummarizedExperiment_1.23.1 ggrepel_0.9.1               cluster_2.1.2               magrittr_2.0.1              data.table_1.14.0          
 [89] scattermore_0.7             lmtest_0.9-38               RANN_2.6.1                  SnowballC_0.7.0             ProtGenerics_1.25.0         fitdistrplus_1.1-5          matrixStats_0.59.0          hms_1.1.0                  
 [97] mime_0.11                   xtable_1.8-4                XML_3.99-0.6                jpeg_0.1-8.1                sparsesvd_0.2               gridExtra_2.3               compiler_4.1.0              biomaRt_2.49.1             
[105] tibble_3.1.2                KernSmooth_2.23-20          crayon_1.4.1                htmltools_0.5.1.1           mgcv_1.8-36                 later_1.2.0                 Formula_1.2-4               tidyr_1.1.3                
[113] DBI_1.1.1                   tweenr_1.0.2                dbplyr_2.1.1                MASS_7.3-54                 rappdirs_0.3.3              Matrix_1.3-4                cli_2.5.0                   parallel_4.1.0             
[121] igraph_1.2.6                pkgconfig_2.0.3             GenomicAlignments_1.29.0    foreign_0.8-81              plotly_4.9.4.1              spatstat.sparse_2.0-0       xml2_1.3.2                  XVector_0.33.0             
[129] VariantAnnotation_1.39.0    stringr_1.4.0               digest_0.6.27               sctransform_0.3.2           RcppAnnoy_0.0.18            spatstat.data_2.1-0         Biostrings_2.61.1           leiden_0.3.8               
[137] fastmatch_1.1-0             htmlTable_2.2.1             uwot_0.1.10                 restfulr_0.0.13             curl_4.3.2                  shiny_1.6.0                 Rsamtools_2.9.1             rjson_0.2.20               
[145] lifecycle_1.0.0             nlme_3.1-152                jsonlite_1.7.2              BSgenome_1.61.0             viridisLite_0.4.0           fansi_0.5.0                 pillar_1.6.1                lattice_0.20-44            
[153] KEGGREST_1.33.0             fastmap_1.1.0               httr_1.4.2                  survival_3.2-11             glue_1.4.2                  qlcMatrix_0.9.7             png_0.1-7                   bit_4.0.4                  
[161] ggforce_0.3.3               stringi_1.6.2               blob_1.2.1                  latticeExtra_0.6-29         memoise_2.0.0               irlba_2.3.3                 future.apply_1.7.0
GenomeInfoDb • 3.6k views
ADD COMMENT
0
Entering edit mode

I'm seeing the same error when running

genomeInfoDb::getChromInfoFromUCSC("mm10")

The UCSC table is downloaded from http://hgdownload.cse.ucsc.edu/goldenPath/mm10/database/chromInfo.txt.gz The table contains the row:

chrna_GL456050_alt      142341  /gbdb/mm10/mm10.2bit

The mm10.R file supplied by the GenomeInfoDb package expects that all lines that have there underscore-separated components in the first column will start with a "real" chromosome name such as "chr1", "chrX", etc. This "chrna" breaks this expectation and the parsing fails. It might be better to parse the file yourself and generate the seqinfo object "by hand".

ADD REPLY
2
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

This is a known issue and has been fixed. Please update your GenomeInfoDb package.

> head(getChromInfoFromUCSC("mm10"))
  chrom      size assembled circular
1  chr1 195471971      TRUE    FALSE
2  chr2 182113224      TRUE    FALSE
3  chr3 160039680      TRUE    FALSE
4  chr4 156508116      TRUE    FALSE
5  chr5 151834684      TRUE    FALSE
6  chr6 149736546      TRUE    FALSE
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

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

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

other attached packages:
[1] GenomeInfoDb_1.28.1 IRanges_2.26.0      S4Vectors_0.30.0   
[4] BiocGenerics_0.38.0 BiocManager_1.30.15

loaded via a namespace (and not attached):
[1] compiler_4.1.0         tools_4.1.0            GenomeInfoDbData_1.2.6
[4] RCurl_1.98-1.3         bitops_1.0-7
ADD COMMENT

Login before adding your answer.

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