Mercurial > repos > lparsons > freebayes
comparison freebayes.xml @ 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 | afb722f09cc1 |
children | 72bdc513a54a |
comparison
equal
deleted
inserted
replaced
1:17c497d5826d | 2:c70c9dc2efb7 |
---|---|
10 if [ "`freebayes -h | grep [Vv]ersion | awk '{print \$2}'`" != "0.9.0" ]; then | 10 if [ "`freebayes -h | grep [Vv]ersion | awk '{print \$2}'`" != "0.9.0" ]; then |
11 echo "Freebayes version installed is not compatible with this version of the Galaxy wrapper (requires '0.9.0')." >&2; | 11 echo "Freebayes version installed is not compatible with this version of the Galaxy wrapper (requires '0.9.0')." >&2; |
12 exit 2; fi; | 12 exit 2; fi; |
13 | 13 |
14 #if $genomeSource.refGenomeSource == "history": | 14 #if $genomeSource.refGenomeSource == "history": |
15 ln -s "$genomeSource.ownFile" localref.fa; | 15 ln -s "$genomeSource.ownFile" localref.fa && |
16 #else: | 16 #else: |
17 ln -s "${ filter( lambda x: str( x[0] ) == str( $genomeSource.index ), $__app__.tool_data_tables[ 'all_fasta' ].get_fields() )[0][-1] }" localref.fa; | 17 ln -s "${ filter( lambda x: str( x[0] ) == str( $genomeSource.index ), $__app__.tool_data_tables[ 'all_fasta' ].get_fields() )[0][-1] }" localref.fa && |
18 #end if | 18 #end if |
19 samtools faidx localref.fa; | 19 samtools faidx localref.fa 2>&1 || echo "Error running samtools faidx for FreeBayes" >&2 && |
20 | 20 |
21 #if ($params.source_select == "full") and (str($params.baqAdjustment) == 'true') | 21 #if ($params.source_select == "full") and (str($params.baqAdjustment) == 'true') |
22 samtools fillmd -Arb ${bamfile} localref.fa > localbam.bam; | 22 samtools fillmd -Arb ${bamfile} localref.fa > localbam.bam 2>&1 || echo "Error running samtools fillmd for FreeBayes" >&2 && |
23 #else | 23 #else |
24 ln -s ${bamfile} localbam.bam; | 24 ln -s ${bamfile} localbam.bam && |
25 #end if | 25 #end if |
26 samtools index localbam.bam; | 26 |
27 samtools index localbam.bam 2>&1 || echo "Error running samtools index for FreeBayes" >&2 && | |
27 | 28 |
28 #for $i, $b in enumerate($bamfiles) | 29 #for $i, $b in enumerate($bamfiles) |
29 #if ($params.source_select == "full") and (str($params.baqAdjustment) == 'true') | 30 #if ($params.source_select == "full") and (str($params.baqAdjustment) == 'true') |
30 samtools fillmd -Arb ${b.additional_bamfile} localref.fa > localbam_${i}.bam; | 31 samtools fillmd -Arb ${b.additional_bamfile} localref.fa > localbam_${i}.bam 2>&1 || echo "Error running samtools fillmd for FreeBayes" >&2 && |
31 #else | 32 #else |
32 ln -s ${b.additional_bamfile} localbam_${i}.bam; | 33 ln -s ${b.additional_bamfile} localbam_${i}.bam && |
33 #end if | 34 #end if |
34 samtools index localbam_${i}.bam; | 35 samtools index localbam_${i}.bam 2>&1 || echo "Error running samtools index for FreeBayes" >&2 && |
35 #end for | 36 #end for |
36 | 37 |
37 freebayes localbam*.bam --fasta-reference localref.fa --vcf $output | 38 freebayes localbam*.bam --fasta-reference localref.fa --vcf $output |
38 #if $params.source_select == "full": | 39 #if $params.source_select == "full": |
39 -T $params.theta | 40 -T $params.theta |