Sam header suppression made optional in BFAST and default set to off for BFAST and Bowtie. Fixed dbkey setting on outputs for for BFAST, Bowtie, Mosaik. Fixed sorting of built-in builds for these tools so ordered by pretty name.

This commit is contained in:
Kelly Vincent
2011-05-09 12:11:54 -04:00
parent 772da79c12
commit 0017486eaa
6 changed files with 72 additions and 33 deletions
+1
View File
@@ -37,6 +37,7 @@ usage: bfast_wrapper.py [options]
-R, --reverse=R: paired end reads are given on reverse strands
-z, --random=z: output a random best scoring alignment
-D, --dbkey=D: Dbkey for reference genome
-H, --suppressHeader=H: Suppress the sam header
"""
import optparse, os, shutil, subprocess, sys, tempfile
+22 -17
View File
@@ -1,4 +1,4 @@
<tool id="bfast_wrapper" name="Map with BFAST" version="0.1.2">
<tool id="bfast_wrapper" name="Map with BFAST" version="0.1.3">
<description></description>
<command interpreter="python">bfast_wrapper.py
--numThreads="4" ##HACK: hardcode numThreads for now, should come from a location file
@@ -64,7 +64,7 @@
<options from_data_table="bfast_indexes">
<filter type="multiple_splitter" column="2" separator=","/>
<filter type="param_value" column="2" ref="input1" ref_attribute="extension"/>
<filter type="sort_by" column="1"/>
<filter type="sort_by" column="3"/>
<validator type="no_options" message="No indexes are available for the selected input dataset"/>
</options>
</param>
@@ -112,11 +112,11 @@
<param name="keySize" type="integer" value="-1" label="Truncate key size in 'match'" help="Set this to reduce the effective key size of all indexes in 'bfast match' (advanced users only)" />
<param name="maxKeyMatches" type="integer" value="8" label="The maximum number of matches to allow before a key is ignored" help="Lower values will result in more unique regions being examined, while larger values will allow include repetitive regions" />
<param name="maxNumMatches" type="integer" value="384" label="The maximum number of matches to allow before a read is discarded" help="Larger values will allow more hits to be examined" />
<param name="whichStrand" type="select" label="The strands to consider" help="Both strands, forward strand only, or reverse strand only">
<option value="0">Both strands</option>
<option value="1">Forward strand only</option>
<option value="2">Reverse strand only</option>
</param>
<param name="whichStrand" type="select" label="The strands to consider" help="Both strands, forward strand only, or reverse strand only">
<option value="0">Both strands</option>
<option value="1">Forward strand only</option>
<option value="2">Reverse strand only</option>
</param>
<param name="scoringMatrixFileName" type="data" format="text" optional="True" label="Scoring Matrix file used to score the alignments" help="See BFAST manual for file format requirements. (advanced users only)"/>
<param name="ungapped" type="boolean" truevalue="--ungapped" falsevalue="" checked="no" label="Perform ungapped local alignment" help="Performing ungapped local alignment will not consider indels while providing a significant speed increase" />
@@ -124,8 +124,8 @@
<param name="offset" type="integer" value="20" label="The number of bases before and after each hit to consider in local alignment" help="Larger values will allow for larger insertions and deletions to be detected at the cost of speed" />
<param name="avgMismatchQuality" type="integer" value="10" label="The average mismatch quality" help="This can be used as a scaling factor for mapping quality (advanced users only)" />
<conditional name="localalign_params">
<param name="algorithm" type="select" label="The post processing algorithm" help="This determines how reads with multiple candidate alignments are returned. Unique alignments will return an alignment if the read has only one candidate alignment. Uniquely best scoring alignments will return one alignment for a read if that alignment has a better alignment score than the rest of the candidate alignments. All best scoring alignments will return all alignments that have the best alignment score for a read.">
<conditional name="localalign_params">
<param name="algorithm" type="select" label="The post processing algorithm" help="This determines how reads with multiple candidate alignments are returned. Unique alignments will return an alignment if the read has only one candidate alignment. Uniquely best scoring alignments will return one alignment for a read if that alignment has a better alignment score than the rest of the candidate alignments. All best scoring alignments will return all alignments that have the best alignment score for a read.">
<option value="0" selected="True">No filtering</option>
<option value="1">All alignments that pass filtering</option>
<option value="2">Unique alignments</option>
@@ -154,19 +154,24 @@
</when>
</conditional>
<param name="suppressHeader" type="boolean" truevalue="--suppressHeader" falsevalue="" checked="True" label="Suppress the header in the output SAM file" help="BFAST produces SAM with several lines of header information" />
<param name="suppressHeader" type="boolean" truevalue="--suppressHeader" falsevalue="" checked="False" label="Suppress the header in the output SAM file" help="BFAST produces SAM with several lines of header information" />
</inputs>
<outputs>
<data format="sam" name="output">
<data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads">
<actions>
<conditional name="refGenomeSource.refGenomeSource_type">
<when value="indexed">
<action type="metadata" name="dbkey">
<option type="from_data_table" column="1" name="bfast_indexes">
<filter type="param_value" ref="refGenomeSource.indices" column="0"/>
<filter type="param_value" ref="refGenomeSource.indices" column="0" />
</option>
</action>
</when>
<when value="history">
<action type="metadata" name="dbkey">
<option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
</action>
</when>
</conditional>
</actions>
</data>
@@ -332,9 +337,9 @@ For **postprocess**::
<param name="mask" value="111111111111111111" />
<param name="hash_width" value="14" />
<param name="source_select" value="pre_set" />
<param name="suppressHeader" value="False" />
<param name="indexing_repeatmasker" value="False" />
<param name="indexing_option_selector" value="default" />
<param name="suppressHeader" value="" />
<output name="output" ftype="sam" file="bfast_out1.sam" />
</test>
<test>
@@ -344,10 +349,10 @@ For **postprocess**::
<param name="mask" value="111111111111111111" />
<param name="hash_width" value="14" />
<param name="source_select" value="pre_set" />
<param name="suppressHeader" value="True" />
<param name="indexing_repeatmasker" value="False" />
<param name="indexing_option_selector" value="default" />
<output name="output" ftype="sam" file="bfast_out1.sam" lines_diff="3" /><!-- 3 headers exist in compare file, but headers are suppressed -->
<param name="suppressHeader" value="--suppressHeader" />
<output name="output" ftype="sam" file="bfast_out1.sam" lines_diff="3" /><!-- 3 headers exist in compare file, but headers are suppressed -->
</test>
<test>
<param name="input1" ftype="fastqcssanger" value="random_phiX_1.fastqcssanger" />
@@ -356,9 +361,9 @@ For **postprocess**::
<param name="mask" value="111111111111111111" />
<param name="hash_width" value="14" />
<param name="source_select" value="pre_set" />
<param name="suppressHeader" value="False" />
<param name="indexing_repeatmasker" value="False" />
<param name="indexing_option_selector" value="default" />
<param name="suppressHeader" value="" />
<output name="output" ftype="sam" file="bfast_out2.sam" />
</test>
<!-- test of pre-indexed data now -->
@@ -367,7 +372,7 @@ For **postprocess**::
<param name="refGenomeSource_type" value="indexed" />
<param name="indices" value="phiX_nt_50" />
<param name="source_select" value="pre_set" />
<param name="suppressHeader" value="False" />
<param name="suppressHeader" value="" />
<output name="output" ftype="sam" file="bfast_out3.sam" lines_diff="2" /><!-- MD:Z:11T38 instead of MD:Z:50 on one line-->
</test>
</tests>
+12 -4
View File
@@ -1,4 +1,4 @@
<tool id="bowtie_color_wrapper" name="Map with Bowtie for SOLiD" version="1.1.1">
<tool id="bowtie_color_wrapper" name="Map with Bowtie for SOLiD" version="1.1.2">
<requirements><requirement type='package'>bowtie</requirement></requirements>
<description></description>
<command interpreter="python">
@@ -138,7 +138,10 @@
</param>
<when value="indexed">
<param name="index" type="select" label="Select the reference genome" help="if your genome of interest is not listed - contact Galaxy team">
<options from_data_table="bowtie_indexes_color"/>
<options from_data_table="bowtie_indexes_color">
<filter type="sort_by" column="2" />
<validator type="no_options" message="No indexes are available" />
</options>
</param>
</when>
<when value="history">
@@ -333,7 +336,7 @@
</conditional> <!-- pParams -->
</when> <!-- paired -->
</conditional> <!-- singlePaired -->
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="true" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
</inputs>
<outputs>
<data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads">
@@ -341,12 +344,17 @@
<conditional name="refGenomeSource.genomeSource">
<when value="indexed">
<action type="metadata" name="dbkey">
<option type="from_file" name="bowtie_indices_color.loc" column="1" offset="0">
<option type="from_data_table" name="bowtie_indexes_color" column="1" offset="0">
<filter type="param_value" column="0" value="#" filter_by="startswith" keep="False"/>
<filter type="param_value" ref="refGenomeSource.index" column="0"/>
</option>
</action>
</when>
<when value="history">
<action type="metadata" name="dbkey">
<option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
</action>
</when>
</conditional>
</actions>
</data>
+1 -1
View File
@@ -2,7 +2,7 @@
"""
Runs Bowtie on single-end or paired-end data.
For use with Bowtie v. 0.12.3
For use with Bowtie v. 0.12.7
usage: bowtie_wrapper.py [options]
-t, --threads=t: The number of threads to run
+12 -4
View File
@@ -1,4 +1,4 @@
<tool id="bowtie_wrapper" name="Map with Bowtie for Illumina" version="1.1.1">
<tool id="bowtie_wrapper" name="Map with Bowtie for Illumina" version="1.1.2">
<requirements><requirement type='package'>bowtie</requirement></requirements>
<description></description>
<parallelism method="basic"></parallelism>
@@ -136,7 +136,10 @@
</param>
<when value="indexed">
<param name="index" type="select" label="Select a reference genome" help="if your genome of interest is not listed - contact Galaxy team">
<options from_data_table="bowtie_indexes"/>
<options from_data_table="bowtie_indexes">
<filter type="sort_by" column="2" />
<validator type="no_options" message="No indexes are available" />
</options>
</param>
</when>
<when value="history">
@@ -325,7 +328,7 @@
</conditional> <!-- pParams -->
</when> <!-- paired -->
</conditional> <!-- singlePaired -->
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="True" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
<param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
</inputs>
<outputs>
<data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads">
@@ -333,12 +336,17 @@
<conditional name="refGenomeSource.genomeSource">
<when value="indexed">
<action type="metadata" name="dbkey">
<option type="from_file" name="bowtie_indices.loc" column="1" offset="0">
<option type="from_data_table" name="bowtie_indexes" column="1" offset="0">
<filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
<filter type="param_value" ref="refGenomeSource.index" column="0"/>
</option>
</action>
</when>
<when value="history">
<action type="metadata" name="dbkey">
<option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
</action>
</when>
</conditional>
</actions>
</data>
+24 -7
View File
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<tool id="mosaik_wrapper" name="Map with Mosaik" version="1.1.0021">
<tool id="mosaik_wrapper" name="Map with Mosaik" version="1.1.1">
<description/>
<requirements><requirement type="package">mosaik</requirement></requirements>
<command>
@@ -38,13 +38,13 @@
<when value="indexed">
<param name="indexReference" type="select" label="Select a reference genome">
<options from_data_table="mosaik_indexes">
<filter type="sort_by" column="3"/>
<validator type="no_options" message="No indexes are available for the selected input dataset"/>
<filter type="sort_by" column="2"/>
<validator type="no_options" message="No indexes are available" />
</options>
</param>
</when>
<when value="history">
<param format="fasta" name="historyReference" type="data" label="Select a reference from history"/>
<param format="fasta" name="historyReference" type="data" metadata_name="dbkey" label="Select a reference from history"/>
</when>
</conditional>
<param format="fastq" name="reads" type="data" label="Fastq Reads File"/>
@@ -77,9 +77,26 @@
</inputs>
<outputs>
<data format="sam" name="output">
<change_format>
<when input="outFormat" value="bam" format="bam"/>
</change_format>
<change_format>
<when input="outFormat" value="bam" format="bam" />
</change_format>
<actions>
<conditional name="genomeSource.refGenomeSource">
<when value="indexed">
<action type="metadata" name="dbkey">
<option type="from_data_table" name="mosaik_indexes" column="1">
<filter type="param_value" column="0" value="#" compare="startswith" keep="False" />
<filter type="param_value" ref="genomeSource.indexReference" column="0" />
</option>
</action>
</when>
<when value="history">
<action type="metadata" name="dbkey">
<option type="from_param" name="genomeSource.historyReference" param_attribute="dbkey" />
</action>
</when>
</conditional>
</actions>
</data>
</outputs>
<tests>