Skip to content
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

'Error in density.default(x = query.feature[[featmatch]], kernel = "gaussian", : 'x' contains missing values' while running JASPAR2020 for motif enrichment analyses: #5

Open
yojetsharma opened this issue Mar 7, 2024 · 0 comments

Comments

@yojetsharma
Copy link

yojetsharma commented Mar 7, 2024

While everything else ran smoothly, there is an issue while running JASPAR.
Also in the script earlier (shown here below):

> library(TFBSTools)
> library(JASPAR2020)
> 
> pfm <- getMatrixSet(
+     x = JASPAR2020,
+     opts = list(collection = "CORE", tax_group = 'vertebrates', all_versions = FALSE)
+ )
> df_pfm <- data.frame(t(sapply(pfm, function(x)
+     c(id=x@ID, name=x@name, symbol=ifelse(!is.null(x@tags$symbol),x@tags$symbol,NA)))))
> 
> seurat <- AddMotifs(seurat, genome = BSgenome.Hsapiens.UCSC.hg38, pfm = pfm)
Building motif matrix
Warning in CreateMotifMatrix(features = object, pwm = pfm, genome = genome,  :
  Not all seqlevels present in supplied genome
Finding motif positions
Creating Motif object
Warning in RegionStats.default(object = regions, genome = genome, verbose = verbose,  :
  Not all seqlevels present in supplied genome
Warning messages:
1: In .merge_two_Seqinfo_objects(x, y) :
  Each of the 2 combined objects has sequence levels not in the other:
  - in 'x': chrM, chr1_GL383518v1_alt, chr1_GL383519v1_alt, chr1_GL383520v2_alt, chr1_KI270759v1_alt, chr1_KI270760v1_alt, chr1_KI270761v1_alt, chr1_KI270762v1_alt, chr1_KI270763v1_alt, chr1_KI270764v1_alt, chr1_KI270765v1_alt, chr1_KI270766v1_alt, chr1_KI270892v1_alt, chr2_GL383521v1_alt, chr2_GL383522v1_alt, chr2_GL582966v2_alt, chr2_KI270767v1_alt, chr2_KI270768v1_alt, chr2_KI270769v1_alt, chr2_KI270770v1_alt, chr2_KI270771v1_alt, chr2_KI270772v1_alt, chr2_KI270773v1_alt, chr2_KI270774v1_alt, chr2_KI270775v1_alt, chr2_KI270776v1_alt, chr2_KI270893v1_alt, chr2_KI270894v1_alt, chr3_GL383526v1_alt, chr3_JH636055v2_alt, chr3_KI270777v1_alt, chr3_KI270778v1_alt, chr3_KI270779v1_alt, chr3_KI270780v1_alt, chr3_KI270781v1_alt, chr3_KI270782v1_alt, chr3_KI270783v1_alt, chr3_KI270784v1_alt, chr3_KI270895v1_alt, chr3_KI270924v1_alt, chr3_KI270934v1_alt, chr3_KI270935v1_alt, chr3_KI270936v1_alt, chr3_KI270937v1_alt, chr4_GL000 [... truncated]
2: In .merge_two_Seqinfo_objects(x, y) :
  Each of the 2 combined objects has sequence levels not in the other:
  - in 'x': chrM, chr1_GL383518v1_alt, chr1_GL383519v1_alt, chr1_GL383520v2_alt, chr1_KI270759v1_alt, chr1_KI270760v1_alt, chr1_KI270761v1_alt, chr1_KI270762v1_alt, chr1_KI270763v1_alt, chr1_KI270764v1_alt, chr1_KI270765v1_alt, chr1_KI270766v1_alt, chr1_KI270892v1_alt, chr2_GL383521v1_alt, chr2_GL383522v1_alt, chr2_GL582966v2_alt, chr2_KI270767v1_alt, chr2_KI270768v1_alt, chr2_KI270769v1_alt, chr2_KI270770v1_alt, chr2_KI270771v1_alt, chr2_KI270772v1_alt, chr2_KI270773v1_alt, chr2_KI270774v1_alt, chr2_KI270775v1_alt, chr2_KI270776v1_alt, chr2_KI270893v1_alt, chr2_KI270894v1_alt, chr3_GL383526v1_alt, chr3_JH636055v2_alt, chr3_KI270777v1_alt, chr3_KI270778v1_alt, chr3_KI270779v1_alt, chr3_KI270780v1_alt, chr3_KI270781v1_alt, chr3_KI270782v1_alt, chr3_KI270783v1_alt, chr3_KI270784v1_alt, chr3_KI270895v1_alt, chr3_KI270924v1_alt, chr3_KI270934v1_alt, chr3_KI270935v1_alt, chr3_KI270936v1_alt, chr3_KI270937v1_alt, chr4_GL000 [... truncated]
> open_peaks <- AccessiblePeaks(seurat)
> peaks_matched <- MatchRegionStats(meta.feature = seurat[['ATAC']]@meta.features[open_peaks, ],
+                                   query.feature = seurat[['ATAC']]@meta.features[top_peaks_ct$feature, ],
+                                   n = 50000)
Matching GC.percent distribution
Error in density.default(x = query.feature[[featmatch]], kernel = "gaussian",  : 
  'x' contains missing values
> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg38_1.4.5 BSgenome_1.66.3                  
 [3] rtracklayer_1.58.0                Biostrings_2.66.0                
 [5] XVector_0.38.0                    GenomicRanges_1.50.2             
 [7] GenomeInfoDb_1.34.9               IRanges_2.32.0                   
 [9] S4Vectors_0.36.2                  BiocGenerics_0.44.0              
[11] JASPAR2020_0.99.10                TFBSTools_1.36.0                 
[13] presto_1.0.0                      data.table_1.15.2                
[15] Rcpp_1.0.12                       simspec_0.0.0.9000               
[17] Matrix_1.6-5                      dplyr_1.1.4                      
[19] Signac_1.12.0                     Seurat_5.0.2                     
[21] SeuratObject_5.0.1                sp_2.1-3                         

loaded via a namespace (and not attached):
  [1] utf8_1.2.4                  R.utils_2.12.3              spatstat.explore_3.2-6     
  [4] reticulate_1.35.0           tidyselect_1.2.0            AnnotationDbi_1.60.2       
  [7] poweRlaw_0.80.0             RSQLite_2.3.5               htmlwidgets_1.6.4          
 [10] grid_4.2.1                  BiocParallel_1.32.6         Rtsne_0.17                 
 [13] munsell_0.5.0               codetools_0.2-18            ica_1.0-3                  
 [16] future_1.33.1               miniUI_0.1.1.1              withr_3.0.0                
 [19] spatstat.random_3.2-3       colorspace_2.1-0            progressr_0.14.0           
 [22] Biobase_2.58.0              rstudioapi_0.15.0           ROCR_1.0-11                
 [25] tensor_1.5                  listenv_0.9.1               MatrixGenerics_1.10.0      
 [28] labeling_0.4.3              GenomeInfoDbData_1.2.9      polyclip_1.10-6            
 [31] bit64_4.0.5                 farver_2.1.1                parallelly_1.37.1          
 [34] vctrs_0.6.5                 generics_0.1.3              R6_2.5.1                   
 [37] bitops_1.0-7                spatstat.utils_3.0-4        cachem_1.0.8               
 [40] DelayedArray_0.24.0         promises_1.2.1              BiocIO_1.8.0               
 [43] scales_1.3.0                gtable_0.3.4                globals_0.16.2             
 [46] goftest_1.2-3               spam_2.10-0                 seqLogo_1.64.0             
 [49] rlang_1.1.3                 RcppRoll_0.3.0              splines_4.2.1              
 [52] lazyeval_0.2.2              spatstat.geom_3.2-9         BiocManager_1.30.22        
 [55] yaml_2.3.8                  reshape2_1.4.4              abind_1.4-5                
 [58] httpuv_1.6.14               tools_4.2.1                 ggplot2_3.5.0              
 [61] ellipsis_0.3.2              RColorBrewer_1.1-3          ggridges_0.5.6             
 [64] plyr_1.8.9                  zlibbioc_1.44.0             purrr_1.0.2                
 [67] RCurl_1.98-1.14             deldir_2.0-4                pbapply_1.7-2              
 [70] cowplot_1.1.3               zoo_1.8-12                  SummarizedExperiment_1.28.0
 [73] ggrepel_0.9.5               cluster_2.1.3               motifmatchr_1.20.0         
 [76] magrittr_2.0.3              RSpectra_0.16-1             scattermore_1.2            
 [79] lmtest_0.9-40               RANN_2.6.1                  fitdistrplus_1.1-11        
 [82] matrixStats_1.2.0           hms_1.1.3                   patchwork_1.2.0            
 [85] mime_0.12                   xtable_1.8-4                XML_3.99-0.16.1            
 [88] fastDummies_1.7.3           gridExtra_2.3               compiler_4.2.1             
 [91] tibble_3.2.1                KernSmooth_2.23-20          crayon_1.5.2               
 [94] R.oo_1.26.0                 htmltools_0.5.7             later_1.3.2                
 [97] tzdb_0.4.0                  tidyr_1.3.1                 DBI_1.2.2                  
[100] MASS_7.3-57                 readr_2.1.5                 cli_3.6.2                  
[103] R.methodsS3_1.8.2           parallel_4.2.1              dotCall64_1.1-1            
[106] igraph_2.0.2                pkgconfig_2.0.3             GenomicAlignments_1.34.1   
[109] TFMPvalue_0.0.9             plotly_4.10.4               spatstat.sparse_3.0-3      
[112] annotate_1.76.0             DirichletMultinomial_1.40.0 stringr_1.5.1              
[115] digest_0.6.34               sctransform_0.4.1           RcppAnnoy_0.0.22           
[118] pracma_2.4.4                CNEr_1.34.0                 spatstat.data_3.0-4        
[121] leiden_0.4.3.1              fastmatch_1.1-4             uwot_0.1.16                
[124] restfulr_0.0.15             shiny_1.8.0                 Rsamtools_2.14.0           
[127] gtools_3.9.5                rjson_0.2.21                lifecycle_1.0.4            
[130] nlme_3.1-157                jsonlite_1.8.8              viridisLite_0.4.2          
[133] fansi_1.0.6                 pillar_1.9.0                lattice_0.20-45            
[136] GO.db_3.16.0                KEGGREST_1.38.0             fastmap_1.1.1              
[139] httr_1.4.7                  survival_3.3-1              glue_1.7.0                 
[142] png_0.1-8                   bit_4.0.5                   stringi_1.8.3              
[145] blob_1.2.4                  RcppHNSW_0.6.0              caTools_1.18.2             
[148] memoise_2.0.1               irlba_2.3.5.1               future.apply_1.11.1 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant