Mercurial > repos > jjohnson > mothur_toolsuite
view mothur/tools/mothur/sub.sample.xml @ 35:95d75b35e4d2
Updated tools to use Mothur 1.33. Added some misc. fixes and updates (blast repository, tool fixes)
author | certain cat |
---|---|
date | Fri, 31 Oct 2014 15:09:32 -0400 |
parents | 49058b1f8d3f |
children |
line wrap: on
line source
<tool id="mothur_sub_sample" name="Sub.sample" version="1.23.0"> <description>Create a sub sample</description> <command interpreter="python"> mothur_wrapper.py ## output {group_file_name}.pick.{label}.groups {list_file_name}.pick.{label}.list #import re, os.path #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__] --cmd='sub.sample' --outputdir='$logfile.extra_files_path' #if $input.format == "fasta": --fasta=$input.fasta_in #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.fasta_in.__str__)) + ":'" + $fasta_out.__str__] #if $input.name_in.__str__ != "None" and len($input.name_in.__str__) > 0: --name=$input.name_in #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.name_in.__str__)) + ":'" + $names_out.__str__] #end if #if $input.use_group.to_filter == "yes": #if $input.use_group.group_in.__str__ != "None" and len($input.use_group.group_in.__str__) > 0: --group=$input.use_group.group_in #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.use_group.group_in.__str__)) + ":'" + $group_out.__str__] #if $input.use_group.groups.__str__ != "None" and len($input.use_group.groups.__str__) > 0: --groups=$input.use_group.groups #end if $input.use_group.persample #end if #end if #elif $input.format == "list": --list=$input.otu_in #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.otu_in.__str__)) + ":'" + $list_out.__str__] #if $input.use_group.to_filter == "yes": #if $input.use_group.group_in.__str__ != "None" and len($input.use_group.group_in.__str__) > 0: --group=$input.use_group.group_in #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.use_group.group_in.__str__)) + ":'" + $group_out.__str__] #if $input.use_group.groups.__str__ != "None" and len($input.use_group.groups.__str__) > 0: --groups=$input.use_group.groups #end if $input.use_group.persample #end if #end if #if $input.label.__str__ != "None" and len($input.label.__str__) > 0: --label=$input.label #end if #elif $input.format == "shared": --shared=$input.otu_in #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.*\\.subsample\\.\2',$os.path.basename($input.otu_in.__str__)) + ":'" + $shared_out.__str__] #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0: --groups=$input.groups #end if #if $input.label.__str__ != "None" and len($input.label.__str__) > 0: --label=$input.label #end if #elif $input.format == "sabund": --sabund=$input.otu_in #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.otu_in.__str__)) + ":'" + $sabund_out.__str__] #if $input.label.__str__ != "None" and len($input.label.__str__) > 0: --label=$input.label #end if #elif $input.format == "rabund": --rabund=$input.otu_in #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.otu_in.__str__)) + ":'" + $rabund_out.__str__] #if $input.label.__str__ != "None" and len($input.label.__str__) > 0: --label=$input.label #end if #end if #if int($size) > 0: --size=$size #end if --result=#echo ','.join($results) #if $count.__str__ != "None" and len($count.__str__) > 0: --count=$count #end if #if $taxonomy.__str__ != "None" and len($taxonomy.__str__) > 0: --taxonomy=$taxtaxonomy #end if </command> <inputs> <conditional name="input"> <param name="format" type="select" label="Select type of data to sub sample" > <option value="fasta">FASTA</option> <option value="list">OTU List</option> <option value="shared">OTU Shared</option> <option value="sabund">OTU Shared Abundance</option> <option value="rabund">OTU Relative Abundance</option> </param> <when value="fasta"> <param name="fasta_in" type="data" format="fasta" label="fasta - "/> <param name="name_in" type="data" format="names" optional="true" label="name - Group Names from your history"/> <conditional name="use_group"> <param name="to_filter" type="select" label="Use groups " > <option value="no">No</option> <option value="yes">Yes</option> </param> <when value="no"/> <when value="yes"> <param name="group_in" type="data" format="groups" label="group - Groups"/> <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true"> <options> <filter type="data_meta" ref="group_in" key="groups" /> </options> </param> <param name="persample" type="boolean" truevalue="--persample=true" falsevalue="" checked="false" label="persample - select subsample of the same size from each of the groups"/> </when> <!-- yes --> </conditional> <!-- use_group --> </when> <!-- fasta --> <when value="list"> <param name="otu_in" type="data" format="list" label="list - OTU List"/> <conditional name="use_group"> <param name="to_filter" type="select" label="Use groups " > <option value="no">No</option> <option value="yes">Yes</option> </param> <when value="no"/> <when value="yes"> <param name="group_in" type="data" format="groups" label="group - Groups"/> <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true"> <options> <filter type="data_meta" ref="group_in" key="groups" /> </options> </param> <param name="persample" type="boolean" truevalue="--persample=true" falsevalue="" checked="false" label="persample - select subsample of the same size from each of the groups"/> </when> <!-- yes --> </conditional> <!-- use_group --> <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true"> <options> <filter type="data_meta" ref="otu_in" key="labels" /> </options> </param> </when> <!-- list --> <when value="shared"> <param name="otu_in" type="data" format="shared" label="shared - OTU Shared"/> <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true"> <options> <filter type="data_meta" ref="otu_in" key="groups" /> </options> </param> <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true"> <options> <filter type="data_meta" ref="otu_in" key="labels" /> </options> </param> </when> <!-- shared --> <when value="sabund"> <param name="otu_in" type="data" format="sabund" label="sabund - OTU Species Abundance"/> <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true"> <options> <filter type="data_meta" ref="otu_in" key="labels" /> </options> </param> </when> <!-- sabund --> <when value="rabund"> <param name="otu_in" type="data" format="rabund" label="rabund - OTU Relative Abundance"/> <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true"> <options> <filter type="data_meta" ref="otu_in" key="labels" /> </options> </param> </when> <!-- rabund --> </conditional> <!-- input --> <param name="size" type="integer" value="0" label="size - If greater than 0, the number of samples to pick"/> <param name="count" type="data" format="count_table" optional="true" label="count - a count_table" help="generated by count.seqs"/> <param name="taxonomy" type="data" format="taxonomy" optional="true" label="taxonomy - allows a taxonomy file"/> </inputs> <outputs> <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" /> <data format_source="fasta_in" name="fasta_out" label="${tool.name} on ${on_string}: subsample.fasta"> <filter>input['format'] == 'fasta'</filter> </data> <data format="list" name="list_out" label="${tool.name} on ${on_string}: subsample.list"> <filter>input['format'] == 'list'</filter> </data> <data format="shared" name="shared_out" label="${tool.name} on ${on_string}: subsample.shared"> <filter>input['format'] == 'shared'</filter> </data> <data format="sabund" name="sabund_out" label="${tool.name} on ${on_string}: subsample.sabund"> <filter>input['format'] == 'sabund'</filter> </data> <data format="rabund" name="rabund_out" label="${tool.name} on ${on_string}: subsample.rabund"> <filter>input['format'] == 'rabund'</filter> </data> <!-- This doesn't appear to be generated even though the documentation says it is --> <data format="names" name="names_out" label="${tool.name} on ${on_string}: subsample.names"> <filter>(input['format'] == 'fasta' and input['name_in'] != None)</filter> </data> <data format="groups" name="group_out" label="${tool.name} on ${on_string}: subsample.groups"> <filter>((input['format'] == 'fasta' or input['format'] == 'list') and input['use_group'] == 'yes')</filter> </data> </outputs> <requirements> <requirement type = "package" version ="1.33">mothur</requirement> </requirements> <tests> </tests> <help> **Mothur Overview** Mothur_, initiated by Dr. Patrick Schloss and his software development team in the Department of Microbiology and Immunology at The University of Michigan, provides bioinformatics for the microbial ecology community. .. _Mothur: http://www.mothur.org/wiki/Main_Page **Command Documenation** The sub.sample_ command can be used as a way to normalize your data, or to create a smaller set from your original set. It takes as an input the following file types: fasta, list_, shared_, rabund_ and sabund_ to generate a new file that contains a sampling of your original file. .. _list: http://www.mothur.org/wiki/List_file .. _shared: http://www.mothur.org/wiki/Shared_file .. _rabund: http://www.mothur.org/wiki/Rabund_file .. _sabund: http://www.mothur.org/wiki/Sabund_file .. _sub.sample: http://www.mothur.org/wiki/Sub.sample </help> </tool>