Error report when loading a 0-byte bed file for DBA object in Diffbind
1
0
Entering edit mode
ahua217 ▴ 10
@ahua217-24323
Last seen 3.7 years ago

Hello! I got such an error report when I include a bed file with no peak into my DBA sample sheet.

Error in mergeScores(merged, def, peakset, TRUE) : Not compatible with requested type: [type=character; target=double]

Primarily, I do not want to delete this 0-byte bed file from the sample sheet, because its parallel replicates still has some peaks. But if I have to delete it (replicate no is 2), should I also change other replicate numbers, for example, 4 to 3 and 3 to 2? What is the best solution? Thank you very much!

DiffBind • 2.2k views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 4 weeks ago
Cambridge, UK

You should keep the replicate if you have reads for it, as the reads will be counted for consensus peaks when performing a differential analysis.

The workaround is, instead of naming the zero-byte peak file in the Peaks column of the sample sheet, simply leave the Peaks value empty for this sample. It will be included as a zero-peak sample initially but will form part of the binding matrix after counting.

ADD COMMENT
0
Entering edit mode

Thank you Dr. Stark. I tried to construct the DBA object with the data sheet containing one "empty" value at Peaks. Unfortunately, the error was still there. Then I replaced that peaks value into a manually-created bed file containing only one peak and zero strength. This time the data sheet can be successfully loaded. Is this manually-created bed file good for further analysis. And of course I still want to know why the "empty" setting got problem.

This question becomes important to me now again because I plan to fill some rows with the files of "IgG vs IgG". My previous rows linked to the files of "Scramble_antibody vs Scramble_IgG" and "shRNA_antibody vs shRNA_IgG". Here "vs" means the latter one's strength was taken as background in peak caller. I tried plotVenn() to see the overlap of "Scramble_antibody vs Scramble_IgG" and "shRNA_antibody vs shRNA_IgG", but the setting with only one contrast does not meet the criteria. So I considered adding IgG samples as new rows in DBA to generate 2 contrasts. On the other hand, in the peak caller SEACR I used, IgG is always recommended to keep the threshold setting. As a solution, though it sounds strange, I tried to generate a "IgG vs IgG" bed file in SEACR. And the online SEACR just froze on my request. So as a final solution, I came back to the idea of "muting" the peaks value in new rows by setting "empty" or manually filling with a zero-strength and one-peak file. I hope my description makes sense and wanna your suggestion. Maybe there is a simpler way.

Thank you very much!

ADD REPLY
0
Entering edit mode

Can you send along the output of sessionInfo() so I can see what versions you are working with?

ADD REPLY
0
Entering edit mode

Dr. Stark, here please see what returned from sessionInfo(). Thank you!

R version 4.0.3 (2020-10-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS High Sierra 10.13.6

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/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] parallel stats4 stats graphics grDevices utils datasets [8] methods base

other attached packages: [1] DiffBind_3.0.7 SummarizedExperiment_1.20.0 [3] Biobase_2.50.0 MatrixGenerics_1.2.0
[5] matrixStats_0.57.0 GenomicRanges_1.42.0
[7] GenomeInfoDb_1.26.1 IRanges_2.24.0
[9] S4Vectors_0.28.0 BiocGenerics_0.36.0

loaded via a namespace (and not attached): [1] backports_1.2.0 GOstats_2.56.0 BiocFileCache_1.14.0
[4] plyr_1.8.6 GSEABase_1.52.0 splines_4.0.3
[7] BiocParallel_1.24.1 ggplot2_3.3.2 amap_0.8-18
[10] digest_0.6.27 invgamma_1.1 GO.db_3.12.1
[13] SQUAREM_2020.5 magrittr_2.0.1 checkmate_2.0.0
[16] memoise_1.1.0 BSgenome_1.58.0 base64url_1.4
[19] limma_3.46.0 Biostrings_2.58.0 annotate_1.68.0
[22] systemPipeR_1.24.2 askpass_1.1 bdsmatrix_1.3-4
[25] prettyunits_1.1.1 jpeg_0.1-8.1 colorspace_2.0-0
[28] blob_1.2.1 rappdirs_0.3.1 apeglm_1.12.0
[31] ggrepel_0.8.2 dplyr_1.0.2 crayon_1.3.4
[34] RCurl_1.98-1.2 jsonlite_1.7.1 graph_1.68.0
[37] genefilter_1.72.0 brew_1.0-6 survival_3.2-7
[40] VariantAnnotation_1.36.0 glue_1.4.2 gtable_0.3.0
[43] zlibbioc_1.36.0 XVector_0.30.0 DelayedArray_0.16.0
[46] V8_3.4.0 Rgraphviz_2.34.0 scales_1.1.1
[49] pheatmap_1.0.12 mvtnorm_1.1-1 DBI_1.1.0
[52] edgeR_3.32.0 Rcpp_1.0.5 xtable_1.8-4
[55] progress_1.2.2 emdbook_1.3.12 bit_4.0.4
[58] rsvg_2.1 AnnotationForge_1.32.0 truncnorm_1.0-8
[61] httr_1.4.2 gplots_3.1.1 RColorBrewer_1.1-2
[64] ellipsis_0.3.1 pkgconfig_2.0.3 XML_3.99-0.5
[67] dbplyr_2.0.0 locfit_1.5-9.4 tidyselect_1.1.0
[70] rlang_0.4.9 AnnotationDbi_1.52.0 munsell_0.5.0
[73] tools_4.0.3 generics_0.1.0 RSQLite_2.2.1
[76] stringr_1.4.0 yaml_2.2.1 bit64_4.0.5
[79] caTools_1.18.0 purrr_0.3.4 RBGL_1.66.0
[82] xml2_1.3.2 biomaRt_2.46.0 compiler_4.0.3
[85] rstudioapi_0.13 curl_4.3 png_0.1-7
[88] geneplotter_1.68.0 tibble_3.0.4 stringi_1.5.3
[91] GenomicFeatures_1.42.1 lattice_0.20-41 Matrix_1.2-18
[94] vctrs_0.3.5 pillar_1.4.7 lifecycle_0.2.0
[97] data.table_1.13.2 bitops_1.0-6 irlba_2.3.3
[100] rtracklayer_1.50.0 R6_2.5.0 latticeExtra_0.6-29
[103] hwriter_1.3.2 ShortRead_1.48.0 KernSmooth_2.23-18
[106] MASS_7.3-53 gtools_3.8.2 assertthat_0.2.1
[109] DESeq2_1.30.0 openssl_1.4.3 Category_2.56.0
[112] rjson_0.2.20 withr_2.3.0 GenomicAlignments_1.26.0 [115] batchtools_0.9.14 Rsamtools_2.6.0 GenomeInfoDbData_1.2.4
[118] hms_0.5.3 grid_4.0.3 DOT_0.1
[121] coda_0.19-4 GreyListChIP_1.22.0 ashr_2.2-47
[124] mixsqp_0.3-43 bbmle_1.0.23.1 numDeriv_2016.8-1.1

ADD REPLY
0
Entering edit mode

In general you do not pass contrasts to dba.plotVenn(), you pass a mask designating 2, 3 or 4 samples. If you have two conditions with replicates, you probably need to make a consensus for each conditions first, then show their overlap, eg:

consDBA <- dba.peakset(myDBA, consensus=DBA_CONDITION)
dba.plotVenn(consDBA, consDBA$masks$Consensus)

If you include output of the DBA object (what print out if you just type the name of the object), I can be more specific.

ADD REPLY
0
Entering edit mode

Thank you so much Dr. Stark. I am pasting my plans of Venn diagrams as below.

enter image description here

Plan1:

Venn1, is the venn diagram of KWScr, KWsh5, NWScr_sb_sh5 and MWScr_sb_sh5.

Venn2, is the venn diagram of KKScr, KKsh5, NKScr_sb_sh5 and MKScr_sb_sh5.

Venn3, is the Venn diagram of commen peaks from Venn1 and Venn2.

Plan2 (just add some concerns on IgG into Plan1):

Venn1, is the venn diagram of 3 constrasts. Contrast1=KWScr vs RWScr , Contrast2=KWsh5 vs RWsh5, Contrast3=NWScr_sb_sh5 vs MWScr_sb_sh5.

Venn2, is the venn diagram of 3 constrasts. Contrast4=KKScr vs RKScr , Contrast5=KKsh5 vs RKsh5, Contrast6=NKScr_sb_sh5 vs MKScr_sb_sh5.

Venn3, is the Venn diagram of commen peaks from Venn1 and Venn2.

Venn4, is the Venn diagram of Contrasts1-6.

And I found dba.plotVenn(anaKRWnmlwcst2,contrast=1:2,method=DBA_ALL_METHODS_BLOCK)works but dba.plotVenn(anaKRWnmlwcst2,contrast=1:2:3,method=DBA_ALL_METHODS_BLOCK) or dba.plotVenn(anaKRWnmlwcst2,contrast=1:2,1:3,2:3,method=DBA_ALL_METHODS_BLOCK)does not work.

ADD REPLY
0
Entering edit mode

I have hitherto found contrast=c(1,2,3) works. Cheers! But meanwhile I found if more rows were added to DBA to generate new plotvenn, those previous low peak numbers would be recalculated and even to zero. Could I generate Venn diagram from more than one DBA? BTW, I also tried dba.peakset(), but it showed "DBA object is already formed from a consensus peakset!" and pdba.plotVenn(anaKRNMWnmlwcst3, anaKRNMWnmlwcst3$masks$Consensus) gave "error Too many peaksets in mask." I will retry without contrasts steps.

ADD REPLY

Login before adding your answer.

Traffic: 524 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