stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
318 stars 85 forks source link

Error; Transcription factor foot print #1311

Closed iaki-dev closed 1 year ago

iaki-dev commented 1 year ago

Error of the transcription factor foot printing

When using Footprint function, the error message had shown as below. Error in normalizeDoubleBracketSubscript(i, x, exact = exact, allow.NA = TRUE, : attempt to extract more than one element

When using other gene, such as GATA2, I can run Footprint function. Therefore, I guess the environment is probably correct. In particular, setting of motif.name = c("MEIS2") may be the problem because there are 2-MEIS2 motifs according to JASPAR2022.

Are any solutions for this problem?

Thank you for your kindness.

signac.obj <- Footprint(
+   object = signac.obj,
+   motif.name = c("MEIS2"),
+   genome = BSgenome.Mmusculus.UCSC.mm10
+ )
Error in normalizeDoubleBracketSubscript(i, x, exact = exact, allow.NA = TRUE,  : 
  attempt to extract more than one element 

sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS 13.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] remotes_2.4.2      Signac_1.7.0       sp_1.5-0           SeuratObject_4.1.2

loaded via a namespace (and not attached):
 [1] bitops_1.0-7           fs_1.5.2               usethis_2.1.6          devtools_2.4.5         GenomeInfoDb_1.30.1    tools_4.1.1           
 [7] profvis_0.3.7          utf8_1.2.2             rgdal_1.5-32           R6_2.5.1               irlba_2.3.5.1          rgeos_0.5-9           
[13] DBI_1.1.3              BiocGenerics_0.40.0    colorspace_2.0-3       urlchecker_1.0.1       tidyselect_1.2.0       prettyunits_1.1.1     
[19] processx_3.7.0         curl_4.3.3             compiler_4.1.1         progressr_0.11.0       cli_3.4.1              scales_1.2.1          
[25] callr_3.7.2            pbapply_1.5-0          stringr_1.4.1          digest_0.6.29          Rsamtools_2.10.0       XVector_0.34.0        
[31] pkgconfig_2.0.3        htmltools_0.5.3        parallelly_1.32.1      sessioninfo_1.2.2      fastmap_1.1.0          htmlwidgets_1.5.4     
[37] rlang_1.0.6            rstudioapi_0.14        shiny_1.7.2            generics_0.1.3         BiocParallel_1.28.3    dplyr_1.0.10          
[43] RCurl_1.98-1.9         magrittr_2.0.3         GenomeInfoDbData_1.2.7 patchwork_1.1.2        Matrix_1.5-1           Rcpp_1.0.9            
[49] munsell_0.5.0          S4Vectors_0.32.4       fansi_1.0.3            lifecycle_1.0.3        stringi_1.7.8          zlibbioc_1.40.0       
[55] pkgbuild_1.3.1         grid_4.1.1             parallel_4.1.1         listenv_0.8.0          promises_1.2.0.1       crayon_1.5.2          
[61] miniUI_0.1.1.1         lattice_0.20-45        Biostrings_2.62.0      ps_1.7.1               pillar_1.8.1           GenomicRanges_1.46.1  
[67] future.apply_1.9.1     codetools_0.2-18       stats4_4.1.1           pkgload_1.3.0          fastmatch_1.1-3        glue_1.6.2            
[73] data.table_1.14.4      vctrs_0.4.2            httpuv_1.6.6           gtable_0.3.1           purrr_0.3.5            tidyr_1.2.1           
[79] future_1.28.0          assertthat_0.2.1       cachem_1.0.6           ggplot2_3.3.6          mime_0.12              xtable_1.8-4          
[85] later_1.3.0            RcppRoll_0.3.0         tibble_3.1.8           memoise_2.0.1          IRanges_2.28.0         globals_0.16.1        
[91] ellipsis_0.3.2      
timoast commented 1 year ago

I was able to reproduce this error using the JASPAR2022 motif collection, and it is due to having multiple motifs with the same name. I will have to think about how we should handle cases like this where the name can correspond to multiple PFMs in the object.

iaki-dev commented 1 year ago

Thanks for your reply. I also agree with your suggestion about version. In previous JASPAR version, they had identifiers such as var1, var2. Therefore, in this case, Could you replace temporal var ID in the system? Thanks,

2023/01/16 14:02、Tim Stuart @.***>のメール:



I was able to reproduce this error using the JASPAR2022 motif collection, and it is due to having multiple motifs with the same name. I will have to think about how we should handle cases like this where the name can correspond to multiple PFMs in the object.

— Reply to this email directly, view it on GitHub https://github.com/stuart-lab/signac/issues/1311#issuecomment-1383493104, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOZZKJNGLJ3FOAY53BQCPYTWSTI5ZANCNFSM6AAAAAATQMVDFA. You are receiving this because you authored the thread.

timoast commented 1 year ago

Hi @iaki-dev, this should now be fixed on the develop branch. When adding a motif object, we will make the motif names unique and issue a warning if non-unique names were supplied