Skip to content

Error in .order_seqlevels(chrom_sizes[, "chrom"]) : !anyNA(m31) is not TRUE #687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
qlan20 opened this issue Jun 28, 2021 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@qlan20
Copy link

qlan20 commented Jun 28, 2021

Dear Tim,
An error occured with CreateChromatinAssay and seqlevels when I was trying out the vignette on SNARE-seq. I was wondering whether there's any setting issues? (good with vignette on 10x Multiomics) Thanks!

snare[['ATAC']] <- CreateChromatinAssay(
+   counts = atac,
+   sep = c(":", "-"),
+   genome = "mm10",
+   fragments = fragments
+ )

or

seqlevelsStyle(annotations) <- 'UCSC'

The error:

 Error in .order_seqlevels(chrom_sizes[, "chrom"]) : 
  !anyNA(m31) is not TRUE 
17.
stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p))) 
16.
stopifnot(!anyNA(m31)) at mm10.R#24
15.
.order_seqlevels(chrom_sizes[, "chrom"]) at mm10.R#42
14.
GET_CHROM_SIZES(goldenPath.url = goldenPath.url) 
13.
.get_chrom_info_for_registered_UCSC_genome(script_path, assembled.molecules.only = assembled.molecules.only, 
    map.NCBI = map.NCBI, add.ensembl.col = add.ensembl.col, goldenPath.url = goldenPath.url, 
    recache = recache) 
12.
getChromInfoFromUCSC(new_genome, map.NCBI = TRUE) 
11.
(function (seqlevels, genome, new_style) 
{
    ans <- DataFrame(seqlevels = seqlevels, genome = genome)
    if (is.na(genome) || !(new_style %in% c("NCBI", "RefSeq",  ... 
10.
mapply(FUN = FUN, ..., MoreArgs = MoreArgs, SIMPLIFY = SIMPLIFY, 
    USE.NAMES = USE.NAMES) 
9.
eval(mc, env) 
8.
eval(mc, env) 
7.
eval(mc, env) 
6.
standardGeneric("mapply") 
5.
mapply(.set_seqlevelsStyle_from_seqlevels_and_genome, genome2seqlevels, 
    names(genome2seqlevels), MoreArgs = list(value), SIMPLIFY = FALSE, 
    USE.NAMES = FALSE) 
4.
`seqlevelsStyle<-`(`*tmp*`, value = value) 
3.
`seqlevelsStyle<-`(`*tmp*`, value = value) 
2.
`seqlevelsStyle<-`(`*tmp*`, value = "UCSC") 
1.
`seqlevelsStyle<-`(`*tmp*`, value = "UCSC") 

The sessionInfo()

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

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    
system code page: 65001

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

other attached packages:
 [1] EnsDb.Mmusculus.v79_2.99.0       
 [2] ggplot2_3.3.5                    
 [3] BSgenome.Hsapiens.UCSC.hg38_1.4.3
 [4] BSgenome_1.58.0                  
 [5] rtracklayer_1.49.5               
 [6] Biostrings_2.58.0                
 [7] XVector_0.30.0                   
 [8] EnsDb.Hsapiens.v86_2.99.0        
 [9] ensembldb_2.14.1                 
[10] AnnotationFilter_1.14.0          
[11] GenomicFeatures_1.42.3           
[12] AnnotationDbi_1.52.0             
[13] Biobase_2.50.0                   
[14] Seurat_4.0.2                     
[15] Signac_1.2.1                     
[16] SeuratObject_4.0.1               
[17] Matrix_1.3-4                     
[18] GenomicRanges_1.42.0             
[19] GenomeInfoDb_1.26.7              
[20] IRanges_2.24.1                   
[21] S4Vectors_0.28.1                 
[22] BiocGenerics_0.36.1              

loaded via a namespace (and not attached):
  [1] utf8_1.2.1                 
  [2] reticulate_1.20            
  [3] tidyselect_1.1.1           
  [4] RSQLite_2.2.7              
  [5] htmlwidgets_1.5.3          
  [6] grid_4.0.3                 
  [7] docopt_0.7.1               
  [8] BiocParallel_1.24.1        
  [9] Rtsne_0.15                 
 [10] devtools_2.4.2             
 [11] munsell_0.5.0              
 [12] codetools_0.2-16           
 [13] ica_1.0-2                  
 [14] future_1.21.0              
 [15] miniUI_0.1.1.1             
 [16] withr_2.4.2                
 [17] colorspace_2.0-1           
 [18] knitr_1.33                 
 [19] rstudioapi_0.13            
 [20] ROCR_1.0-11                
 [21] tensor_1.5                 
 [22] listenv_0.8.0              
 [23] MatrixGenerics_1.2.1       
 [24] slam_0.1-48                
 [25] GenomeInfoDbData_1.2.4     
 [26] polyclip_1.10-0            
 [27] bit64_4.0.5                
 [28] farver_2.1.0               
 [29] rprojroot_2.0.2            
 [30] parallelly_1.26.0          
 [31] vctrs_0.3.8                
 [32] generics_0.1.0             
 [33] xfun_0.24                  
 [34] biovizBase_1.38.0          
 [35] BiocFileCache_1.14.0       
 [36] lsa_0.73.2                 
 [37] ggseqlogo_0.1              
 [38] R6_2.5.0                   
 [39] DelayedArray_0.16.3        
 [40] bitops_1.0-7               
 [41] spatstat.utils_2.1-0       
 [42] cachem_1.0.5               
 [43] assertthat_0.2.1           
 [44] promises_1.2.0.1           
 [45] scales_1.1.1               
 [46] nnet_7.3-14                
 [47] gtable_0.3.0               
 [48] globals_0.14.0             
 [49] processx_3.5.2             
 [50] goftest_1.2-2              
 [51] rlang_0.4.11               
 [52] RcppRoll_0.3.0             
 [53] splines_4.0.3              
 [54] lazyeval_0.2.2             
 [55] dichromat_2.0-0            
 [56] checkmate_2.0.0            
 [57] spatstat.geom_2.1-0        
 [58] reshape2_1.4.4             
 [59] abind_1.4-5                
 [60] backports_1.2.1            
 [61] httpuv_1.6.1               
 [62] Hmisc_4.5-0                
 [63] tools_4.0.3                
 [64] usethis_2.0.1              
 [65] ellipsis_0.3.2             
 [66] spatstat.core_2.1-2        
 [67] RColorBrewer_1.1-2         
 [68] sessioninfo_1.1.1          
 [69] ggridges_0.5.3             
 [70] Rcpp_1.0.6                 
 [71] plyr_1.8.6                 
 [72] base64enc_0.1-3            
 [73] progress_1.2.2             
 [74] zlibbioc_1.36.0            
 [75] purrr_0.3.4                
 [76] RCurl_1.98-1.3             
 [77] ps_1.6.0                   
 [78] prettyunits_1.1.1          
 [79] rpart_4.1-15               
 [80] openssl_1.4.4              
 [81] deldir_0.2-10              
 [82] pbapply_1.4-3              
 [83] cowplot_1.1.1              
 [84] zoo_1.8-9                  
 [85] SummarizedExperiment_1.20.0
 [86] ggrepel_0.9.1              
 [87] cluster_2.1.0              
 [88] fs_1.5.0                   
 [89] magrittr_2.0.1             
 [90] data.table_1.14.0          
 [91] scattermore_0.7            
 [92] lmtest_0.9-38              
 [93] RANN_2.6.1                 
 [94] SnowballC_0.7.0            
 [95] ProtGenerics_1.22.0        
 [96] fitdistrplus_1.1-5         
 [97] matrixStats_0.59.0         
 [98] pkgload_1.2.1              
 [99] hms_1.1.0                  
[100] patchwork_1.1.1            
[101] mime_0.10                  
[102] xtable_1.8-4               
[103] XML_3.99-0.6               
[104] jpeg_0.1-8.1               
[105] sparsesvd_0.2              
[106] gridExtra_2.3              
[107] testthat_3.0.3             
[108] compiler_4.0.3             
[109] biomaRt_2.46.3             
[110] tibble_3.1.2               
[111] KernSmooth_2.23-17         
[112] crayon_1.4.1               
[113] htmltools_0.5.1.1          
[114] mgcv_1.8-33                
[115] later_1.2.0                
[116] Formula_1.2-4              
[117] tidyr_1.1.3                
[118] DBI_1.1.1                  
[119] tweenr_1.0.2               
[120] dbplyr_2.1.1               
[121] rappdirs_0.3.3             
[122] MASS_7.3-53                
[123] cli_2.5.0                  
[124] igraph_1.2.6               
[125] pkgconfig_2.0.3            
[126] GenomicAlignments_1.26.0   
[127] foreign_0.8-80             
[128] plotly_4.9.4.1             
[129] spatstat.sparse_2.0-0      
[130] xml2_1.3.2                 
[131] VariantAnnotation_1.36.0   
[132] stringr_1.4.0              
[133] callr_3.7.0                
[134] digest_0.6.27              
[135] sctransform_0.3.2          
[136] RcppAnnoy_0.0.18           
[137] spatstat.data_2.1-0        
[138] leiden_0.3.8               
[139] fastmatch_1.1-0            
[140] htmlTable_2.2.1            
[141] uwot_0.1.10                
[142] curl_4.3.1                 
[143] shiny_1.6.0                
[144] Rsamtools_2.6.0            
[145] lifecycle_1.0.0            
[146] nlme_3.1-149               
[147] jsonlite_1.7.2             
[148] desc_1.3.0                 
[149] viridisLite_0.4.0          
[150] askpass_1.1                
[151] fansi_0.5.0                
[152] pillar_1.6.1               
[153] lattice_0.20-41            
[154] fastmap_1.1.0              
[155] httr_1.4.2                 
[156] pkgbuild_1.2.0             
[157] survival_3.2-7             
[158] glue_1.4.2                 
[159] remotes_2.4.0              
[160] qlcMatrix_0.9.7            
[161] png_0.1-7                  
[162] bit_4.0.4                  
[163] ggforce_0.3.3              
[164] stringi_1.5.3              
[165] blob_1.2.1                 
[166] latticeExtra_0.6-29        
[167] memoise_2.0.0              
[168] dplyr_1.0.6                
[169] irlba_2.3.3                
[170] future.apply_1.7.0   
@qlan20 qlan20 added the bug Something isn't working label Jun 28, 2021
@timoast
Copy link
Collaborator

timoast commented Jun 28, 2021

This appears to be an issue with GenomeInfoDb rather than Signac, the following also fails:

library(EnsDb.Mmusculus.v79)
library(GenomeInfoDb)
annotations <- genes(EnsDb.Mmusculus.v79)
seqlevelsStyle(annotations) <- 'UCSC'

Please raise an issue on the bioconductor support forum instead

@timoast
Copy link
Collaborator

timoast commented Jun 30, 2021

Linking to the GenomeInfoDb issue: Bioconductor/GenomeInfoDb#27

@Dragonmasterx87
Copy link

Dragonmasterx87 commented Feb 8, 2023

Just an update, I ran into this issue as well. The solution was updating GenomeInfoDb using remotes. Somehow the version on CRAN still has issues.

# First remove old version
remove.packages("BiocManager", lib=.libPaths("PATH_to_your_library_containing_GenomeInfoDb"))
BiocManager::valid("GenomeInfoDb") # This should throw an error if not repeat the remove.packages step

# Install the version that works as of 2/8/2023
remotes::install_github("Bioconductor/GenomeInfoDb")
BiocManager::valid("GenomeInfoDb") 
packageVersion("genomeInfoDb") # as of 02/08/2022 should show v1.35.15

Doing BiocManager::install("GenomeInfoDb") doesn't work.

Note to my future self:
I told you to annotate solutions in your script, now look at you looking for solutions to problems you already resolved. Fool.

@cmiciano
Copy link

thank you @Dragonmasterx87 for the helpful solution, i was able to get seqlevelsStyle(annotations) <- 'UCSC'
working again after updating GenomeInfoDb with the remotes version you provided.

@JohnWang1997
Copy link

thank you, @Dragonmasterx87 , the solution solved the issue that GenomeInfoDb (>=1.34.8) cannot be installed through BiocManager (3.14) in R (4.1.2).

@Dragonmasterx87
Copy link

Cheers guys glad it worked.

@linkous123
Copy link

Cheers guys glad it worked.

Just an update, I ran into this issue as well. The solution was updating GenomeInfoDb using remotes. Somehow the version on CRAN still has issues.

# First remove old version
remove.packages("BiocManager", lib=.libPaths("PATH_to_your_library_containing_GenomeInfoDb"))
BiocManager::valid("GenomeInfoDb") # This should throw an error if not repeat the remove.packages step

# Install the version that works as of 2/8/2023
remotes::install_github("Bioconductor/GenomeInfoDb")
BiocManager::valid("GenomeInfoDb") 
packageVersion("genomeInfoDb") # as of 02/08/2022 should show v1.35.15

Doing BiocManager::install("GenomeInfoDb") doesn't work.

Note to my future self: I told you to annotate solutions in your script, now look at you looking for solutions to problems you already resolved. Fool.

hi, I follow your method to install GenomeInfoDb==1.35.15, it thorw another error, have you some ideas? thinks!

my code :
library(Seurat)
library(Signac)
library(EnsDb.Hsapiens.v86)
library(BSgenome.Hsapiens.UCSC.hg38)
library(future)
library(ggplot2)
library(patchwork)

annot <- GetGRangesFromEnsDb(EnsDb.Hsapiens.v86)
seqlevelsStyle(annot) <- "UCSC"

the return:

seqlevelsStyle(annot) <- "UCSC"
Error in stop_if(is.null(NCBI_assembly_info), ""assembly_accession" field in 'NCBI_LINKER' must ", :
Error in UCSC genome registration file 'canFam6.R':
"assembly_accession" field in 'NCBI_LINKER' must be associated with a registered NCBI assembly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants