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

Issue with CoveragePlot: shows opposite trend from ViolinPlot for a specific peak #1871

Open
Daliya-K opened this issue Dec 21, 2024 · 0 comments

Comments

@Daliya-K
Copy link

Thank you for developing this great package!
I am trying to visualize with CoveragePlot deferentially accessible peaks between condition A and B in scATACseq data. I used Wilcoxon rank sum test with FindMarkers in Seurat to calculate the DA peaks. Strangely, the DA peak upregulated in condition "A" with the lowest p-value has much lower signal in "A" in the Coverage Plot:

DEpeaks<-FindMarkers(seur, ident.1 ="A", ident.2="B",min.cells.group=2,pseudocount.use = 0.01, max.cells.per.ident = 1000)
DEpeaks$peak=row.names(DEpeaks)
closest_genes <- ClosestFeature(seur_full.noart, regions = rownames(DEpeaks))
DEpeaks=merge(DEpeaks, closest_genes, by.x="peak", by.y="query_region",sort=F, all=T)
features.use= head(DEpeaks[DEpeaks$avg_log2FC>6,]$peak,30)
i=1
DefaultAssay(seur)="peaks"
p=CoveragePlot(
object =seur,
region =features.use[i],
region.highlight = StringToGRanges(features.use[i]),
extend.upstream = 1000,
extend.downstream = 1000
)
p

1

If I plot the counts for this peak, it is clearly more accessible in "A"

Normalized counts:

VlnPlot(seur, features =features.use[i] )

2

Raw counts:

VlnPlot(seur, features =features.use[i], slot="counts" )

3

The remaining top 30 up and down DA peaks look more logical on the CoveragePlot. I will be very grateful in any help to understand why is this happening

SessionInfo:

R version 4.4.2 (2024-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.1 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.12.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0

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

time zone: Europe/Brussels
tzcode source: system (glibc)

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

other attached packages:
[1] ggrepel_0.9.6 karyoploteR_1.32.0 regioneR_1.38.0 shiny_1.9.1 EnsDb.Mmusculus.v79_2.99.0
[6] ensembldb_2.30.0 AnnotationFilter_1.30.0 GenomicFeatures_1.58.0 AnnotationDbi_1.68.0 Biobase_2.66.0
[11] GenomicRanges_1.58.0 GenomeInfoDb_1.42.1 IRanges_2.40.0 S4Vectors_0.44.0 BiocGenerics_0.52.0
[16] presto_1.0.0 data.table_1.16.2 Rcpp_1.0.13-1 plotly_4.10.4 clustree_0.5.1
[21] ggraph_2.2.1 cowplot_1.1.3 ggplot2_3.5.1 SeuratObject_5.0.2 Seurat_4.3.0
[26] Signac_1.14.0 dplyr_1.1.4

loaded via a namespace (and not attached):
[1] ProtGenerics_1.38.0 matrixStats_1.4.1 spatstat.sparse_3.1-0 bitops_1.0-9 httr_1.4.7
[6] RColorBrewer_1.1-3 tools_4.4.2 sctransform_0.4.1 backports_1.5.0 utf8_1.2.4
[11] R6_2.5.1 lazyeval_0.2.2 uwot_0.2.2 withr_3.0.2 sp_2.1-4
[16] gridExtra_2.3 progressr_0.15.1 cli_3.6.3 textshaping_0.4.0 spatstat.explore_3.3-3
[21] labeling_0.4.3 sass_0.4.9 spatstat.data_3.1-4 ggridges_0.5.6 pbapply_1.7-2
[26] Rsamtools_2.22.0 systemfonts_1.1.0 foreign_0.8-87 dichromat_2.0-0.1 parallelly_1.40.0
[31] BSgenome_1.74.0 limma_3.62.1 rstudioapi_0.17.1 RSQLite_2.3.8 generics_0.1.3
[36] BiocIO_1.16.0 ica_1.0-3 spatstat.random_3.3-2 Matrix_1.7-1 ggbeeswarm_0.7.2
[41] fansi_1.0.6 abind_1.4-8 lifecycle_1.0.4 yaml_2.3.10 SummarizedExperiment_1.36.0
[46] SparseArray_1.6.0 Rtsne_0.17 grid_4.4.2 blob_1.2.4 promises_1.3.2
[51] crayon_1.5.3 miniUI_0.1.1.1 lattice_0.22-5 KEGGREST_1.46.0 pillar_1.9.0
[56] knitr_1.49 rjson_0.2.23 future.apply_1.11.3 codetools_0.2-20 fastmatch_1.1-4
[61] leiden_0.4.3.1 glue_1.8.0 spatstat.univar_3.1-1 vctrs_0.6.5 png_0.1-8
[66] spam_2.11-0 gtable_0.3.6 cachem_1.1.0 xfun_0.49 S4Arrays_1.6.0
[71] mime_0.12 tidygraph_1.3.1 survival_3.7-0 RcppRoll_0.3.1 statmod_1.5.0
[76] fitdistrplus_1.2-1 ROCR_1.0-11 nlme_3.1-166 bit64_4.5.2 RcppAnnoy_0.0.22
[81] bslib_0.8.0 irlba_2.3.5.1 vipor_0.4.7 rpart_4.1.23 KernSmooth_2.23-24
[86] colorspace_2.1-1 DBI_1.2.3 Hmisc_5.2-1 nnet_7.3-19 ggrastr_1.0.2
[91] tidyselect_1.2.1 bit_4.5.0.1 compiler_4.4.2 curl_6.0.1 htmlTable_2.4.3
[96] bezier_1.1.2 DelayedArray_0.32.0 rtracklayer_1.66.0 checkmate_2.3.2 scales_1.3.0
[101] lmtest_0.9-40 stringr_1.5.1 digest_0.6.37 goftest_1.2-3 spatstat.utils_3.1-1
[106] rmarkdown_2.29 XVector_0.46.0 htmltools_0.5.8.1 pkgconfig_2.0.3 base64enc_0.1-3
[111] MatrixGenerics_1.18.0 fastmap_1.2.0 rlang_1.1.4 htmlwidgets_1.6.4 UCSC.utils_1.2.0
[116] farver_2.1.2 jquerylib_0.1.4 zoo_1.8-12 jsonlite_1.8.9 BiocParallel_1.40.0
[121] VariantAnnotation_1.52.0 RCurl_1.98-1.16 magrittr_2.0.3 Formula_1.2-5 GenomeInfoDbData_1.2.13
[126] dotCall64_1.2 patchwork_1.3.0 munsell_0.5.1 bamsignals_1.38.0 viridis_0.6.5
[131] reticulate_1.40.0 stringi_1.8.4 zlibbioc_1.52.0 MASS_7.3-61 plyr_1.8.9
[136] parallel_4.4.2 listenv_0.9.1 deldir_2.0-4 Biostrings_2.74.0 graphlayouts_1.2.1
[141] splines_4.4.2 tensor_1.5 igraph_2.1.2 spatstat.geom_3.3-4 reshape2_1.4.4
[146] pkgload_1.4.0 XML_3.99-0.17 evaluate_1.0.1 biovizBase_1.54.0 BiocManager_1.30.25
[151] tweenr_2.0.3 httpuv_1.6.15 RANN_2.6.2 tidyr_1.3.1 purrr_1.0.2
[156] polyclip_1.10-7 future_1.34.0 scattermore_1.2 ggforce_0.4.2 xtable_1.8-4
[161] restfulr_0.0.15 later_1.4.1 viridisLite_0.4.2 ragg_1.3.3 tibble_3.2.1
[166] beeswarm_0.4.0 memoise_2.0.1 GenomicAlignments_1.42.0 writexl_1.5.1 cluster_2.1.8
[171] globals_0.16.3
`

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