changeset 2:c70c9dc2efb7

Incorporated changes to suppress stderr messages from samtools calls (borrowed style from galaxy-central tool config)
author Lance Parsons <lparsons@princeton.edu>
date Thu, 22 Dec 2011 12:03:14 -0500
parents 17c497d5826d
children 72bdc513a54a
files freebayes.xml
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/freebayes.xml	Fri Nov 11 17:05:24 2011 -0500
+++ b/freebayes.xml	Thu Dec 22 12:03:14 2011 -0500
@@ -12,26 +12,27 @@
         exit 2; fi;
 
     #if $genomeSource.refGenomeSource == "history":
-        ln -s "$genomeSource.ownFile" localref.fa;
+        ln -s "$genomeSource.ownFile" localref.fa &amp;&amp;
     #else:
-        ln -s "${ filter( lambda x: str( x[0] ) == str( $genomeSource.index ), $__app__.tool_data_tables[ 'all_fasta' ].get_fields() )[0][-1] }" localref.fa;
+        ln -s "${ filter( lambda x: str( x[0] ) == str( $genomeSource.index ), $__app__.tool_data_tables[ 'all_fasta' ].get_fields() )[0][-1] }" localref.fa &amp;&amp;
     #end if
-    samtools faidx localref.fa;
+    samtools faidx localref.fa 2&gt;&amp;1 || echo "Error running samtools faidx for FreeBayes" &gt;&amp;2 &amp;&amp;
 
     #if ($params.source_select == "full") and (str($params.baqAdjustment) == 'true')
-	samtools fillmd -Arb ${bamfile} localref.fa > localbam.bam;
+	    samtools fillmd -Arb ${bamfile} localref.fa > localbam.bam 2&gt;&amp;1 || echo "Error running samtools fillmd for FreeBayes" &gt;&amp;2 &amp;&amp;
     #else
-	ln -s ${bamfile} localbam.bam;
+	    ln -s ${bamfile} localbam.bam &amp;&amp;
     #end if
-    samtools index localbam.bam;
+    
+    samtools index localbam.bam 2&gt;&amp;1 || echo "Error running samtools index for FreeBayes" &gt;&amp;2 &amp;&amp;
 
     #for $i, $b in enumerate($bamfiles)
     	#if ($params.source_select == "full") and (str($params.baqAdjustment) == 'true')
-	   samtools fillmd -Arb ${b.additional_bamfile} localref.fa > localbam_${i}.bam;
+	       samtools fillmd -Arb ${b.additional_bamfile} localref.fa > localbam_${i}.bam 2&gt;&amp;1 || echo "Error running samtools fillmd for FreeBayes" &gt;&amp;2 &amp;&amp;
     	#else
-	   ln -s ${b.additional_bamfile} localbam_${i}.bam;
+	       ln -s ${b.additional_bamfile} localbam_${i}.bam &amp;&amp;
     	#end if
-	samtools index localbam_${i}.bam;
+	   samtools index localbam_${i}.bam 2&gt;&amp;1 || echo "Error running samtools index for FreeBayes" &gt;&amp;2 &amp;&amp;
     #end for
 
     freebayes localbam*.bam --fasta-reference localref.fa --vcf $output