GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
384 stars 137 forks source link

error in using addCoAccessibility with 'cellsToUse ' #1951

Closed Linshiqi-Git closed 1 year ago

Linshiqi-Git commented 1 year ago

Hello, I'm calculating the co-accessibility of a specified cell type using addCoAccessibility with 'cellsToUse'. However, there is no output of , and no error is reported in the log. Could you please help me find the solution? Thank you so much!

ArchR-addCoAccessibility-7567632ab962-Date-2023-05-16_Time-23-20-48.log

My code is: projHeme5 <- addCoAccessibility( ArchRProj = projHeme5, reducedDims = "IterativeLSI", cellsToUse =rownames(projHeme5@cellColData[which(projHeme5@cellColData$celltypes==celltype),]) )

When I use cA <- getCoAccessibility( ArchRProj = projHeme5, corCutOff = 0.2, resolution = 1, returnLoops = FALSE ) to extract co-accessibility results, there was nothing in cA.

This situation only happened in using parameter 'cellsToUse '. After removing 'cellsToUse ', the output is normal.

Session Info sessionInfo()

R version 4.1.3 (2022-03-10) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /p300s/biosoft/app/python/python3.9/envs/R4.1.3/lib/libmkl_rt.so.2

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

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

other attached packages: [1] nabor_0.5.0 ggrepel_0.9.1 [3] BSgenome.Hsapiens.UCSC.hg19_1.4.3 BSgenome_1.62.0 [5] rtracklayer_1.54.0 Biostrings_2.62.0 [7] XVector_0.34.0 rhdf5_2.38.0 [9] SummarizedExperiment_1.24.0 Biobase_2.54.0 [11] MatrixGenerics_1.6.0 Rcpp_1.0.10 [13] Matrix_1.4-1 GenomicRanges_1.46.1 [15] GenomeInfoDb_1.30.0 IRanges_2.28.0 [17] S4Vectors_0.32.3 BiocGenerics_0.40.0 [19] matrixStats_0.62.0 data.table_1.14.8 [21] stringr_1.5.0 plyr_1.8.7 [23] magrittr_2.0.3 ggplot2_3.3.6 [25] gtable_0.3.0 gtools_3.9.2 [27] gridExtra_2.3 ArchR_1.0.2

loaded via a namespace (and not attached): [1] lattice_0.20-45 Rsamtools_2.10.0 digest_0.6.29 [4] utf8_1.2.3 R6_2.5.1 pillar_1.9.0 [7] zlibbioc_1.40.0 rlang_1.1.1 labeling_0.4.2 [10] BiocParallel_1.28.3 RCurl_1.98-1.6 munsell_0.5.0 [13] DelayedArray_0.20.0 compiler_4.1.3 pkgconfig_2.0.3 [16] tidyselect_1.2.0 tibble_3.2.1 GenomeInfoDbData_1.2.7 [19] codetools_0.2-18 XML_3.99-0.9 fansi_1.0.4 [22] crayon_1.5.2 dplyr_1.1.2 withr_2.5.0 [25] GenomicAlignments_1.30.0 rhdf5filters_1.6.0 bitops_1.0-7 [28] lifecycle_1.0.3 scales_1.2.1 cli_3.6.1 [31] stringi_1.7.6 farver_2.1.0 generics_0.1.3 [34] vctrs_0.6.2 Rhdf5lib_1.16.0 rjson_0.2.21 [37] restfulr_0.0.13 tools_4.1.3 Cairo_1.6-0 [40] glue_1.6.2 yaml_2.3.5 colorspace_2.0-3 [43] BiocIO_1.4.0

rcorces commented 1 year ago

Hi @EEEleanor! Thanks for using ArchR! I am currently on vacation and will not be responding to any issues or discussion threads until 5/5.
Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.
It is worth noting that there are very few actual bugs in ArchR. If you are getting an error, it is probably something specific to your dataset, usage, or computational environment, all of which are extremely challenging to troubleshoot. As such, we require reproducible examples (preferably using the tutorial dataset) from users who want assistance. If you cannot reproduce your error, how will we be able to help? Before going through the work of making a reproducible example, search the previous Issues, Discussions, function definitions, or the ArchR manual and you will likely find the answers you are looking for. If your post does not contain a reproducible example, it is unlikely to receive a response.
1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved? 2. Can you recapitulate your error using the tutorial code and dataset? If so, provide a reproducible example. 3. Did you post your log file? If not, add it now. 4. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.

rcorces commented 1 year ago

maybe there are no peaks found to be co-accessible given your input. As a reminder, coaccessibility requires variation to drive the correlation between two peaks. If you only have one cell type, then you may not have any variability. Closing as I imagine this is the correct answer but feel free to follow up if not.