diff --git a/workflow/main.nf b/workflow/main.nf index 276672255016fba1a07e86a3bb62c571d56d38f4..ffdf4d8d5feedb6bf751ae3199574e3c520d9344 100644 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -23,9 +23,9 @@ process peakanno { // set peak_id, file("${pattern}_annotation.xls"), file("${pattern}_peakTssDistribution.png") into peakanno script: """ + module load python/2.7.x-anaconda 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 """ diff --git a/workflow/scripts/runDiffBind.R b/workflow/scripts/runDiffBind.R index 266fea72f3b16b595f98d08405244569babdb471..d6e88d121dd5e412415c5cc73e404fbe97d4102c 100644 --- a/workflow/scripts/runDiffBind.R +++ b/workflow/scripts/runDiffBind.R @@ -24,11 +24,15 @@ 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", - contrast_bed_name = paste(data$contrasts[[i]]$name1,"vs", + #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) + report <- as.data.frame(report) + print(head(report)) + colnames(report)[1:5]<-c("chrom","peak_start","peak_stop","peak_width","peak_strand") + print(head(report)) + write.table(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) }