I'm now using DiffBind R package to conduct differential analysis for ATAC-seq dataset.
In this analysis, I want to compare each cell type in two conditions, so I divided the general sheet into enclosed sheets with different cell names and put them into DiffBind analysis (script: diff.R, diff.sh). It shows the following errors: (enclosed diff.sh.e8513532)
diff.R
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) library(DiffBind) setwd("/Simon/project/ATAC-seq/DiffBind") ta <- dba(sampleSheet = basename(args[1])) ta <- dba.count(ta) ta = dba.contrast(ta, categories=DBA_CONDITION) ta = dba.analyze(ta, method=DBA_DESEQ2) ta.DB = dba.report(ta, contrast=1, th=.01, method=DBA_DESEQ2, bCounts=TRUE) fname = basename(args[1]) pdf(file=paste(fname, "_plotCorr.pdf", sep = "",collapse = NULL )) plot(ta) dev.off()
diff.sh
#!/bin/bash -l module load R/3.3.2 for filename in /ATAC-seq/DiffBind/*diffSheet.csv ; do Rscript diff.R "$filename" done
diff.sh.e8513532
32_B Blood D 1 narrow
33_B Blood D 1 narrow
36_B Blood D 1 narrow
37_B Blood D 1 narrow
38_B Blood ND 1 narrow
30_B Blood ND 1 narrow
54_B Blood D 1 narrow
58_B Blood ND 1 narrow
63_B Blood D 1 narrow
converting counts to integer mode
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
Warning message:
No sites above threshold
Error in pv.getPlotData(DBA, attributes = attributes, contrast = contrast, :
Unable to plot -- no sites within threshold
Calls: dba.plotHeatmap -> pv.getPlotData
Execution halted
Thanks!
I'll try to recall peak with BAMPE argument and redo the DiffBind. Thanks!
Hi Rory,
Another question, how could I eliminate the batch effect between samples and normalize them in DiffBind? Thanks!
Discussion in issue: A: DiffBind Batch Effect