# HG changeset patch
# User bgruening
# Date 1389863836 18000
# Node ID b1b96b6ed60c0b6b87ef4f32caa9b456167bd05a
# Parent 20c431b4cf746deda190cc84cf27739779bfdaaa
Uploaded
diff -r 20c431b4cf74 -r b1b96b6ed60c diffbind.R
--- a/diffbind.R Tue Jan 14 18:07:20 2014 -0500
+++ b/diffbind.R Thu Jan 16 04:17:16 2014 -0500
@@ -30,7 +30,6 @@
library('DiffBind')
# used to save to BED, GFF or WIG format
-library('rtracklayer')
if ( !is.null(opt$plots) ) {
pdf(opt$plots)
@@ -39,12 +38,14 @@
sample = dba(sampleSheet=opt$infile, peakFormat='bed')
sample_count = dba.count(sample)
-sample_contrast = dba.contrast(sample_count, categories=DBA_CONDITION)
+sample_contrast = dba.contrast(sample_count, categories=DBA_CONDITION, minMembers=2)
sample_analyze = dba.analyze(sample_contrast)
diff_bind = dba.report(sample_analyze)
-
+orvals = dba.plotHeatmap(sample_analyze, contrast=1, correlations=FALSE)
-export(diff_bind, opt$outfile, format=opt$format)
+resSorted <- diff_bind[order(diff_bind$FDR),]
+write.table(as.data.frame(resSorted), file = opt$outfile, sep="\t", quote = FALSE, append=TRUE, row.names = FALSE, col.names = FALSE)
+
dev.off()
sessionInfo()
diff -r 20c431b4cf74 -r b1b96b6ed60c diffbind.xml
--- a/diffbind.xml Tue Jan 14 18:07:20 2014 -0500
+++ b/diffbind.xml Thu Jan 16 04:17:16 2014 -0500
@@ -7,14 +7,22 @@
deseq2
diffbind
-
- diffbind.R
+
+ ## seems that diffbind also needs file extensions to work properly
+ #set $counter = 1
+ #for $sample in $samples:
+ ln -s $sample.bamreads #echo str($counter) + "_bamreads.bam"# &&
+ ln -s ${sample.bamreads.metadata.bam_index} #echo str($counter) + "_bamreads.bai"# &&
+ ln -s $sample.bamcontrol #echo str($counter) + "_bamcontrol.bam"# &&
+ ln -s ${sample.bamcontrol.metadata.bam_index} #echo str($counter) + "_bamcontrol.bai"# &&
+ #set $counter = $counter + 1
+ #end for
+
+ Rscript /usr/local/galaxy/shed_tools/testtoolshed.g2.bx.psu.edu/repos/bgruening/diffbind/7929c8b3f6f9/diffbind/diffbind.R
-i $infile
-o $outfile
-p $plots
-f $format
- ;
- cat $infile;
SampleID,Tissue,Factor,Condition,Replicate,bamReads,bamControl,Peaks
+#set $counter = 1
#for $sample in $samples:
-$sample.sample_id,$sample.tissue,$sample.factor,$sample.condition,$sample.replicate,$sample.bamreads,$sample.bamcontrol,$sample.peaks
+$sample.sample_id,$sample.tissue,$sample.factor,$sample.condition,$sample.replicate,#echo str($counter) + '_bamreads.bam'#,#echo str($counter) + '_bamcontrol.bam'#,$sample.peaks
+#set $counter = $counter + 1
#end for
diff -r 20c431b4cf74 -r b1b96b6ed60c tool_dependencies.xml
--- a/tool_dependencies.xml Tue Jan 14 18:07:20 2014 -0500
+++ b/tool_dependencies.xml Thu Jan 16 04:17:16 2014 -0500
@@ -31,10 +31,6 @@
https://github.com/bgruening/download_store/raw/master/DiffBind-1_8_3/zlibbioc_1.8.0.tar.gz
https://github.com/bgruening/download_store/raw/master/DiffBind-1_8_3/Rsamtools_1.14.2.tar.gz
https://github.com/bgruening/download_store/raw/master/DiffBind-1_8_3/DiffBind_1.8.3.tar.gz
- https://github.com/bgruening/download_store/raw/master/DiffBind-1_8_3/XML_3.98-1.1.tar.gz
- https://github.com/bgruening/download_store/raw/master/DiffBind-1_8_3/BSgenome_1.30.0.tar.gz
- https://github.com/bgruening/download_store/raw/master/DiffBind-1_8_3/RCurl_1.95-4.1.tar.gz
- https://github.com/bgruening/download_store/raw/master/DiffBind-1_8_3/rtracklayer_1.22.0.tar.gz
https://github.com/bgruening/download_store/raw/master/DiffBind-1_8_3/getopt_1.20.0.tar.gz