Closed FFeiKong closed 9 months ago
My guess is that the chromosome names are not matching in your object and the BSgenome object. Please check and reformat the BSgenome seqnames as necessary
Thank you Tim, I have solved this problem by using code you offered in 2021 in #780 . Though I didn't know the reasons, code seems to be run. I will check what you proposed above, Thanks again. Best wishes, Kong
@timoast Hi, tim, I try to run RunChromVAR in my code, and I encounter a problem you mentioned before. I try to solve it as you said in #1388 , but it seems like something goes wrong, could you please help me to solve it? Thank you very much!
Here's my code:
obj <- RunChromVAR( object = obj, genome = BSgenome.Hsapiens.UCSC.hg38, assay = "ATAC" )
Error in .getOneSeqFromBSgenomeMultipleSequences(x, name, start, NA, width, : sequence GL000009.2 not found In addition: Warning message: In .merge_two_Seqinfo_objects(x, y) : Each of the 2 combined objects has sequence levels not in the other:I try to solve this as below:
features.keep <- as.character(seqnames(granges(obj))) %in% standardChromosomes(granges(obj))
and I get error: Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function '%in%': error in evaluating the argument 'x' in selecting a method for function 'seqnames': unable to find an inherited method for function ‘granges’ for signature ‘"Assay"’> obj An object of class Seurat 370986 features across 10303 samples within 2 assays Active assay: RNA (2298 features, 0 variable features) 1 other assay present: ATAC 5 dimensional reductions calculated: pca, harmony, umap, umap_harmony, dm
sessionInfo() `R version 4.3.2 (2023-10-31) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)
Matrix products: default BLAS/LAPACK: /public/home/kongfanshu/.conda/envs/env_r432/lib/libopenblasp-r0.3.25.so; LAPACK version 3.11.0
Random number generation: RNG: L'Ecuyer-CMRG Normal: Inversion Sample: Rejection
locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Asia/Shanghai tzcode source: system (glibc)
attached base packages: [1] stats4 grid stats graphics grDevices utils datasets [8] methods base
other attached packages: [1] destiny_3.16.0 ggraph_2.1.0
[3] igraph_1.6.0 TFBSTools_1.40.0
[5] JASPAR2020_0.99.10 dplyr_1.1.4
[7] BSgenome.Hsapiens.UCSC.hg38_1.4.5 BSgenome_1.70.1
[9] rtracklayer_1.62.0 BiocIO_1.12.0
[11] Biostrings_2.70.1 XVector_0.42.0
[13] Nebulosa_1.12.0 patchwork_1.2.0
[15] harmony_1.2.0 scMEGA_1.0.2
[17] Signac_1.11.0 SeuratObject_4.1.4
[19] Seurat_4.3.0 rhdf5_2.46.1
[21] SummarizedExperiment_1.32.0 Biobase_2.62.0
[23] MatrixGenerics_1.14.0 Rcpp_1.0.12
[25] Matrix_1.6-5 GenomicRanges_1.54.1
[27] GenomeInfoDb_1.38.5 IRanges_2.36.0
[29] S4Vectors_0.40.2 BiocGenerics_0.48.1
[31] matrixStats_1.2.0 data.table_1.14.10
[33] stringr_1.5.1 plyr_1.8.9
[35] magrittr_2.0.3 ggplot2_3.4.4
[37] gtable_0.3.4 gtools_3.9.5
[39] gridExtra_2.3 ArchR_1.0.2
loaded via a namespace (and not attached): [1] spatstat.sparse_3.0-3 bitops_1.0-7
[3] DirichletMultinomial_1.44.0 httr_1.4.7
[5] RColorBrewer_1.1-3 tools_4.3.2
[7] sctransform_0.4.1 DT_0.31
[9] utf8_1.2.4 R6_2.5.1
[11] lazyeval_0.2.2 uwot_0.1.16
[13] rhdf5filters_1.14.1 withr_2.5.2
[15] sp_2.1-2 progressr_0.14.0
[17] cli_3.6.2 factoextra_1.0.7
[19] Cairo_1.6-2 spatstat.explore_3.2-5
[21] labeling_0.4.3 mvtnorm_1.2-4
[23] robustbase_0.99-1 spatstat.data_3.0-3
[25] readr_2.1.5 proxy_0.4-27
[27] ggridges_0.5.5 pbapply_1.7-2
[29] Rsamtools_2.18.0 R.utils_2.12.3
[31] parallelly_1.36.0 TTR_0.24.4
[33] RSQLite_2.3.4 generics_0.1.3
[35] ica_1.0-3 spatstat.random_3.2-2
[37] car_3.1-2 GO.db_3.18.0
[39] fansi_1.0.6 abind_1.4-5
[41] R.methodsS3_1.8.2 lifecycle_1.0.4
[43] scatterplot3d_0.3-44 yaml_2.3.8
[45] carData_3.0-5 SparseArray_1.2.3
[47] Rtsne_0.17 blob_1.2.4
[49] promises_1.2.1 crayon_1.5.2
[51] miniUI_0.1.1.1 lattice_0.22-5
[53] cowplot_1.1.2 annotate_1.80.0
[55] KEGGREST_1.42.0 pillar_1.9.0
[57] rjson_0.2.21 boot_1.3-28.1
[59] future.apply_1.11.1 codetools_0.2-19
[61] fastmatch_1.1-4 leiden_0.4.3.1
[63] glue_1.7.0 pcaMethods_1.94.0
[65] vcd_1.4-12 vctrs_0.6.5
[67] png_0.1-8 spam_2.10-0
[69] poweRlaw_0.70.6 cachem_1.0.8
[71] ks_1.14.1 S4Arrays_1.2.0
[73] mime_0.12 RcppEigen_0.3.3.9.4
[75] tidygraph_1.3.0 pracma_2.4.4
[77] survival_3.5-7 SingleCellExperiment_1.24.0 [79] RcppRoll_0.3.0 ellipsis_0.3.2
[81] fitdistrplus_1.1-11 ROCR_1.0-11
[83] nlme_3.1-164 xts_0.13.1
[85] bit64_4.0.5 RcppAnnoy_0.0.21
[87] irlba_2.3.5.1 KernSmooth_2.23-22
[89] DBI_1.2.1 colorspace_2.1-0
[91] seqLogo_1.68.0 nnet_7.3-19
[93] tidyselect_1.2.0 smoother_1.1
[95] bit_4.0.5 compiler_4.3.2
[97] curl_5.2.0 DelayedArray_0.28.0
[99] plotly_4.10.3 scales_1.3.0
[101] caTools_1.18.2 DEoptimR_1.1-3
[103] lmtest_0.9-40 hexbin_1.28.3
[105] nabor_0.5.0 digest_0.6.34
[107] goftest_1.2-3 spatstat.utils_3.0-4
[109] motifmatchr_1.24.0 htmltools_0.5.7
[111] pkgconfig_2.0.3 fastmap_1.1.1
[113] rlang_1.1.3 htmlwidgets_1.6.4
[115] ggthemes_5.0.0 shiny_1.8.0
[117] farver_2.1.1 zoo_1.8-12
[119] jsonlite_1.8.8 BiocParallel_1.36.0
[121] mclust_6.0.1 R.oo_1.25.0
[123] RCurl_1.98-1.14 GenomeInfoDbData_1.2.11
[125] dotCall64_1.1-1 Rhdf5lib_1.24.1
[127] munsell_0.5.0 viridis_0.6.4
[129] reticulate_1.34.0 stringi_1.8.3
[131] zlibbioc_1.48.0 MASS_7.3-60
[133] parallel_4.3.2 listenv_0.9.0
[135] ggrepel_0.9.5 CNEr_1.38.0
[137] deldir_2.0-2 graphlayouts_1.0.2
[139] splines_4.3.2 tensor_1.5
[141] hms_1.1.3 ranger_0.16.0
[143] spatstat.geom_3.2-7 RcppHNSW_0.5.0
[145] reshape2_1.4.4 TFMPvalue_0.0.9
[147] XML_3.99-0.16 laeken_0.5.2
[149] chromVAR_1.24.0 tzdb_0.4.0
[151] tweenr_2.0.2 httpuv_1.6.13
[153] VIM_6.2.2 RANN_2.6.1
[155] tidyr_1.3.0 purrr_1.0.2
[157] polyclip_1.10-6 future_1.33.1
[159] scattermore_1.2 ggforce_0.4.1
[161] xtable_1.8-4 restfulr_0.0.15
[163] e1071_1.7-14 RSpectra_0.16-1
[165] later_1.3.2 viridisLite_0.4.2
[167] class_7.3-22 tibble_3.2.1.9013
[169] AnnotationDbi_1.64.1 memoise_2.0.1
[171] GenomicAlignments_1.38.1 cluster_2.1.6
[173] ggplot.multistats_1.0.0 globals_0.16.2 `
Thanks in advance!