DiffBind analysis for ATAC-Seq error Error processing one or more read files
1
0
Entering edit mode
Asma • 0
@asma-24876
Last seen 5 weeks ago
Canada

I want to find differential list of genomic sites that are unique and shared between the the 3 treg conditions (WT, ON, OFF) with 2 replicates per group (TREG-WT-1, TREG-WT-2; TREG-ON-1, TREG-ON-2; TREG-OFF-1, TREG-OFF-2) .

Here is the sample sheet provided:

11_Treg,WT,1,11_Treg_S7_L001_R1_001.trim.merged.bam,11_Treg_S7_L001_R1_001.trim.merged.nodup.no_chrM_MT.tn5.pval0.01.300K.bfilt.narrowPeak.gz,narrow 12_Treg,WT,2,12_Treg_S8_L001_R1_001.trim.merged.bam,12_Treg_S8_L001_R1_001.trim.merged.nodup.no_chrM_MT.tn5.pval0.01.300K.bfilt.narrowPeak.gz,narrow 51F_Treg,ON,1,51F_Treg_S9_L001_R1_001.trim.merged.bam,51F_Treg_S9_L001_R1_001.trim.merged.nodup.no_chrM_MT.tn5.pval0.01.300K.bfilt.narrowPeak.gz,narrow ON2_Treg,ON,2,ON2_Treg_S10_L001_R1_001.trim.merged.bam,ON2_Treg_S10_L001_R1_001.trim.merged.nodup.no_chrM_MT.tn5.pval0.01.300K.bfilt.narrowPeak.gz,narrow 91F_Treg,OFF,1,91F_Treg_S28_L002_R1_001.trim.merged.bam,91F_Treg_S28_L002_R1_001.trim.merged.nodup.no_chrM_MT.tn5.pval0.01.300K.bfilt.narrowPeak.gz,narrow 96F_Treg,OFF,2,96F_Treg_S29_L002_R1_001.trim.merged.bam,96F_Treg_S29_L002_R1_001.trim.merged.nodup.no_chrM_MT.tn5.pval0.01.300K.bfilt.narrowPeak.gz,narrow

Here is the code for DiffBind Analysis

library(DiffBind)

treg=dba(sampleSheet="PS_Treg_atacseq-1.csv")
treg=dba.count(treg,bUseSummarizeOverlaps=TRUE)
treg=dba.contrast(treg,categories=DBA_FACTOR,minMembers=2)
treg=dba.analyze(treg,method=DBA_ALL_METHODS)
treg.DB=dba.report(treg)
saveRDS(treg.DB,"treg.DB.rds")

I get the following error when I run the code above:

Error: Error processing one or more read files. Check warnings().
In addition: Warning messages:
1: In mclapply(arglist, fn, ..., mc.preschedule = TRUE, mc.allow.recursive = TRUE) :
  all scheduled cores encountered errors in user code
2:   subsetting operation 
3:   subsetting operation 
4:   subsetting operation 
5:   subsetting operation 
Execution halted
 [1] DiffBind_3.0.13             SummarizedExperiment_1.20.0
 [3] Biobase_2.50.0              MatrixGenerics_1.2.1       
 [5] matrixStats_0.58.0          GenomicRanges_1.42.0       
 [7] GenomeInfoDb_1.26.2         IRanges_2.24.1             
 [9] S4Vectors_0.28.1            BiocGenerics_0.36.0        

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

I also used bParallel=FALSE in count and received the following error

Computing summits...
Sample: 11_12_Treg/align/rep1/11_Treg_S7_L001_R1_001.trim.merged.nodup.no_chrM_MT.bam125 
Sample: 11_12_Treg/align/rep2/12_Treg_S8_L001_R1_001.trim.merged.nodup.no_chrM_MT.bam125 
Sample: 51F_ON2_Treg/align/rep1/51F_Treg_S9_L001_R1_001.trim.merged.nodup.no_chrM_MT.bam125 
Sample: 51F_ON2_Treg/align/rep2/ON2_Treg_S10_L001_R1_001.trim.merged.nodup.no_chrM_MT.bam125 
Sample: 91F_96F_Treg/align/rep1/91F_Treg_S28_L002_R1_001.trim.merged.nodup.no_chrM_MT.bam125 
Sample: 91F_96F_Treg/align/rep2/96F_Treg_S29_L002_R1_001.trim.merged.nodup.no_chrM_MT.bam125 
Re-centering peaks...
Reads will be counted as Paired-end.
Sample: 11_12_Treg/align/rep1/11_Treg_S7_L001_R1_001.trim.merged.nodup.no_chrM_MT.bam125 
Error in validObject(x) : invalid class “GAlignments” object: 
    'mcols(x)' is not parallel to 'x'
Calls: dba.count ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
In addition: Warning message:
In .make_GAlignmentPairs_from_GAlignments(gal, strandMode = strandMode,  :
    34113122 alignments with ambiguous pairing were dumped.
    Use 'getDumpedAlignments()' to retrieve them from the dump environment.
Execution halted

Could you please help me understand the cause of this error? I did not get any errors while aligning data.

ATACSeq DiffBind • 1.9k views
ADD COMMENT
0
Entering edit mode

The DiffBind maintainer will probably answer. In the meantime what is the output of warnings(), and at which step of the listed ones does it crash?

ADD REPLY
0
Entering edit mode

crashes at the count step.

ADD REPLY
0
Entering edit mode

I re-ran the analysis with just the WT and ON samples and I get similar kind of errors:

Error: Error processing one or more read files. Check warnings(). In addition: Warning messages: 1: In mclapply(arglist, fn, ..., mc.preschedule = TRUE, mc.allow.recursive = TRUE) : all scheduled cores encountered errors in user code 2: 'mcols(x)' is not parallel to 'x' 3: 'mcols(x)' is not parallel to 'x' 4: 'mcols(x)' is not parallel to 'x' 5: 'mcols(x)' is not parallel to 'x' Execution halted

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

There error is coming out of the GenomicAlignments library -- there are ambiguities with the paired-end alignments in the bam files. Have a a look at the help page:

library(GenomicAlignments)
?findMateAlignment

You can also set bUseSummarizeOverlaps=FALSE in the call to dba.count() to see if that works (it will count each read separately).

ADD COMMENT

Login before adding your answer.

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