view mothur/tools/mothur/remove.groups.xml @ 25:bfbaf823be4c

Change metagenomics datatypes to include labels and groups metadata. change Mothur tool configs to get label and group select options from a data_meta filter rather than using the options from_dataset attribute. This grealty decreases memory demand for the galaxy server.
author Jim Johnson <jj@umn.edu>
date Wed, 16 May 2012 12:28:44 -0500
parents 09740be2bc9c
children 49058b1f8d3f
line wrap: on
line source

<tool id="mothur_remove_groups" name="Remove.groups" version="1.24.0">
 <description>Remove groups from groups,fasta,names,list,taxonomy</description>
 <command interpreter="python">
  mothur_wrapper.py 
  #import re, os.path
  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
  ## adds .pick before the last extension to the input file
  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($group_in.__str__)) + ":'" + $group_out.__str__]
  --cmd='remove.groups'
  --outputdir='$logfile.extra_files_path'
  --group=$group_in
  #if $groupnames.source == 'groups':
   #if $groupnames.groups.__str__ != "None" and len($groupnames.groups.__str__) > 0:
    --groups=$groupnames.groups
   #end if
  #else
   #if $groupnames.accnos.__str__ != "None" and len($groupnames.accnos.__str__) > 0:
    --accnos=$groupnames.accnos
   #end if
  #end if
  #if $fasta_in.__str__ != "None" and len($fasta_in.__str__) > 0:
   --fasta=$fasta_in
   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.pick\\.\2',$os.path.basename($fasta_in.__str__)) + ":'" + $fasta_out.__str__]
  #end if
  #if $name_in.__str__ != "None" and len($name_in.__str__) > 0:
   --name=$name_in
   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.pick\\.\2',$os.path.basename($name_in.__str__)) + ":'" + $name_out.__str__]
  #end if
  #if $list_in.__str__ != "None" and len($list_in.__str__) > 0:
   --list=$list_in
   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.pick\\.\2',$os.path.basename($list_in.__str__)) + ":'" + $list_out.__str__]
  #end if
  #if $shared_in.__str__ != "None" and len($shared_in.__str__) > 0:
   --shared=$shared_in
   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.*\\.pick\\.\2',$os.path.basename($shared_in.__str__)) + ":'" + $shared_out.__str__]
  #end if
  #if $taxonomy_in.__str__ != "None" and len($taxonomy_in.__str__) > 0:
   --taxonomy=$taxonomy_in
   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.pick\\.\2',$os.path.basename($taxonomy_in.__str__)) + ":'" + $taxonomy_out.__str__]
  #end if
  #if $design_in.__str__ != "None" and len($design_in.__str__) > 0:
   --design=$design_in
   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.*\\.pick\\.\2',$os.path.basename($design_in.__str__)) + ":'" + $design_out.__str__]
  #end if
  --result=#echo ','.join($results)
 </command>
 <inputs>
  <param name="group_in" type="data" format="groups" label="group - Groups"/>
  <conditional name="groupnames">
   <param name="source" type="select" label="Select Group Names from">
    <option value="groups">A List of Group Names</option>
    <option value="accnos">A History Group Name Accnos Dataset</option>
   </param>
   <when value="groups">
    <param name="groups" type="select" label="groups - Pick groups to remove" multiple="true">
     <options>
      <filter type="data_meta" ref="group_in" key="groups" />
     </options>
    </param>
   </when>
   <when value="accnos">
    <param name="accnos" type="data" format="accnos" label="accnos - Group Names from your history"/>
   </when>
  </conditional>
  <param name="fasta_in" type="data" format="fasta,align" optional="true" label="fasta - Fasta Sequences"/>
  <param name="name_in" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
  <param name="list_in" type="data" format="list" optional="true" label="list - OTU List"/>
  <param name="shared_in" type="data" format="shared" optional="true" label="shared - OTU Shared"/>
  <param name="taxonomy_in" type="data" format="seq.taxonomy" optional="true" label="taxonomy - Taxonomy"/>
  <param name="design_in" type="data" format="tabular" label="design - assign groups to new grouping"
         help="design has 2 columns: group(col 1) and grouping(col 2) (separated by a TAB character) use make.design"/>
 </inputs>
 <outputs>
  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
  <data format="groups" name="group_out" label="${tool.name} on ${on_string}: pick.groups"/>
  <!-- fix format -->
  <data format_source="fasta_in" name="fasta_out" label="${tool.name} on ${on_string}: pick.fasta">
   <filter>fasta_in != None</filter>
  </data>
  <data format="names" name="name_out" label="${tool.name} on ${on_string}: pick.name">
   <filter>name_in != None</filter>
  </data>
  <data format="list" name="list_out" label="${tool.name} on ${on_string}: pick.list">
   <filter>list_in != None</filter>
  </data>
  <data format="shared" name="shared_out" label="${tool.name} on ${on_string}: pick.shared">
   <filter>shared_in != None</filter>
  </data>
  <data format="seq.taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy">
   <filter>taxonomy_in != None</filter>
  </data>
  <data format="design" name="design_out" label="${tool.name} on ${on_string}: pick.design">
   <filter>design_in != None</filter>
  </data>
 </outputs>
 <requirements>
  <requirement type="binary">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 remove.groups_ command removes sequences from a specific group or set of groups from the following file types: fasta, name_, group_, list_, taxonomy_.

.. _name: http://www.mothur.org/wiki/Name_file
.. _group: http://www.mothur.org/wiki/Group_file
.. _list: http://www.mothur.org/wiki/List_file
.. _taxonomy: http://www.mothur.org/wiki/Taxonomy_outline
.. _remove.groups: http://www.mothur.org/wiki/Remove.groups


 </help>
</tool>