Hello all,
I am performing a differential accessibility analysis of ATACseq data with diffbind after using MACS2 for peak calling. However, somehow (I don't know where it goes wrong) the chromosomes are just numbered 1, 2, 3 etc in my peak files instead of chr1, chr2, chr3. Here's my code for differential analysis:
>OT1 <- dba(sampleSheet = samples)
>OT1 <- dba.count(OT1, summits = 250)
>OT1 <- dba.normalize(OT1, library = DBA_LIBSIZE_PEAKREADS)
>OT1 <- dba.contrast(OT1, categories = DBA_CONDITION)
And now I want to remove blacklisted regions
> OT1 <- dba.blacklist(OT1, blacklist = DBA_BLACKLIST_MM10, greylist = FALSE)
Genome detected: Mmusculus.UCSC.mm10
Applying blacklist...
Removed: 0 of 70147 intervals.
No intervals removed.
Warning message:
Blacklist does not overlap any peak chromosomes!
The warning is because in the blacklisted file the chromosomes are names chr1, chr2, chr3 and in my dba object 1, 2, 3 etc.
Is there an easy way to add chr to a dba object? I know how to do it with addchr() to a GRanges object but is there a similar approach for this case? That will allow me to continue my analysis without having to redo MACS2 or any steps before where the chr should've been included.
Many thanks!
> sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=Dutch_Netherlands.1252 LC_CTYPE=Dutch_Netherlands.1252
[3] LC_MONETARY=Dutch_Netherlands.1252 LC_NUMERIC=C
[5] LC_TIME=Dutch_Netherlands.1252
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] org.Mm.eg.db_3.12.0 forcats_0.5.1
[3] stringr_1.4.0 dplyr_1.0.5
[5] purrr_0.3.4 readr_1.4.0
[7] tidyr_1.1.3 tibble_3.1.0
[9] ggplot2_3.3.3 tidyverse_1.3.0
[11] diffloop_1.18.0 TxDb.Mmusculus.UCSC.mm10.knownGene_3.10.0
[13] GenomicFeatures_1.42.2 AnnotationDbi_1.52.0
[15] DiffBind_3.0.14 SummarizedExperiment_1.20.0
[17] Biobase_2.50.0 MatrixGenerics_1.2.1
[19] matrixStats_0.58.0 GenomicRanges_1.42.0
[21] GenomeInfoDb_1.26.4 IRanges_2.24.1
[23] S4Vectors_0.28.1 BiocGenerics_0.36.0
[25] ChIPseeker_1.26.2
I'm just a newbie... But I think you can get the blacklist from here remove the "chr" manually, convert it into a Granges object and pass it as the parameter
blacklist
to dba.blacklist.Thank you!