Skip to content
Snippets Groups Projects
Commit be305349 authored by Beibei Chen's avatar Beibei Chen
Browse files

runDiffBind output bed format

parent 93d4ec93
Branches
Tags
1 merge request!1Merge develop into master
......@@ -24,6 +24,8 @@ process peakanno {
script:
"""
module load R/3.2.1-intel
module load deeptools/2.5.3
module load python/2.7.x-anaconda
python $baseDir/scripts/process.py
#Rscript /project/BICF/BICF_Core/bchen4/chipseq_analysis/workflow/scripts/runchipseeker.R
"""
......
......@@ -57,9 +57,9 @@ def run_signal(files, labels, genome):
#work_pool.join()
cm_command = "computeMatrix scale-regions -R "+gene_bed+" -a 3000 -b 3000 --regionBodyLength 5000 --skipZeros -S *.bw -o samples.deeptools_generegionscalematrix.gz"
p = subprocess.Popen(cm_command, shell=True)
p.communicate()
hm_command = "plotHeatmap -m samples.deeptools_generetionscalematrix.gz -out samples.deeptools_readsHeatmap.png"
#p = subprocess.Popen(cm_command, shell=True)
#p.communicate()
hm_command = "plotHeatmap -m samples.deeptools_generegionscalematrix.gz -out samples.deeptools_readsHeatmap.png"
p = subprocess.Popen(hm_command, shell=True)
p.communicate()
......
library("DiffBind")
#build dba object from sample sheet and do analysis
data <- dba(sampleSheet="samplesheet.csv")
args <- commandArgs(TRUE)
data <- dba(sampleSheet=args[1])
data <- dba.count(data)
data <- dba.contrast(data, minMembers = 2, categories=DBA_CONDITION)
data <- dba.analyze(data)
......@@ -23,8 +24,11 @@ write.table(as.data.frame(normcount),"diffbind.normcount.txt",sep="\t",quote=F,r
for (i in c(1:length(data$contrasts)))
{
contrast_name = paste(data$contrasts[[i]]$name1,"vs",
data$contrasts[[i]]$name2,"diffbind.xls",sep="_")
contrast_bed_name = paste(data$contrasts[[i]]$name1,"vs",
data$contrasts[[i]]$name2,"diffbind.bed",sep="_")
report <- dba.report(data, contrast=i, th=1, bCount=TRUE)
write.table(as.data.frame(report),contrast_name,sep="\t",quote=F,row.names=F)
write.table(as.data.frame(report),contrast_bed_name,sep="\t",quote=F,row.names=F, col.names=F)
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment