DiffBind: bGain or bLoss parameters in dba.report don't work?
1
0
Entering edit mode
fleur_p90 • 0
@fleur_p90-10888
Last seen 3.2 years ago
Netherlands

Hi all,

I am performing the package diffbind and at the end I would like to make two separate files for the regions that are open and closed (I am analyzing ATAC seq data). However, setting the parameter bGain = TRUE or bLoss = TRUE doesn't change anything....

Here's my code

OT1.DB_sign <- dba.report(OT1)
OT1.DB_open <- dba.report(OT1, bAll = FALSE, bGain = TRUE)
OT1.DB_close <- dba.report(OT1, bAll = FALSE, bLoss = TRUE)

# output in the console:
> OT1.DB_sign
GRanges object with 2566 ranges and 6 metadata columns:

> OT1.DB_open
GRanges object with 2566 ranges and 6 metadata columns:

> OT1.DB_close
GRanges object with 2566 ranges and 6 metadata columns:

# Output of all three files is the same and I can see in the Fold column both negative and positive values

> 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    LC_MONETARY=Dutch_Netherlands.1252
[4] LC_NUMERIC=C                       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                        ChIPseeker_1.26.2                        
[21] GenomicRanges_1.42.0                      GenomeInfoDb_1.26.4                      
[23] IRanges_2.24.1                            S4Vectors_0.28.1                         
[25] BiocGenerics_0.36.0

Any idea what I am doing wrong? Or is there another way to get out only the + or - Fold regions?

Thanks!

Best, Fleur

DiffBind • 947 views
ADD COMMENT
0
Entering edit mode

I found a way to work around this by the following:

OT1.DB_open <- OT1.DB_open[OT1.DB_open$Fold >= 0]

Did the trick. But nevertheless I am curious why the bGain and bLoss don't work as they should

ADD REPLY
1
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 4 weeks ago
Cambridge, UK

The bGain and bLoss parameters to dba.report() only have effect when bDB=TRUE, indicating that a report-based DBA object should be returned (rather than a GRanges report). If you want a report-based DBA object, set bDB=TRUE. If you want to filter a regular report based on Fold, you're doing the right thing!

I notice that the help page for dba.report()says that setting bGain or bLoss to TRUE should itself trigger a report-based object, I'll look into either fixing this or updating the documentation.

ADD COMMENT
0
Entering edit mode

Alright, wonderful :) thank you for the reply!

ADD REPLY

Login before adding your answer.

Traffic: 725 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6