changeset 0:3202a38e44d9

Migrated tool version 1.15.1 from old tool shed archive to new tool shed repository
author jjohnson
date Tue, 07 Jun 2011 17:32:23 -0400
parents
children fcc0778f6987
files mothur/README mothur/lib/galaxy/datatypes/metagenomics.py mothur/suite_config.xml mothur/tool-data/mothur_aligndb.loc mothur/tool-data/mothur_calulators.loc mothur/tool-data/mothur_map.loc mothur/tool-data/mothur_taxonomy.loc mothur/tool-data/shared/jars/TreeVector.jar mothur/tools/mothur/TreeVector.py mothur/tools/mothur/TreeVector.xml mothur/tools/mothur/align.check.xml mothur/tools/mothur/align.seqs.xml mothur/tools/mothur/bin.seqs.xml mothur/tools/mothur/chimera.bellerophon.xml mothur/tools/mothur/chimera.ccode.xml mothur/tools/mothur/chimera.check.xml mothur/tools/mothur/chimera.pintail.xml mothur/tools/mothur/chimera.slayer.xml mothur/tools/mothur/chop.seqs.xml mothur/tools/mothur/classify.otu.xml mothur/tools/mothur/classify.seqs.xml mothur/tools/mothur/clearcut.xml mothur/tools/mothur/cluster.classic.xml mothur/tools/mothur/cluster.fragments.xml mothur/tools/mothur/cluster.xml mothur/tools/mothur/collect.shared.xml mothur/tools/mothur/collect.single.xml mothur/tools/mothur/consensus.seqs.xml mothur/tools/mothur/degap.seqs.xml mothur/tools/mothur/deunique.seqs.xml mothur/tools/mothur/dist.seqs.xml mothur/tools/mothur/dist.shared.xml mothur/tools/mothur/fastq.info.xml mothur/tools/mothur/filter.seqs.xml mothur/tools/mothur/get.groups.xml mothur/tools/mothur/get.lineage.xml mothur/tools/mothur/get.oturep.xml mothur/tools/mothur/get.otus.xml mothur/tools/mothur/get.relabund.xml mothur/tools/mothur/get.seqs.xml mothur/tools/mothur/hcluster.xml mothur/tools/mothur/heatmap.bin.xml mothur/tools/mothur/heatmap.sim.xml mothur/tools/mothur/indicator.xml mothur/tools/mothur/libshuff.xml mothur/tools/mothur/list.seqs.xml mothur/tools/mothur/make.group.xml mothur/tools/mothur/merge.files.xml mothur/tools/mothur/mothur_wrapper.py mothur/tools/mothur/normalize.shared.xml mothur/tools/mothur/pairwise.seqs.xml mothur/tools/mothur/parse.list.xml mothur/tools/mothur/parsimony.xml mothur/tools/mothur/pcoa.xml mothur/tools/mothur/phylo.diversity.xml mothur/tools/mothur/phylotype.xml mothur/tools/mothur/pre.cluster.xml mothur/tools/mothur/rarefaction.shared.xml mothur/tools/mothur/rarefaction.single.xml mothur/tools/mothur/read.otu.xml mothur/tools/mothur/remove.groups.xml mothur/tools/mothur/remove.lineage.xml mothur/tools/mothur/remove.otus.xml mothur/tools/mothur/remove.seqs.xml mothur/tools/mothur/reverse.seqs.xml mothur/tools/mothur/screen.seqs.xml mothur/tools/mothur/sffinfo.xml mothur/tools/mothur/split.abund.xml mothur/tools/mothur/split.groups.xml mothur/tools/mothur/sub.sample.xml mothur/tools/mothur/summary.seqs.xml mothur/tools/mothur/summary.shared.xml mothur/tools/mothur/summary.single.xml mothur/tools/mothur/tree.shared.xml mothur/tools/mothur/trim.seqs.xml mothur/tools/mothur/unifrac.unweighted.xml mothur/tools/mothur/unifrac.weighted.xml mothur/tools/mothur/unique.seqs.xml mothur/tools/mothur/venn.xml
diffstat 79 files changed, 7760 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/README	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,248 @@
+Provides galaxy tools for the Mothur metagenomics package -  http://www.mothur.org/wiki/Main_Page 
+
+Install mothur v.1.15.0 on your galaxy system so galaxy can execute the mothur command
+  http://www.mothur.org/wiki/Download_mothur
+  http://www.mothur.org/wiki/Installation
+  ( This Galaxy iMothur wrapper will invoke Mothur in command line mode: http://www.mothur.org/wiki/Command_line_mode )
+
+TreeVector is also packaged with this Mothur package to view phylogenetic trees:
+  TreeVector is a utility to create and integrate phylogenetic trees as Scalable Vector Graphics (SVG) files.
+  TreeVector was written by Ralph_Pethica, Department_of_Computer_Science, University_of_Bristol
+  TreeVector: http://supfam.cs.bris.ac.uk/TreeVector/about.html
+  Install in galaxy:  tool-data/shared/jars/TreeVector.jar
+
+Install reference data from silva and greengenes
+ Silva reference:
+  http://www.mothur.org/wiki/Silva_reference_files
+  - Bacterial references (14,956 sequences)
+    http://www.mothur.org/w/images/9/98/Silva.bacteria.zip
+  - Archaeal references (2,297 sequences)
+    http://www.mothur.org/w/images/3/3c/Silva.archaea.zip
+  - Eukaryotic references (1,238 sequences)
+    http://www.mothur.org/w/images/1/1a/Silva.eukarya.zip
+  - Silva-based alignment of template file for chimera.slayer (5,181 sequences)
+    http://www.mothur.org/w/images/f/f1/Silva.gold.bacteria.zip
+ Alignment database rRNA gene sequences:
+  http://www.mothur.org/wiki/Alignment_database
+  - greengenes reference alignment
+    http://www.mothur.org/w/images/7/72/Greengenes.alignment.zip
+  - SILVA (Silva reference)
+    http://www.mothur.org/w/images/f/f1/Silva.gold.bacteria.zip
+ Secondary structure mapping files:
+  http://www.mothur.org/wiki/Secondary_structure_map
+    http://www.mothur.org/w/images/6/6d/Silva_ss_map.zip
+    http://www.mothur.org/w/images/4/4b/Gg_ss_map.zip
+ Lane masks:
+  http://www.mothur.org/wiki/Lane_mask
+  greengenes-compatible mask:
+     - lane1241.gg.filter - A Lane Masks that comes with the greengenes arb database
+       http://www.mothur.org/w/images/2/2a/Lane1241.gg.filter
+     - lane1287.gg.filter - A Lane Masks that comes with the greengenes arb database
+       http://www.mothur.org/w/images/a/a0/Lane1287.gg.filter
+     - lane1349.gg.filter - Pat Schloss's transcription of the mask from the Lane paper
+       http://www.mothur.org/w/images/3/3d/Lane1349.gg.filter
+  SILVA-compatible mask:
+     - lane1349.silva.filter - Pat Schloss's transcription of the mask from the Lane paper
+       http://www.mothur.org/w/images/6/6d/Lane1349.silva.filter
+
+ Example from UMN installation: (We also made these available in a Galaxy public data library)
+    /project/db/galaxy/mothur/Silva.bacteria.zip
+    /project/db/galaxy/mothur/silva.eukarya.fasta
+    /project/db/galaxy/mothur/Greengenes.alignment.zip
+    /project/db/galaxy/mothur/Silva.archaea.zip
+    /project/db/galaxy/mothur/Silva_ss_map.zip
+    /project/db/galaxy/mothur/silva.eukarya.ncbi.tax
+    /project/db/galaxy/mothur/Silva.gold.bacteria.zip
+    /project/db/galaxy/mothur/Silva.archaea/silva.archaea.silva.tax
+    /project/db/galaxy/mothur/Silva.archaea/silva.archaea.gg.tax
+    /project/db/galaxy/mothur/Silva.archaea/silva.archaea.rdp.tax
+    /project/db/galaxy/mothur/Silva.archaea/nogap.archaea.fasta
+    /project/db/galaxy/mothur/Silva.archaea/silva.archaea.ncbi.tax
+    /project/db/galaxy/mothur/Silva.archaea/silva.archaea.fasta
+    /project/db/galaxy/mothur/nogap.eukarya.fasta
+    /project/db/galaxy/mothur/silva.eukarya.silva.tax
+    /project/db/galaxy/mothur/silva.gold.align
+    /project/db/galaxy/mothur/silva.ss.map
+    /project/db/galaxy/mothur/gg.ss.map
+    /project/db/galaxy/mothur/silva.bacteria/silva.bacteria.silva.tax
+    /project/db/galaxy/mothur/silva.bacteria/silva.bacteria.rdp6.tax
+    /project/db/galaxy/mothur/silva.bacteria/nogap.bacteria.fasta
+    /project/db/galaxy/mothur/silva.bacteria/silva.bacteria.gg.tax
+    /project/db/galaxy/mothur/silva.bacteria/silva.bacteria.ncbi.tax
+    /project/db/galaxy/mothur/silva.bacteria/silva.bacteria.fasta
+    /project/db/galaxy/mothur/silva.bacteria/silva.bacteria.rdp.tax
+    /project/db/galaxy/mothur/Silva.eukarya.zip
+    /project/db/galaxy/mothur/Gg_ss_map.zip
+    /project/db/galaxy/mothur/core_set_aligned.imputed.fasta
+
+
+Add tool-data:  (contains  pointers to silva and greengenes reference data)
+  tool-data/mothur_aligndb.loc
+  tool-data/mothur_calulators.loc
+  tool-data/mothur_map.loc
+  tool-data/mothur_taxonomy.loc
+  tool-data/shared/jars/TreeVector.jar
+
+
+add config files (*.xml) and wrapper code (*.py) from tools/mothur/*  to your galaxy installation 
+
+
+add datatype definition file: lib/galaxy/datatypes/metagenomics.py
+
+add the following import line to:  lib/galaxy/datatypes/registry.py
+import metagenomics # added for metagenomics mothur
+
+
+add datatypes to:  datatypes_conf.xml
+        <!-- Start Mothur Datatypes -->
+        <datatype extension="otu" type="galaxy.datatypes.metagenomics:Otu" display_in_upload="true"/>
+        <datatype extension="list" type="galaxy.datatypes.metagenomics:OtuList" display_in_upload="true"/>
+        <datatype extension="sabund" type="galaxy.datatypes.metagenomics:Sabund" display_in_upload="true"/>
+        <datatype extension="rabund" type="galaxy.datatypes.metagenomics:Rabund" display_in_upload="true"/>
+        <datatype extension="shared" type="galaxy.datatypes.metagenomics:SharedRabund" display_in_upload="true"/>
+        <datatype extension="relabund" type="galaxy.datatypes.metagenomics:RelAbund" display_in_upload="true"/>
+        <datatype extension="names" type="galaxy.datatypes.metagenomics:Names" display_in_upload="true"/>
+        <datatype extension="summary" type="galaxy.datatypes.metagenomics:Summary" display_in_upload="true"/>
+        <datatype extension="groups" type="galaxy.datatypes.metagenomics:Group" display_in_upload="true"/>
+        <datatype extension="oligos" type="galaxy.datatypes.metagenomics:Oligos" display_in_upload="true"/>
+        <datatype extension="align" type="galaxy.datatypes.metagenomics:SequenceAlignment" display_in_upload="true"/>
+        <datatype extension="accnos" type="galaxy.datatypes.metagenomics:AccNos" display_in_upload="true"/>
+        <datatype extension="align.check" type="galaxy.datatypes.metagenomics:AlignCheck" display_in_upload="true"/>
+        <datatype extension="align.report" type="galaxy.datatypes.metagenomics:AlignReport" display_in_upload="true"/>
+        <datatype extension="filter" type="galaxy.datatypes.metagenomics:LaneMask" display_in_upload="true"/>
+        <datatype extension="dist" type="galaxy.datatypes.metagenomics:DistanceMatrix" display_in_upload="true"/>
+        <datatype extension="pair.dist" type="galaxy.datatypes.metagenomics:PairwiseDistanceMatrix" display_in_upload="true"/>
+        <datatype extension="square.dist" type="galaxy.datatypes.metagenomics:SquareDistanceMatrix" display_in_upload="true"/>
+        <datatype extension="lower.dist" type="galaxy.datatypes.metagenomics:LowerTriangleDistanceMatrix" display_in_upload="true"/>
+        <datatype extension="taxonomy" type="galaxy.datatypes.metagenomics:SequenceTaxonomy" display_in_upload="true"/>
+        <datatype extension="cons.taxonomy" type="galaxy.datatypes.metagenomics:ConsensusTaxonomy" display_in_upload="true"/>
+        <datatype extension="tax.summary" type="galaxy.datatypes.metagenomics:TaxonomySummary" display_in_upload="true"/>
+        <datatype extension="freq" type="galaxy.datatypes.metagenomics:Frequency" display_in_upload="true"/>
+        <datatype extension="quan" type="galaxy.datatypes.metagenomics:Quantile" display_in_upload="true"/>
+        <datatype extension="filtered.quan" type="galaxy.datatypes.metagenomics:FilteredQuantile" display_in_upload="true"/>
+        <datatype extension="masked.quan" type="galaxy.datatypes.metagenomics:MaskedQuantile" display_in_upload="true"/>
+        <datatype extension="filtered.masked.quan" type="galaxy.datatypes.metagenomics:FilteredMaskedQuantile" display_in_upload="true"/>
+        <datatype extension="tre" type="galaxy.datatypes.data:Newick" display_in_upload="true"/>
+        <!-- End Mothur Datatypes -->
+
+add mothur tools to:   tool_conf.xml
+  <section name="Metagenomics Mothur" id="metagenomics_mothur">
+    <label text="Mothur Utilities" id="mothur_utilities"/>
+      <tool file="mothur/merge.files.xml"/>
+      <tool file="mothur/make.group.xml"/>
+      <tool file="mothur/get.groups.xml"/>
+      <tool file="mothur/remove.groups.xml"/>
+    <label text="Mothur Sequence Analysis" id="mothur_sequence_analysis"/>
+      <tool file="mothur/summary.seqs.xml"/>
+      <tool file="mothur/reverse.seqs.xml"/>
+      <tool file="mothur/list.seqs.xml"/>
+      <tool file="mothur/get.seqs.xml"/>
+      <tool file="mothur/remove.seqs.xml"/>
+      <tool file="mothur/trim.seqs.xml"/>
+      <tool file="mothur/unique.seqs.xml"/>
+      <tool file="mothur/deunique.seqs.xml"/>
+      <tool file="mothur/chop.seqs.xml"/>
+      <tool file="mothur/screen.seqs.xml"/>
+      <tool file="mothur/filter.seqs.xml"/>
+      <tool file="mothur/degap.seqs.xml"/>
+      <tool file="mothur/consensus.seqs.xml"/>
+      <tool file="mothur/sub.sample.xml"/>
+      <tool file="mothur/chimera.bellerophon.xml"/>
+      <tool file="mothur/chimera.ccode.xml"/>
+      <tool file="mothur/chimera.check.xml"/>
+      <tool file="mothur/chimera.pintail.xml"/>
+      <tool file="mothur/chimera.slayer.xml"/>
+      <tool file="mothur/align.seqs.xml"/>
+      <tool file="mothur/align.check.xml"/>
+      <tool file="mothur/split.abund.xml"/>
+      <tool file="mothur/split.groups.xml"/>
+      <tool file="mothur/parse.list.xml"/>
+      <tool file="mothur/pre.cluster.xml"/>
+      <tool file="mothur/cluster.fragments.xml"/>
+      <tool file="mothur/dist.seqs.xml"/>
+      <tool file="mothur/pairwise.seqs.xml"/>
+      <tool file="mothur/bin.seqs.xml"/>
+      <tool file="mothur/classify.seqs.xml"/>
+      <tool file="mothur/sffinfo.xml"/>
+      <tool file="mothur/fastq.info.xml"/>
+      <tool file="mothur/pcoa.xml"/>
+      <tool file="mothur/get.lineage.xml"/>
+      <tool file="mothur/remove.lineage.xml"/>
+    <label text="Mothur Operational Taxonomy Unit" id="mothur_taxonomy_unit"/>
+      <tool file="mothur/cluster.xml"/>
+      <tool file="mothur/hcluster.xml"/>
+      <tool file="mothur/cluster.classic.xml"/>
+      <tool file="mothur/read.otu.xml"/>
+      <tool file="mothur/classify.otu.xml"/>
+      <tool file="mothur/get.otus.xml"/>
+      <tool file="mothur/remove.otus.xml"/>
+      <tool file="mothur/get.oturep.xml"/>
+      <tool file="mothur/get.relabund.xml"/>
+    <label text="Mothur Single Sample Analysis" id="mothur_single_sample_analysis"/>
+      <tool file="mothur/collect.single.xml"/>
+      <tool file="mothur/rarefaction.single.xml"/>
+      <tool file="mothur/summary.single.xml"/>
+      <tool file="mothur/heatmap.bin.xml"/>
+    <label text="Mothur Multiple Sample Analysis" id="mothur_multiple_sample_analysis"/>
+      <tool file="mothur/collect.shared.xml"/>
+      <tool file="mothur/rarefaction.shared.xml"/>
+      <tool file="mothur/normalize.shared.xml"/>
+      <tool file="mothur/summary.shared.xml"/>
+      <tool file="mothur/dist.shared.xml"/>
+      <tool file="mothur/heatmap.bin.xml"/>
+      <tool file="mothur/heatmap.sim.xml"/>
+      <tool file="mothur/venn.xml"/>
+      <tool file="mothur/tree.shared.xml"/>
+    <label text="Mothur Hypothesis Testing" id="mothur_hypothesis_testing"/>
+      <tool file="mothur/parsimony.xml"/>
+      <tool file="mothur/unifrac.weighted.xml"/>
+      <tool file="mothur/unifrac.unweighted.xml"/>
+      <tool file="mothur/libshuff.xml"/>
+    <label text="Mothur Phylotype Analysis" id="mothur_phylotype_analysis"/>
+      <tool file="mothur/phylotype.xml"/>
+      <tool file="mothur/phylo.diversity.xml"/>
+      <tool file="mothur/clearcut.xml"/>
+      <tool file="mothur/indicator.xml"/>
+      <tool file="mothur/bootstrap.shared.xml"/>
+      <tool file="mothur/TreeVector.xml"/>
+  </section> <!-- metagenomics_mothur -->
+
+
+############ DESIGN NOTES #########################################################################################################
+Each mothur command has it's own tool_config (.xml) file, but all call the same python wrapper code: mothur_wrapper.py
+
+* Every mothur tool will call mothur_wrapper.py script with a --cmd= parameter that gives the mothur command name.
+* Many mothur commands require date to be read into memory (using read.dist, read.otu, read.tree) before executed the command,  
+  these are accomplished in the tool_config and mothur_wrapper.py with --READ_cmd= and --READ_<option> parameters. 
+* Every tool will produce the logfile of the mothur run as an output.
+* When the outputs of a mothur command could be determined in advance, they are included in the --result= parameter to mothur_wrapper.py
+* When the number of outputs cannot be determined in advance, the name patterns and datatypes of the ouputs 
+  are included in the --new_datasets parameter to mothur_wrapper.py
+ 
+Here is an example call to the mothur_wrapper.py script with an explanation before each param :
+ mothur_wrapper.py
+ # name of a mothur command, this is required
+ --cmd='summary.shared'
+ # Galaxy output dataset list, these are output files that can be determined before the command is run
+ # The items in the list are separated by commas
+ # Each item contains a regex to match the output filename and a galaxy dataset filepath in which to copy the data (separated by :)
+ --result='^mothur.\S+\.logfile$:'/home/galaxy/data/database/files/002/dataset_2613.dat,'^\S+\.summary$:'/home/galaxy/data/database/files/002/dataset_2614.dat
+ # Galaxy output dataset extra_files_path direcotry in which to put all output files (usually the logfile extra_file path)
+ --outputdir='/home/galaxy/data/database/files/002/dataset_2613_files'
+ # The id of one of the galaxy outputs (e.g. the mothur logfile) used for dynamic dataset generation (when number of outputs not known in advance)
+ #  see: ttp://bitbucket.org/galaxy/galaxy-central/wiki/ToolsMultipleOutput
+ --datasetid='2578'
+ # The galaxy directory in which to copy all output files for dynamic dataset generation (special galaxy tool param: $__new_file_path__)
+ --new_file_path='$__new_file_path__'
+ # specifies files to copy to the new_file_path
+ # The list is separated by commas
+ # Each item  conatins:   a regex pattern for matching filenames and  a galaxy datatype (separated by :)
+ # The regex match.groups()[0] is used as the id name of the dataset, and must result in  unique name for each output
+ --new_datasets='^\S+?\.((\S+)\.(unique|[0-9.]*)\.dist)$:lower.dist'
+ # Many mothur commands first require data to be read into memory using: read.otu, read.dist, or read.tree
+ # This prequisite command and its params are prefixed with 'READ_'
+ --READ_cmd='read.otu'
+ --READ_list=/home/galaxy/data/database/files/001/dataset_1557.dat
+ --READ_group='/home/galaxy/data/database/files/001/dataset_1545.dat'
+ --READ_label='unique,0.07'
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/lib/galaxy/datatypes/metagenomics.py	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,831 @@
+"""
+metagenomics datatypes
+James E Johnson - University of Minnesota
+for Mothur
+"""
+
+import data
+import logging, os, sys, time, tempfile, shutil, string, glob, re
+import galaxy.model
+from galaxy.datatypes import metadata
+from galaxy.datatypes import tabular
+from galaxy.datatypes import sequence
+from galaxy.datatypes.metadata import MetadataElement
+from galaxy.datatypes.tabular import Tabular
+from galaxy.datatypes.sequence import Fasta
+from galaxy import util
+from galaxy.datatypes.images import Html
+from sniff import *
+
+log = logging.getLogger(__name__)
+
+
+## Mothur Classes 
+
+class Otu( data.Text ):
+    file_ext = 'otu'
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a otu (operational taxonomic unit) format
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                if line:
+                    if line[0] != '@':
+                        linePieces = line.split('\t')
+                        if len(linePieces) < 2:
+                            return False
+                        try:
+                            check = int(linePieces[1])
+                            if check + 2 != len(linePieces):
+                                return False
+                        except ValueError:
+                            return False
+                        count += 1
+                        if count == 5:
+                            return True
+            fh.close()
+            if count < 5 and count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class OtuList( Otu ):
+    file_ext = 'list'
+
+class Sabund( Otu ):
+    file_ext = 'sabund'
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a otu (operational taxonomic unit) format
+        label<TAB>count[<TAB>value(1..n)]
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                if line:
+                    if line[0] != '@':
+                        linePieces = line.split('\t')
+                        if len(linePieces) < 2:
+                            return False
+                        try:
+                            check = int(linePieces[1])
+                            if check + 2 != len(linePieces):
+                                return False
+                            for i in range( 2, len(linePieces)):
+                                ival = int(linePieces[i])
+                        except ValueError:
+                            return False
+                        count += 1
+                        if count >= 5:
+                            return True
+            fh.close()
+            if count < 5 and count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class Rabund( Sabund ):
+    file_ext = 'rabund'
+
+
+class SharedRabund( Rabund ):
+    file_ext = 'shared'
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a otu (operational taxonomic unit) Shared format
+        label<TAB>group<TAB>count[<TAB>value(1..n)]
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                if line:
+                    if line[0] != '@':
+                        linePieces = line.split('\t')
+                        if len(linePieces) < 3:
+                            return False
+                        try:
+                            check = int(linePieces[2])
+                            if check + 3 != len(linePieces):
+                                return False
+                            for i in range( 3, len(linePieces)):
+                                ival = int(linePieces[i])
+                        except ValueError:
+                            return False
+                        count += 1
+                        if count >= 5:
+                            return True
+            fh.close()
+            if count < 5 and count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class RelAbund( Rabund ):
+    file_ext = 'relabund'
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a otu (operational taxonomic unit) Relative Abundance format
+        label<TAB>group<TAB>count[<TAB>value(1..n)]
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                if line:
+                    if line[0] != '@':
+                        linePieces = line.split('\t')
+                        if len(linePieces) < 3:
+                            return False
+                        try:
+                            check = int(linePieces[2])
+                            if check + 3 != len(linePieces):
+                                return False
+                            for i in range( 3, len(linePieces)):
+                                fval = float(linePieces[i])
+                        except ValueError:
+                            return False
+                        count += 1
+                        if count >= 5:
+                            return True
+            fh.close()
+            if count < 5 and count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class SecondaryStructureMap(Tabular):
+    file_ext = 'map'
+    def __init__(self, **kwd):
+        """Initialize secondary structure map datatype"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['Map']
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a secondary structure map format
+        A single column with an integer value which indicates the row that this row maps to.
+        check you make sure is structMap[10] = 380 then structMap[380] = 10.
+        """
+        try:
+            fh = open( filename )
+            line_num = 0
+            rowidxmap = {}
+            while True:
+                line = fh.readline()
+                line_num += 1
+                line = line.strip()
+                if not line:
+                    break #EOF
+                if line:
+                    try:
+                        pointer = int(line)
+                        if pointer > 0:
+                            if pointer > line_num:
+                                rowidxmap[line_num] = pointer 
+                            elif pointer < line_num & rowidxmap[pointer] != line_num:
+                                return False
+                    except ValueError:
+                        return False
+            fh.close()
+            if count < 5 and count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class SequenceAlignment( Fasta ):
+    file_ext = 'align'
+    def __init__(self, **kwd):
+        Fasta.__init__( self, **kwd )
+        """Initialize AlignCheck datatype"""
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is in Mothur align fasta format
+        Each sequence line must be the same length
+        """
+        
+        try:
+            fh = open( filename )
+            len = -1
+            while True:
+                line = fh.readline()
+                if not line:
+                    break #EOF
+                line = line.strip()
+                if line: #first non-empty line
+                    if line.startswith( '>' ):
+                        #The next line.strip() must not be '', nor startwith '>'
+                        line = fh.readline().strip()
+                        if line == '' or line.startswith( '>' ):
+                            break
+                        if len < 0:
+                            len = len(line)
+                        elif len != len(line):
+                            return False
+                    else:
+                        break #we found a non-empty line, but its not a fasta header
+            if len > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class AlignCheck( Tabular ):
+    file_ext = 'align.check'
+    def __init__(self, **kwd):
+        """Initialize AlignCheck datatype"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name','pound','dash','plus','equal','loop','tilde','total']
+        self.column_types = ['str','int','int','int','int','int','int','int']
+        self.comment_lines = 1
+
+    def set_meta( self, dataset, overwrite = True, **kwd ):
+        # Tabular.set_meta( self, dataset, overwrite = overwrite, first_line_is_header = True, skip = 1 )
+        data_lines = 0
+        if dataset.has_data():
+            dataset_fh = open( dataset.file_name )
+            while True:
+                line = dataset_fh.readline()
+                if not line: break
+                data_lines += 1
+            dataset_fh.close()
+        dataset.metadata.comment_lines = 1
+        dataset.metadata.data_lines = data_lines - 1 if data_lines > 0 else 0
+        dataset.metadata.column_names = self.column_names
+        dataset.metadata.column_types = self.column_types
+
+class AlignReport(Tabular):
+    """
+QueryName	QueryLength	TemplateName	TemplateLength	SearchMethod	SearchScore	AlignmentMethod	QueryStart	QueryEnd	TemplateStart	TemplateEnd	PairwiseAlignmentLength	GapsInQuery	GapsInTemplate	LongestInsert	SimBtwnQuery&Template
+AY457915	501		82283		1525		kmer		89.07		needleman	5		501		1		499		499			2		0		0		97.6
+    """
+    file_ext = 'align.report'
+    def __init__(self, **kwd):
+        """Initialize AlignCheck datatype"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['QueryName','QueryLength','TemplateName','TemplateLength','SearchMethod','SearchScore',
+                             'AlignmentMethod','QueryStart','QueryEnd','TemplateStart','TemplateEnd',
+                             'PairwiseAlignmentLength','GapsInQuery','GapsInTemplate','LongestInsert','SimBtwnQuery&Template'
+                             ]
+
+class BellerophonChimera( Tabular ):
+    file_ext = 'bellerophon.chimera'
+    def __init__(self, **kwd):
+        """Initialize AlignCheck datatype"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['Name','Score','Left','Right']
+
+class SecondaryStructureMatch(Tabular):
+    """
+	name	pound	dash	plus	equal	loop	tilde	total
+	9_1_12	42	68	8	28	275	420	872
+	9_1_14	36	68	6	26	266	422	851
+	9_1_15	44	68	8	28	276	418	873
+	9_1_16	34	72	6	30	267	430	860
+	9_1_18	46	80	2	36	261	
+    """
+    def __init__(self, **kwd):
+        """Initialize SecondaryStructureMatch datatype"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name','pound','dash','plus','equal','loop','tilde','total']
+
+class DistanceMatrix(data.Text):
+    file_ext = 'dist'
+    """Add metadata elements"""
+    MetadataElement( name="sequence_count", default=0, desc="Number of sequences", readonly=False, optional=True, no_value=0 )
+
+
+class LowerTriangleDistanceMatrix(DistanceMatrix):
+    file_ext = 'lower.dist'
+    def __init__(self, **kwd):
+        """Initialize secondary structure map datatype"""
+        DistanceMatrix.__init__( self, **kwd )
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a lower-triangle distance matrix (phylip) format
+        The first line has the number of sequences in the matrix.
+        The remaining lines have the sequence name followed by a list of distances from all preceeding sequences
+                5
+                U68589
+                U68590	0.3371
+                U68591	0.3609	0.3782
+                U68592	0.4155	0.3197	0.4148
+                U68593	0.2872	0.1690	0.3361	0.2842
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                if line:
+                    if line[0] != '@':
+                        linePieces = line.split('\t')
+                        if len(linePieces) != 3:
+                            return False
+                        try:
+                            check = float(linePieces[2])
+                        except ValueError:
+                            return False
+                        count += 1
+                        if count == 5:
+                            return True
+            fh.close()
+            if count < 5 and count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class SquareDistanceMatrix(DistanceMatrix,Tabular):
+    file_ext = 'square.dist'
+    sequence_count = -1
+
+    def __init__(self, **kwd):
+        """Initialize secondary structure map datatype"""
+        Tabular.__init__( self, **kwd )
+    def init_meta( self, dataset, copy_from=None ):
+        data.Text.init_meta( self, dataset, copy_from=copy_from )
+    def set_meta( self, dataset, overwrite = True, skip = None, **kwd ):
+        dataset.metadata.sequences = 0 
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a square distance matrix (Column-formatted distance matrix) format
+        The first line has the number of sequences in the matrix.
+        The following lines have the sequence name in the first column plus a column for the distance to each sequence 
+        in the row order in which they appear in the matrix.
+               3
+               U68589  0.0000  0.3371  0.3610
+               U68590  0.3371  0.0000  0.3783
+               U68590  0.3371  0.0000  0.3783
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            line = fh.readline()
+            line = line.strip()
+            sequence_count = int(line)
+            col_cnt = seq_cnt + 1
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                if line:
+                    if line[0] != '@':
+                        linePieces = line.split('\t')
+                        if len(linePieces) != col_cnt :
+                            return False
+                        try:
+                            for i in range(1, col_cnt):
+                                check = float(linePieces[i])
+                        except ValueError:
+                            return False
+                        count += 1
+                        if count == 5:
+                            return True
+            fh.close()
+            if count < 5 and count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class PairwiseDistanceMatrix(DistanceMatrix,Tabular):
+    file_ext = 'pair.dist'
+    def __init__(self, **kwd):
+        """Initialize secondary structure map datatype"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['Sequence','Sequence','Distance']
+        self.column_types = ['str','str','float']
+        self.comment_lines = 1
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a pairwise distance matrix (Column-formatted distance matrix) format
+        The first and second columns have the sequence names and the third column is the distance between those sequences.
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                if line:
+                    if line[0] != '@':
+                        linePieces = line.split('\t')
+                        if len(linePieces) != 3:
+                            return False
+                        try:
+                            check = float(linePieces[2])
+                        except ValueError:
+                            return False
+                        count += 1
+                        if count == 5:
+                            return True
+            fh.close()
+            if count < 5 and count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class Alignment(Tabular):
+    file_ext = 'align'
+    def __init__(self, **kwd):
+        """Initialize secondary structure map datatype"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name','pound','dash','plus','equal','loop','tilde','total']
+
+class AlignCheck(Tabular):
+    file_ext = 'align.check'
+    def __init__(self, **kwd):
+        """Initialize secondary structure map datatype"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name','pound','dash','plus','equal','loop','tilde','total']
+
+class Names(Tabular):
+    file_ext = 'names'
+    def __init__(self, **kwd):
+        """Name file shows the relationship between a representative sequence(col 1)  and the sequences it represents(col 2)"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name','representatives']
+
+class Summary(Tabular):
+    file_ext = 'summary'
+    def __init__(self, **kwd):
+        """Name file shows the relationship between a representative sequence(col 1)  and the sequences it represents(col 2)"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['seqname','start','end','nbases','ambigs','polymer']
+
+class Group(Tabular):
+    file_ext = 'groups'
+    def __init__(self, **kwd):
+        """Name file shows the relationship between a representative sequence(col 1)  and the sequences it represents(col 2)"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name','group']
+
+class AccNos(Tabular):
+    file_ext = 'accnos'
+    def __init__(self, **kwd):
+        """A list of names"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name']
+
+class Oligos( data.Text ):
+    file_ext = 'oligos'
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a otu (operational taxonomic unit) format
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                else:
+                    if line[0] != '#':
+                        linePieces = line.split('\t')
+                        if len(linePieces) == 2 and re.match('forward|reverse',linePieces[0]):
+                            count += 1
+                            continue
+                        elif len(linePieces) == 3 and re.match('barcode',linePieces[0]):
+                            count += 1
+                            continue
+                        else:
+                            return False
+                        if count > 20:
+                            return True
+            if count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class Frequency(Tabular):
+    file_ext = 'freq'
+    def __init__(self, **kwd):
+        """A list of names"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['position','frequency']
+        self.column_types = ['int','float']
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a frequency tabular format for chimera analysis
+        #1.14.0
+        0	0.000
+        1	0.000
+        ...
+        155	0.975
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                else:
+                    if line[0] != '#':
+                        try:
+                            linePieces = line.split('\t')
+                            i = int(linePieces[0])
+                            f = float(linePieces[1])
+                            count += 1
+                            continue
+                        except:
+                            return False
+                        if count > 20:
+                            return True
+            if count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class Quantile(Tabular):
+    file_ext = 'quan'
+    MetadataElement( name="filtered", default=False, no_value=False, optional=True , desc="Quantiles calculated using a mask", readonly=True)
+    MetadataElement( name="masked", default=False, no_value=False, optional=True , desc="Quantiles calculated using a frequency filter", readonly=True)
+    def __init__(self, **kwd):
+        """Quantiles for chimera analysis"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['num','ten','twentyfive','fifty','seventyfive','ninetyfive','ninetynine']
+        self.column_types = ['int','float','float','float','float','float','float']
+    def set_meta( self, dataset, overwrite = True, skip = None, **kwd ):
+        log.info( "Mothur Quantile set_meta %s" % kwd)
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a quantiles tabular format for chimera analysis
+        1	0	0	0	0	0	0
+        2       0.309198        0.309198        0.37161 0.37161 0.37161 0.37161
+        3       0.510982        0.563213        0.693529        0.858939        1.07442 1.20608
+        ...
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                line = line.strip()
+                if not line:
+                    break #EOF
+                else:
+                    if line[0] != '#':
+                        try:
+                            linePieces = line.split('\t')
+                            i = int(linePieces[0])
+                            f = float(linePieces[1])
+                            f = float(linePieces[2])
+                            f = float(linePieces[3])
+                            f = float(linePieces[4])
+                            f = float(linePieces[5])
+                            f = float(linePieces[6])
+                            count += 1
+                            continue
+                        except:
+                            return False
+                        if count > 10:
+                            return True
+            if count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class FilteredQuantile(Quantile):
+    file_ext = 'filtered.quan'
+    def __init__(self, **kwd):
+        """Quantiles for chimera analysis"""
+        Quantile.__init__( self, **kwd )
+        self.filtered = True
+
+class MaskedQuantile(Quantile):
+    file_ext = 'masked.quan'
+    def __init__(self, **kwd):
+        """Quantiles for chimera analysis"""
+        Quantile.__init__( self, **kwd )
+        self.masked = True
+        self.filtered = False
+
+class FilteredMaskedQuantile(Quantile):
+    file_ext = 'filtered.masked.quan'
+    def __init__(self, **kwd):
+        """Quantiles for chimera analysis"""
+        Quantile.__init__( self, **kwd )
+        self.masked = True
+        self.filtered = True
+
+class LaneMask(data.Text):
+    file_ext = 'filter'
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a lane mask filter:  1 line consisting of zeros and ones.
+        """
+        try:
+            fh = open( filename )
+            while True:
+                buff = fh.read(1000)
+                if not buff:
+                    break #EOF
+                else:
+                    if not re.match('^[01]+$',line):
+                        return False
+            return True
+        except:
+            pass
+        finally:
+            close(fh)
+        return False
+
+class SequenceTaxonomy(Tabular):
+    file_ext = 'taxonomy'
+    def __init__(self, **kwd):
+        """A list of names"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name','taxonomy']
+
+class ConsensusTaxonomy(Tabular):
+    file_ext = 'cons.taxonomy'
+    def __init__(self, **kwd):
+        """A list of names"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['OTU','count','taxonomy']
+
+class TaxonomySummary(Tabular):
+    file_ext = 'tax.summary'
+    def __init__(self, **kwd):
+        """A Summary of taxon classification"""
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['taxlevel','rankID','taxon','daughterlevels','total']
+
+class Phylip(data.Text):
+    file_ext = 'phy'
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is in Phylip format (Interleaved or Sequential)
+        The first line of the input file contains the number of species and the
+        number of characters, in free format, separated by blanks (not by
+        commas). The information for each species follows, starting with a
+        ten-character species name (which can include punctuation marks and blanks),
+        and continuing with the characters for that species.
+        http://evolution.genetics.washington.edu/phylip/doc/main.html#inputfiles
+        Interleaved Example:
+            6   39
+        Archaeopt CGATGCTTAC CGCCGATGCT
+        HesperorniCGTTACTCGT TGTCGTTACT
+        BaluchitheTAATGTTAAT TGTTAATGTT
+        B. virginiTAATGTTCGT TGTTAATGTT
+        BrontosaurCAAAACCCAT CATCAAAACC
+        B.subtilisGGCAGCCAAT CACGGCAGCC
+        
+        TACCGCCGAT GCTTACCGC
+        CGTTGTCGTT ACTCGTTGT
+        AATTGTTAAT GTTAATTGT
+        CGTTGTTAAT GTTCGTTGT
+        CATCATCAAA ACCCATCAT
+        AATCACGGCA GCCAATCAC
+        """
+        try:
+            fh = open( filename )
+            # counts line
+            line = fh.readline().strip()
+            linePieces = line.split()
+            count = int(linePieces[0])
+            seq_len = int(linePieces[1])
+            # data lines
+            """
+            TODO check data lines
+            while True:
+                line = fh.readline()
+                # name is the first 10 characters
+                name = line[0:10]
+                seq = line[10:].strip()
+                # nucleic base or amino acid 1-char designators (spaces allowed)
+                bases = ''.join(seq.split())
+                # float per base (each separated by space)
+            """
+            return True
+        except:
+            pass
+        finally:
+            close(fh)
+        return False
+
+
+## Qiime Classes
+
+class MetadataMapping(Tabular):
+    MetadataElement( name="column_names", default=[], desc="Column Names", readonly=False, visible=True, no_value=[] )
+    file_ext = 'mapping'
+
+    def __init__(self, **kwd):
+        """
+        http://qiime.sourceforge.net/documentation/file_formats.html#mapping-file-overview
+        Information about the samples necessary to perform the data analysis. 
+        # self.column_names = ['#SampleID','BarcodeSequence','LinkerPrimerSequence','Description']
+        """
+        Tabular.__init__( self, **kwd )
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a qiime mapping file
+        Just checking for an appropriate header line for now, could be improved
+        """
+        try:
+            pat = '#SampleID(\t[a-zA-Z][a-zA-Z0-9_]*)*\tDescription'
+            fh = open( filename )
+            while True:
+                line = dataset_fh.readline()
+                if re.match(pat,line):
+                    return True
+        except:
+            pass
+        finally:
+            close(fh)
+        return False
+
+    def set_column_names(self, dataset):
+        if dataset.has_data():
+            dataset_fh = open( dataset.file_name )
+            line = dataset_fh.readline()
+            if line.startswith('#SampleID'):
+                dataset.metadata.column_names = line.strip().split('\t');
+            dataset_fh.close()
+
+    def set_meta( self, dataset, overwrite = True, skip = None, max_data_lines = None, **kwd ):
+        Tabular.set_meta(self, dataset, overwrite, skip, max_data_lines)
+        self.set_column_names(dataset)
+
+if __name__ == '__main__':
+    import doctest, sys
+    doctest.testmod(sys.modules[__name__])
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/suite_config.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,210 @@
+<suite id="Mothur_toolsuite" name="Mothur Metagenomics" version="1.15.1">
+  <description>Mothur metagenomics commands as Galaxy tools</description>
+    <tool id="mothur_align_check" name="Align.check" version="1.15.0">
+     <description>Calculate the number of potentially misaligned bases</description>
+    </tool>
+    <tool id="mothur_align_seqs" name="Align.seqs" version="1.15.0">
+     <description>Align sequences to a template alignment</description>
+    </tool>
+    <tool id="mothur_bin_seqs" name="Bin.seqs" version="1.15.0">
+     <description>Order Sequences by OTU</description>
+    </tool>
+    <tool id="mothur_chimera_bellerophon" name="Chimera.bellerophon" version="1.15.0">
+     <description>Find putative chimeras using bellerophon</description>
+    </tool>
+    <tool id="mothur_chimera_ccode" name="Chimera.ccode" version="1.15.0">
+     <description>Find putative chimeras using ccode</description>
+    </tool>
+    <tool id="mothur_chimera_check" name="Chimera.check" version="1.15.0">
+     <description>Find putative chimeras using chimeraCheck</description>
+    </tool>
+    <tool id="mothur_chimera_pintail" name="Chimera.pintail" version="1.15.0">
+     <description>Find putative chimeras using pintail</description>
+    </tool>
+    <tool id="mothur_chimera_slayer" name="Chimera.slayer" version="1.15.0">
+     <description>Find putative chimeras using slayer</description>
+    </tool>
+    <tool id="mothur_chop_seqs" name="Chop.seqs" version="1.15.0">
+     <description>Trim sequences to a specified length</description>
+    </tool>
+    <tool id="mothur_classify_otu" name="Classify.otu" version="1.15.0">
+     <description>Assign sequences to taxonomy</description>
+    </tool>
+    <tool id="mothur_classify_seqs" name="Classify.seqs" version="1.15.0">
+     <description>Assign sequences to taxonomy</description>
+    </tool>
+    <tool id="mothur_clearcut" name="Clearcut" version="1.15.0">
+     <description>Generate a tree using relaxed neighbor joining</description>
+    </tool>
+    <tool id="mothur_cluster_classic" name="Cluster.classic" version="1.15.0">
+     <description>Assign sequences to OTUs (Dotur implementation)</description>
+    </tool>
+    <tool id="mothur_cluster_fragments" name="Cluster.fragments" version="1.15.0">
+     <description> Group sequences that are part of a larger sequence</description>
+    </tool>
+    <tool id="mothur_cluster" name="Cluster" version="1.15.0">
+     <description>Assign sequences to OTUs (Operational Taxonomic Unit)</description>
+    </tool>
+    <tool id="mothur_collect_shared" name="Collect.shared" version="1.15.0">
+     <description>Generate collector's curves for calculators on OTUs</description>
+    </tool>
+    <tool id="mothur_collect_single" name="Collect.single" version="1.15.0">
+     <description>Summary of calculator values for OTUs</description>
+    </tool>
+    <tool id="mothur_consensus_seqs" name="Consensus.seqs" version="1.15.0">
+     <description>Find a consensus sequence for each OTU or phylotype</description>
+    </tool>
+    <tool id="mothur_degap_seqs" name="Degap.seqs" version="1.15.0">
+     <description>Remove gap characters from sequences</description>
+    </tool>
+    <tool id="mothur_deunique_seqs" name="Deunique.seqs" version="1.15.0">
+     <description>Return all sequences</description>
+    </tool>
+    <tool id="mothur_dist_seqs" name="Dist.seqs" version="1.15.0">
+     <description>calculate uncorrected pairwise distances between aligned sequences</description>
+    </tool>
+    <tool id="mothur_dist_shared" name="Dist.shared" version="1.15.0">
+     <description>Generate a phylip-formatted dissimilarity distance matrix among multiple groups</description>
+    </tool>
+    <tool id="mothur_fastq_info" name="Fastq.info" version="1.15.0">
+     <description>Convert fastq to fasta and quality</description>
+    </tool>
+    <tool id="mothur_filter_seqs" name="Filter.seqs" version="1.15.0">
+     <description>removes columns from alignments</description>
+    </tool>
+    <tool id="mothur_get_groups" name="Get.groups" version="1.15.0">
+     <description>Select groups</description>
+    </tool>
+    <tool id="mothur_get_lineage" name="Get.lineage" version="1.15.0">
+     <description>Picks by taxon</description>
+    </tool>
+    <tool id="mothur_get_oturep" name="Get.oturep" version="1.15.0" >
+     <description>Generate a fasta with a representative sequence for each OTU</description>
+    </tool>
+    <tool id="mothur_get_otus" name="Get.otus" version="1.15.0">
+     <description>Get otus containing sequences from specified groups</description>
+    </tool>
+    <tool id="mothur_get_relabund" name="Get.relabund" version="1.15.0">
+     <description>Calculate the relative abundance of each otu</description>
+    </tool>
+    <tool id="mothur_get_seqs" name="Get.seqs" version="1.15.0">
+     <description>Picks sequences by name</description>
+    </tool>
+    <tool id="mothur_hcluster" name="Hcluster" version="1.15.0">
+     <description>Assign sequences to OTUs (Operational Taxonomic Unit)</description>
+    </tool>
+    <tool id="mothur_heatmap_bin" name="Heatmap.bin" version="1.15.0" >
+     <description>Generate a heatmap for OTUs</description>
+    </tool>
+    <tool id="mothur_heatmap_sim" name="Heatmap.sim" version="1.15.0" >
+     <description>Generate a heatmap for pariwise similarity</description>
+    </tool>
+    <tool id="mothur_indicator" name="Indicator" version="1.15.0">
+     <description>Identify indicator "species" for nodes on a tree</description>
+    </tool>
+    <tool id="mothur_libshuff" name="Libshuff" version="1.15.0">
+     <description>Cramer-von Mises tests communities for the same structure</description>
+    </tool>
+    <tool id="mothur_list_seqs" name="List.seqs" version="1.15.0">
+     <description>Lists the names of the sequences</description>
+    </tool>
+    <tool id="mothur_make_files" name="Make.group" version="1.15.0">
+     <description>Make a group file</description>
+    </tool>
+    <tool id="mothur_merge_files" name="Merge.files" version="1.15.0">
+     <description>Merge data</description>
+    </tool>
+    <tool id="mothur_normalize_shared" name="Normalize.shared" version="1.15.0">
+     <description>Normalize the number of sequences per group to a specified level</description>
+    </tool>
+    <tool id="mothur_pairwise_seqs" name="Pairwise.seqs" version="1.15.0">
+     <description>calculate uncorrected pairwise distances between sequences</description>
+    </tool>
+    <tool id="mothur_parse_list" name="Parse.list" version="1.15.0">
+     <description>Order Sequences by OTU</description>
+    </tool>
+    <tool id="mothur_parsimony" name="Parsimony" version="1.15.0">
+     <description>Describes whether two or more communities have the same structure</description>
+    </tool>
+    <tool id="mothur_pcoa" name="Pcoa" version="1.15.0" >
+     <description>Principal Coordinate Analysis</description>
+    </tool>
+    <tool id="mothur_phylo_diversity" name="Phylo.diversity" version="1.15.0">
+     <description>Alpha Diversity calculate unique branch length</description>
+    </tool>
+    <tool id="mothur_phylotype" name="Phylotype" version="1.15.0">
+     <description>Assign sequences to OTUs based on taxonomy</description>
+    </tool>
+    <tool id="mothur_pre_cluster" name="Pre.cluster" version="1.15.0">
+     <description>Remove sequences due to pyrosequencing errors</description>
+    </tool>
+    <tool id="mothur_rarefaction_shared" name="Rarefaction.shared" version="1.15.0">
+     <description>Generate inter-sample rarefaction curves for OTUs</description>
+    </tool>
+    <tool id="mothur_rarefaction_single" name="Rarefaction.single" version="1.15.0">
+     <description>Generate intra-sample rarefaction curves for OTUs</description>
+    </tool>
+    <tool id="mothur_read_otu" name="Read.otu" version="1.15.0">
+     <description>Read OTU list and group to create a shared file</description>
+    </tool>
+    <tool id="mothur_remove_groups" name="Remove.groups" version="1.15.0">
+     <description>Remove groups</description>
+    </tool>
+    <tool id="mothur_remove_lineage" name="Remove.lineage" version="1.15.0">
+     <description>Picks by taxon</description>
+    </tool>
+    <tool id="mothur_remove_otus" name="Remove.otus" version="1.15.0">
+     <description>Remove otus containing sequences from specified groups</description>
+    </tool>
+    <tool id="mothur_remove_seqs" name="Remove.seqs" version="1.15.0">
+     <description>Remove sequences by name</description>
+    </tool>
+    <tool id="mothur_reverse_seqs" name="Reverse.seqs" version="1.15.0">
+     <description>Reverse complement the sequences</description>
+    </tool>
+    <tool id="mothur_screen_seqs" name="Screen.seqs" version="1.15.0">
+     <description>Screen sequences</description>
+    </tool>
+    <tool id="mothur_sffinfo" name="Sffinfo" version="1.15.0">
+     <description>Summarize the quality of sequences</description>
+    </tool>
+    <tool id="mothur_split_abund" name="Split.abund" version="1.15.0">
+     <description>Separate sequences into rare and abundant groups</description>
+    </tool>
+    <tool id="mothur_split_groups" name="Split.groups" version="1.15.0">
+     <description>Generates a fasta file for each group</description>
+    </tool>
+    <tool id="mothur_sub_sample" name="Sub.sample" version="1.15.0">
+     <description>Create a sub sample</description>
+    </tool>
+    <tool id="mothur_summary_seqs" name="Summary.seqs" version="1.15.0">
+     <description>Summarize the quality of sequences</description>
+    </tool>
+    <tool id="mothur_summary_shared" name="Summary.shared" version="1.15.0" >
+     <description>Summary of calculator values for OTUs</description>
+    </tool>
+    <tool id="mothur_summary_single" name="Summary.single" version="1.15.0">
+     <description>Summary of calculator values for OTUs</description>
+    </tool>
+    <tool id="mothur_tree_shared" name="Tree.shared" version="1.15.0">
+     <description>Generate a newick tree for dissimilarity among groups</description>
+    </tool>
+    <tool id="mothur_trim_seqs" name="Trim.seqs" version="1.15.0">
+     <description>Trim sequences - primers, barcodes, quality</description>
+    </tool>
+    <tool id="mothur_unifrac_unweighted" name="unifrac.unweighted" version="1.15.0">
+     <description>Describes whether two or more communities have the same structure</description>
+    </tool>
+    <tool id="mothur_unifrac_weighted" name="unifrac.weighted" version="1.15.0">
+     <description>Describes whether two or more communities have the same structure</description>
+    </tool>
+    <tool id="mothur_unique_seqs" name="Unique.seqs" version="1.15.0">
+     <description>Return unique sequences</description>
+    </tool>
+    <tool id="mothur_venn" name="Venn" version="1.15.0" >
+     <description>Generate Venn diagrams gor groups </description>
+    </tool>
+    <tool id="tree_vector" name="TreeVector" version="1.0">
+     <description>Draw a Phylogenic Tree</description>
+    </tool>
+</suite>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tool-data/mothur_aligndb.loc	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,14 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of metagenomics files.  
+#file has this format (white space characters are TAB characters):
+#
+#<dbname>	<file_base>
+#
+greengenes	/project/db/galaxy/mothur/core_set_aligned.imputed.fasta
+silva archaea	/project/db/galaxy/mothur/Silva.archaea/silva.archaea.fasta
+silva bacteria	/project/db/galaxy/mothur/silva.bacteria/silva.bacteria.fasta
+silva eukarya	/project/db/galaxy/mothur/silva.eukarya.fasta
+silva archaea nogap	/project/db/galaxy/mothur/Silva.archaea/nogap.archaea.fasta
+silva bacteria nogap	/project/db/galaxy/mothur/silva.bacteria/nogap.bacteria.fasta
+silva eukarya nogap	/project/db/galaxy/mothur/nogap.eukarya.fasta
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tool-data/mothur_calulators.loc	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,68 @@
+#This is a sample file distributed with Galaxy that enables 
+# Mothur tools to present a choice of values for calculators
+# source -  http://www.mothur.org/wiki/Calculators
+#file has this format (fields are separated by TAB characters):
+# 
+# venn	sobs,chao,ace	sharedsobs,sharedchao,sharedace
+# rarefaction.shared	sharednseqs,sharedobserved
+# rarefaction.single	ace,bootstrap,chao,coverage,heip,invsimpson,jack,npshannon,nseqs,shannon,shannoneven,simpson,simpsoneven,smithwilson,sobs
+# dist.shared	braycurtis,jabund,jclass,jest,morisitahorn,sorabund,sorclass,sorest,thetan,thetayc
+# tree.shared	braycurtis,jabund,jclass,jest,morisitahorn,sorabund,sorclass,sorest,thetan,thetayc
+# heatmap.sim	braycurtis,jabund,jclass,jest,morisitahorn,sorabund,sorclass,sorest,thetan,thetayc
+# collect.shared	anderberg,braycurtis,jabund,jclass,jest,kstest,kulczynski,kulczynskicody,lennon,morisitahorn,ochiai,sharedace,sharedchao,sharednseqs,sharedsobs,sorabund,sorclass,sorest,thetan,thetayc,whittaker
+# summary.shared	anderberg,braycurtis,jabund,jclass,jest,kstest,kulczynski,kulczynskicody,lennon,morisitahorn,ochiai,sharedace,sharedchao,sharednseqs,sharedsobs,sorabund,sorclass,sorest,thetan,thetayc,whittaker
+# collect.single	ace,bergerparker,boneh,bootstrap,bstick,chao,coverage,efron,geometric,goodscoverage,heip,invsimpson,jack,logseries,npshannon,nseqs,qstat,shannon,shannoneven,shen,simpson,simpsoneven,smithwilson,sobs,solow
+# summary.single	ace,bergerparker,boneh,bootstrap,bstick,chao,coverage,efron,geometric,goodscoverage,heip,invsimpson,jack,logseries,npshannon,nseqs,qstat,shannon,shannoneven,shen,simpson,simpsoneven,smithwilson,sobs,solow
+#
+#<calculator>	<mult>	<mult2>	<category>	<description>
+#
+#Community richness	
+sobs	single	sing	Community richness	the observed richness
+chao	single	sing	Community richness	the Chao1 estimator
+ace	single	sing	Community richness	the ACE estimator
+jack	single	sing	Community richness	the jackknife estimator
+bootstrap	single	sing	Community richness	the bootstrap estimator
+#Community diversity
+bergerparker	single	xxxx	Community diversity	the Berger-Parker index
+shannon	single	sing	Community diversity	the Shannon index
+npshannon	single	sing	Community diversity	the non-parametric Shannon index
+simpson	single	sing	Community diversity	the Simpson index
+simpsoneven	single	sing	Community diversity	the Simpson index
+invsimpson	single	sing	Community diversity	the Simpson index
+coverage	single	sing	Community diversity	the sampling coverage coverage
+qstat	single	xxxx	Community diversity	the Q statistic
+#Estimates of number of additional OTUs observed with extra sampling
+boneh	single	xxxx	Estimator	Boneh's estimator
+efron	single	xxxx	Estimator	Efron's estimator
+shen	single	xxxx	Estimator	Shen's estimator
+solow	single	xxxx	Estimator	Solow's estimator
+#Statistical distributions
+logseries	single	xxxx	Statistical distribution	tests whether observed data follow the log series distribution
+geometric	single	xxxx	Statistical distribution	tests whether observed data follow the geometric series distribution
+bstick	single	xxxx	Statistical distribution	tests whether observed data follow the broken stick distribution
+# Shared community richness
+sharedsobs	shared	xxxx	Shared community richness	the observed richness shared between two or more samples
+sharedchao	shared	xxxx	Shared community richness	the two or more sample shared Chao1 richness estimator
+sharedace	shared	xxxx	Shared community richness	the two sample shared ACE richness estimator
+#Similarity in community membership
+anderberg	shared	xxxx	Community Membership Similarity	the Anderberg similarity coefficient
+jclass	shared	shar	Community Membership Similarity	the traditional Jaccard similarity coefficient based on the observed richness
+jest	shared	shar	Community Membership Similarity	the Jaccard similarity coefficient based on the Chao1 estimated richnesses
+kulczynski	shared	xxxx	Community Membership Similarity	the Kulczynski similarity coefficient
+kulczynskicody	shared	xxxx	Community Membership Similarity	the Kulczynski-Cody similarity coefficient
+lennon	shared	xxxx	Community Membership Similarity	the Lennon similarity coefficient
+ochiai	shared	xxxx	Community Membership Similarity	the Ochiai similarity coefficient
+sorclass	shared	shar	Community Membership Similarity	the Sorenson similarity coefficient based on the observed richness
+sorest	shared	shar	Community Membership Similarity	the Sorenson similarity coefficient based on the Chao1 estimated richnesses
+whittaker	shared	xxxx	Community Membership Similarity	the Whittaker similarity coefficient
+#Similarity in community structure
+braycurtis	shared	shar	Community Structure Similarity	the Bray-Curtis similarity coefficient
+jabund	shared	shar	Community Structure Similarity	the abundance-based Jaccard similarity coefficient
+morisitahorn	shared	shar	Community Structure Similarity	the Morisita-Horn similarity coefficient
+sorabund	shared	shar	Community Structure Similarity	the abundance-based Sorenson similarity coefficient
+thetan	shared	shar	Community Structure Similarity	the Smith theta similarity coefficient
+thetayc	shared	shar	Community Structure Similarity	the Yue & Clayton theta similarity coefficient
+#Utility calculators
+nseqs	single	sing	Utility	the number of sequences in a sample
+sharednseqs	shared	rare	Utility	the number of sequences in two samples
+sharedobserved	shared	rare	Utility	the number of sequences in two samples
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tool-data/mothur_map.loc	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,8 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of metagenomics files.  
+#file has this format (white space characters are TAB characters):
+#
+#<name>	<file_base>
+#
+greengenes	/project/db/galaxy/mothur/gg.ss.map
+silva	/project/db/galaxy/mothur/silva.ss.map
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tool-data/mothur_taxonomy.loc	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,18 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of metagenomics files.  
+#file has this format (white space characters are TAB characters):
+#
+#<taxonomyname>	<file_base>
+#
+archaea.gg	/project/db/galaxy/mothur/Silva.archaea/silva.archaea.gg.tax
+archaea.silva	/project/db/galaxy/mothur/Silva.archaea/silva.archaea.silva.tax
+archaea.rdp	/project/db/galaxy/mothur/Silva.archaea/silva.archaea.rdp.tax
+archaea.ncbi	/project/db/galaxy/mothur/Silva.archaea/silva.archaea.ncbi.tax
+bacteria.gg	/project/db/galaxy/mothur/silva.bacteria/silva.bacteria.gg.tax
+bacteria.silva	/project/db/galaxy/mothur/silva.bacteria/silva.bacteria.silva.tax
+bacteria.ncbi	/project/db/galaxy/mothur/silva.bacteria/silva.bacteria.ncbi.tax
+bacteria.rdp	/project/db/galaxy/mothur/silva.bacteria/silva.bacteria.rdp.tax
+bacteria.rdp6	/project/db/galaxy/mothur/silva.bacteria/silva.bacteria.rdp6.tax
+eukarya.silva	/project/db/galaxy/mothur/silva.eukarya.silva.tax
+eukarya.ncbi	/project/db/galaxy/mothur/silva.eukarya.ncbi.tax
+
Binary file mothur/tool-data/shared/jars/TreeVector.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/TreeVector.py	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+
+"""
+Runs TreeVector on a newick file;
+TODO: more documentation
+"""
+
+import optparse, os, shutil, subprocess, sys, tempfile, re, string
+
+def stop_err( msg ):
+    sys.stderr.write( '%s\n' % msg )
+    sys.exit()
+
+def __main__():
+    #Parse Command Line
+    parser = optparse.OptionParser()
+    parser.add_option( '-i', '--input', dest='input', help='The sequence input file' )
+    parser.add_option( '-s', '--shape', dest='shape', help='Branch shape' )
+    parser.add_option( '-l', '--length', dest='length', help='Branch length' )
+    parser.add_option( '-g', '--svg', dest='svg', help='Graph in SVG format' )
+    parser.add_option( '-p', '--jarBin', dest='jarBin', default='', help='The path to where jars are stored' )
+    parser.add_option( '-j', '--jarFile', dest='jarFile', help='The file name of the jar file to use')
+    parser.add_option( '-x', '--jvmArgs', dest='jvmArgs', help='Java JVM arguments, e.g -Xmx250m')
+    (options, args) = parser.parse_args()
+    if options.jarBin == None:
+       stop_err("Misssing option --jarBin")
+    elif options.jarFile == None:
+       stop_err("Misssing option --jarFile")
+    elif options.input == None:
+       stop_err("Misssing option --input")
+    params = []
+    props = []
+    if options.jvmArgs != None:
+        props.append(options.jvmArgs)
+    if options.shape != None and options.shape != 'None':
+       params.append('-%s' % options.shape)
+    if options.length != None and options.length != 'None':
+       params.append('-%s' % options.length)
+    if options.svg != None and options.svg != 'None':
+       params.append('-out %s' % options.svg)
+    # make temp directory
+    buffsize = 1048576
+    tmp_dir = tempfile.mkdtemp()
+    # print("tmp_dir %s" % tmp_dir)
+    # generate commandline
+    cmd = 'java %s -jar %s %s %s' % (' '.join(props), os.path.join( options.jarBin, options.jarFile ), options.input, ' '.join(params))
+    # print >> sys.stderr, cmd 
+    # need to nest try-except in try-finally to handle 2.4
+    try:
+        try:
+            proc = subprocess.Popen( args=cmd, shell=True, stderr=subprocess.PIPE )
+            returncode = proc.wait()
+            stderr = proc.stderr.read()
+            if returncode != 0:
+                raise Exception, stderr
+        except Exception, e:
+            raise Exception, 'Error executing TeeVector. ' + str( e )
+    except Exception, e:
+        stop_err( 'TreeVector failed.\n' + str( e ) )
+
+if __name__=="__main__": __main__()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/TreeVector.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,42 @@
+<tool id="tree_vector" name="TreeVector" version="1.0">
+ <description>Draw a Phylogenic Tree</description>
+ <command interpreter="python">TreeVector.py
+  --jarBin='${GALAXY_DATA_INDEX_DIR}/shared/jars'
+  --jarFile='TreeVector.jar'
+  --jvmArgs='-Xmx250m'
+  --input=$tree
+  --svg=$output
+  --shape=$shape
+  --length=$length
+ </command>
+ <inputs>
+  <param name="tree" type="data" format="tre" label="A Phylogenetic Tree in Newick format"/>
+  <param name="shape" type="select" label="Branch Shape">
+   <option value="square">Square branches</option>
+   <option value="triangle">Triangle branches</option>
+  </param>  
+  <param name="length" type="select" label="Branch Length">
+   <option value="phylo" selected="true">Use Newick branch lengths</option>
+   <option value="clad">Line up labels</option>
+   <option value="simpleclad">Branch lengths all same length</option>
+  </param>  
+ </inputs>
+ <outputs>
+    <data format="svg" name="output"> </data>
+ </outputs>
+ <tests>
+ </tests>
+ <help>
+
+TreeVector_ is a utility to create and integrate phylogenetic trees as Scalable Vector Graphics (SVG) files.
+
+TreeVector_ was written by Ralph_Pethica_, Department_of_Computer_Science_, University_of_Bristol_
+
+.. _TreeVector: http://supfam.cs.bris.ac.uk/TreeVector/about.html
+.. _Ralph_Pethica: http://www.cs.bris.ac.uk/home/pethica/
+.. _Department_of_Computer_Science: http://www.cs.bris.ac.uk/
+.. _University_of_Bristol: http://www.bris.ac.uk/
+
+ </help>
+</tool>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/align.check.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,45 @@
+<tool id="mothur_align_check" name="Align.check" version="1.15.0">
+ <description>Calculate the number of potentially misaligned bases</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+   --cmd='align.check'
+   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.align\.check$:'$out_file
+   --outputdir='$logfile.extra_files_path'
+   --fasta=$fasta
+   --map=$map
+ </command>
+  <inputs>
+   <param name="fasta" type="data" format="align" label="fasta - Sequences"/>
+   <param name="map" type="select" label="map - Select a secondary structure map" help="Contact Galaxy team for additions">
+    <options from_file="mothur_map.loc">
+     <column name="name" index="0" />
+     <column name="value" index="1" />
+    </options>
+   </param>
+  </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="align.check" name="out_file" label="${tool.name} on ${on_string}: align.check"/>
+ </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 align.check_ command allows you to calculate the number of potentially misaligned bases in a 16S rRNA gene sequence alignment.
+
+.. _align.check: http://www.mothur.org/wiki/Align.check
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/align.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,117 @@
+<tool id="mothur_align_seqs" name="Align.seqs" version="1.15.0">
+ <description>Align sequences to a template alignment</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='align.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.align$:'$out_file,'^\S+\.align\.report$:'$report
+  --outputdir='$logfile.extra_files_path'
+  --candidate=$candidate
+  --template=$alignment.template
+  #if $search.method == 'kmer': 
+   --ksize=$search.ksize
+  #else: 
+   --search=$search.method
+  #end if
+  --align=$align
+  #if $scoring.adjust == 'yes': 
+   --match=$scoring.match
+   --mismatch=$scoring.mismatch
+   --gapopen=$scoring.gapopen
+   --gapextend=$scoring.gapextend
+  #end if
+  #if $reverse.flip == 'yes': 
+   --flip=true
+   --threshold=$reverse.threshold
+  #end if
+ </command>
+ <inputs>
+  <param name="candidate" type="data" format="fasta" label="candidate - Candiate Sequences"/>
+  <conditional name="alignment">
+   <param name="source" type="select" label="Select Template from" help="">
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+   </param>
+   <when value="ref">
+    <param name="template" type="select" label="template - Select an alignment database " help="">
+     <options from_file="mothur_aligndb.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="template" type="data" format="fasta" label="template - Template to align with" help=""/>
+   </when>
+  </conditional>
+  <conditional name="search">
+   <param name="method" type="select" label="Select a search method" help="">
+    <option value="kmer">kmer (default)</option>
+    <option value="suffix">suffix tree</option>
+    <option value="blast">blast</option>
+   </param>
+   <when value="kmer">
+    <param name="ksize" type="integer" value="8" label="ksize - kmer length between 5 and 12"/>
+   </when>
+   <when value="suffix"/>
+   <when value="blast"/>
+  </conditional>
+  <param name="align" type="select" label="align - Select a pairwise alignment method" help="">
+   <option value="needleman">needleman (default)</option>
+   <option value="gotoh">gotoh</option>
+   <option value="blast">blast</option>
+  </param>
+
+  <conditional name="scoring">
+   <param name="adjust" type="select" label="Alignment scoring values" help="">
+    <option value="no">use defaults</option>
+    <option value="yes">adjust values</option>
+   </param>
+   <when value="no"/>
+   <when value="yes">
+    <param name="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/>
+    <param name="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/>
+    <param name="gapopen" type="integer" value="-2" label="gapopen - Pairwise alignment penalty for opening a gap"/>
+    <param name="gapextend" type="integer" value="-1" label="gapextend - Pairwise alignment penalty for extending a gap"/>
+   </when>
+  </conditional>
+
+  <conditional name="reverse">
+   <param name="flip" type="select" label="flip - Try to align against the reverse complement" help="">
+    <option value="no">No</option>
+    <option value="yes">Yes values</option>
+   </param>
+   <when value="no"/>
+   <when value="yes">
+    <param name="threshold" type="float" value=".5" label="threshold - Cutoff (0. - 1.) at which an alignment is deemed 'bad' and the reverse complement may be tried."/>
+   </when>
+  </conditional>
+
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="align" name="out_file" label="${tool.name} on ${on_string}: align" />
+  <data format="align.report" name="report" label="${tool.name} on ${on_string}: align.report" />
+ </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 align.seqs_ command aligns a user-supplied fasta-formatted candidate sequence file to a user-supplied fasta-formatted template alignment.
+
+.. _align.seqs: http://www.mothur.org/wiki/Align.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/bin.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,55 @@
+<tool id="mothur_bin_seqs" name="Bin.seqs" version="1.15.0" force_history_refresh="True">
+ <description>Order Sequences by OTU</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='bin.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__' 
+  --new_datasets='^\S+?\.(unique|[0-9.]*)\.fasta$:fasta'
+  --fasta=$fasta
+  --READ_cmd='read.otu'
+  --READ_list=$otu
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --name=$name
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequences to Bin"/>
+  <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+  <param name="name" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+  <param name="label" type="select" label="label - OTU Labels" multiple="true">
+   <options from_dataset="otu">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 bin.seqs_ command prints out a fasta-formatted file where sequences are ordered according to the OTU that they belong to. Such an output may be helpful for generating primers specific to an OTU or for classification of sequences.
+
+.. _bin.seqs: http://www.mothur.org/wiki/Bin.seqs
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/chimera.bellerophon.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,54 @@
+<tool id="mothur_chimera_bellerophon" name="Chimera.bellerophon" version="1.15.0">
+ <description>Find putative chimeras using bellerophon</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='chimera.bellerophon'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.bellerophon\.chimeras$:'$out_file,'^\S+\.bellerophon\.accnos$:'$out_accnos
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  $filter
+  $correction
+  #if int($window.__str__) > 0:
+   --window=$window
+  #end if
+  #if int($increment.__str__) > 0:
+   --increment=$increment
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+  <param name="filter" type="boolean" falsevalue="" truevalue="--filter=true" checked="false" label="filter - Apply a 50% soft vertical filter"/>
+  <param name="correction" type="boolean" falsevalue="--correction=false" truevalue="" checked="true" label="correction - Use the square root of the distances instead of the distance value"/>
+  <param name="window" type="integer" value="0" label="window - Length of sequence you want in each window analyzed (uses default if &lt; 1)" 
+         help="Default is 25% of the sequence length."/>
+  <param name="increment" type="integer" value="25" label="increment - Increment for window slide on each iteration (uses default if &lt; 1)"
+         help="Default is 25, but you may set it up to sequence length minus twice the window."/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="txt" name="out_file" label="${tool.name} on ${on_string}: bellerophon.chimeras" />
+  <data format="accnos" name="out_accnos" label="${tool.name} on ${on_string}: bellerophon.accnos" />
+ </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 chimera.bellerophon_ command identifies putative chimeras using the bellerophon approach.
+
+.. _chimera.bellerophon: http://www.mothur.org/wiki/Chimera.bellerophon
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/chimera.ccode.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,87 @@
+<tool id="mothur_chimera_ccode" name="Chimera.ccode" version="1.15.0">
+ <description>Find putative chimeras using ccode</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='chimera.ccode'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.ccode\.chimeras$:'$out_file,'^\S+\.ccode\.accnos$:'$out_accnos
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --template=$alignment.template
+  $filter
+  #if $mask.source == 'default':
+   --mask=default
+  #elif $mask.source == 'history':
+   --mask=$mask.input
+  #end if
+  #if int($window.__str__) > 0:
+   --window=$window
+  #end if
+  #if int($numwanted.__str__) > 0:
+   --numwanted=$numwanted
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+  <conditional name="alignment">
+   <param name="source" type="select" label="Select Template from" help="">
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+   </param>
+   <when value="ref">
+    <param name="template" type="select" label="template - Select an alignment database " help="">
+     <options from_file="mothur_aligndb.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="template" type="data" format="fasta" label="template - Template to align with" help=""/>
+   </when>
+  </conditional>
+  <param name="filter" type="boolean" falsevalue="" truevalue="--filter=true" checked="false" label="filter - Apply a 50% soft vertical filter"/>
+  <!-- mask -->
+  <conditional name="mask">
+   <param name="source" type="select" label="Mask option">
+    <option value="">None</option>
+    <option value="default">default ecoli mask</option>
+    <option value="history">From your history</option>
+   </param>
+   <when value=""/>
+   <when value="default"/>
+   <when value="history">
+    <param name="input" type="data" format="filter" label="Mask for the template file" help=""/>
+   </when>
+  </conditional>
+  <param name="window" type="integer" value="0" label="window - Length of sequence you want in each window analyzed (default if &lt; 1)" 
+         help="Recommended window size is between 5 and 20% of your trimmed sequence length. Default is 10% of the sequence length."/>
+  <param name="numwanted" type="integer" value="20" label="numwanted - Number of sequences compared with each query (uses default if set to 0)"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="txt" name="out_file" label="${tool.name} on ${on_string}: ccode.chimeras" />
+  <data format="accnos" name="out_accnos" label="${tool.name} on ${on_string}: ccode.accnos" />
+ </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 chimera.ccode_ command identifies putative chimeras using the ccode approach.
+
+.. _chimera.ccode: http://www.mothur.org/wiki/Chimera.ccode
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/chimera.check.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,84 @@
+<tool id="mothur_chimera_check" name="Chimera.check" version="1.15.0" force_history_refresh="True">
+ <description>Find putative chimeras using chimeraCheck</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='chimera.check'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.chimeracheck\.chimeras$:'$out_file
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --template=$alignment.template
+  #if int($ksize.__str__) > 0:
+   --ksize=$ksize
+  #end if
+  #if int($increment.__str__) > 0:
+   --increment=$increment
+  #end if
+  #if $svg.gen == 'yes':
+   --svg=true
+   --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+   --new_datasets='^(\S+)\.chimeracheck\.svg$:svg'
+   #if $name.__str__ != "None" and len($name.__str__) > 0:
+    --name='$name'
+   #end if
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+  <conditional name="alignment">
+   <param name="source" type="select" label="Select Template from" help="">
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+   </param>
+   <when value="ref">
+    <param name="template" type="select" label="template - Select an alignment database " help="">
+     <options from_file="mothur_aligndb.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="template" type="data" format="fasta" label="template - Template to align with" help=""/>
+   </when>
+  </conditional>
+  <param name="ksize" type="integer" value="7" label="ksize - kmer length to determine differences between sequence fragments (uses default if &lt; 1)"/>
+  <param name="increment" type="integer" value="10" label="increment - Increment for window slide on each iteration (uses default if &lt; 1)"
+         help="Default is 10, but you may set it up to sequence length minus twice the window."/>
+  <conditional name="svg">
+   <param name="gen" type="select" label="svg - Generate a SVG plot for each query sequence" help="">
+    <option value="no" selected="true">No</option>
+    <option value="yes">Yes</option>
+   </param>
+   <when value="no"/>
+   <when value="yes">
+    <param name="name" type="data" format="names" optional="true" label="name - Names of queries for which to generate SVG plot"/>
+   </when>
+  </conditional>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="txt" name="out_file" label="${tool.name} on ${on_string}: chimeracheck.chimeras" />
+ </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 chimera.check_ command identifies putative chimeras using the chimeraCheck approach. Note: following the RDP model this method does not determine whether or not a sequence is chimeric, but allows you to determine that based on the IS values produced.
+
+.. _chimera.check: http://www.mothur.org/wiki/Chimera.check
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/chimera.pintail.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,145 @@
+<tool id="mothur_chimera_pintail" name="Chimera.pintail" version="1.15.0">
+ <description>Find putative chimeras using pintail</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='chimera.pintail'
+  ## --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.pintail\.chimeras$:'$out_file,'^\S+\.pintail\.accnos$:'$out_accnos,'^\S+\.freq$:'$out_freq,'^\S+\.quan$:'$out_quantile
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
+  #set results = $results + ["'^\S+\.pintail\.chimeras$:'" + $out_file.__str__]
+  #set results = $results + ["'^\S+\.pintail\.accnos$:'" + $out_accnos.__str__]
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --template=$alignment.template
+  $filter
+  #if $mask.source == 'default':
+   --mask=default
+  #elif $mask.source == 'history':
+   --mask=$mask.input
+  #end if
+  #if $conservation.__str__ != "None" and len($conservation.__str__) > 0:
+   --conservation='$conservation'
+  #else
+   #set results = $results + ["'^\S+\.freq$:'" + $out_freq.__str__]
+  #end if
+  #if $quantile.__str__ != "None" and len($quantile.__str__) > 0:
+   --quantile='$quantile'
+  #else
+   #set results = $results + ["'^\S+\.quan$:'" + $out_quantile.__str__]
+  #end if
+  #if int($window.__str__) > 0:
+   --window=$window
+  #end if
+  #if int($increment.__str__) > 0:
+   --increment=$increment
+  #end if
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+  <conditional name="alignment">
+   <param name="source" type="select" label="Select Template from" help="">
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+   </param>
+   <when value="ref">
+    <param name="template" type="select" label="template - Select an alignment database " help="">
+     <options from_file="mothur_aligndb.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="template" type="data" format="fasta" label="template - Template to align with" help=""/>
+   </when>
+  </conditional>
+  <param name="filter" type="boolean" falsevalue="" truevalue="--filter=true" checked="false" label="filter - Apply a 50% soft vertical filter"/>
+  <!-- mask -->
+  <conditional name="mask">
+   <param name="source" type="select" label="Mask option">
+    <option value="">None</option>
+    <option value="default">default ecoli mask</option>
+    <option value="history">From your history</option>
+   </param>
+   <when value=""/>
+   <when value="default"/>
+   <when value="history">
+    <param name="input" type="data" format="filter" label="Mask for the template file" help=""/>
+   </when>
+  </conditional>
+  <param name="conservation" type="data" format="freq" optional="true" label="conservation - Template Conserved frequencies"
+         help="a file containing the frequency information for your template file to increase speed. Mothur will generate this for you but it takes a long time.">
+   <validator type="metadata" metadata_name="columns" />
+  </param>
+  <param name="quantile" type="data" format="quan" optional="true" label="quantile - Template quantile information"
+         help=" file containing the quantiles information for your template file to increase speed. Mothur can generate this for you but it takes a VERY long time.  Note that when you use the filter, mask or mask and filter you need to select the appropriate quantile file. The filter parameter makes the quantile file generated specific to the query set you are analyzing."/>
+  <param name="window" type="integer" value="0" label="window - Length of sequence you want in each window analyzed (uses default if &lt; 1)" 
+         help="Default is set to 300. Note, changing the window size will require new quantile files to be made."/>
+  <param name="increment" type="integer" value="25" label="increment - Increment for window slide on each iteration (uses default if &lt; 1)"
+         help="Default is 25. Note, changing the increment will require new quantile files to be made."/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="txt" name="out_file" label="${tool.name} on ${on_string}: pintail.chimeras" />
+  <data format="accnos" name="out_accnos" label="${tool.name} on ${on_string}: pintail.accnos" />
+  <data format="freq" name="out_freq" label="${tool.name} on ${on_string}: pintail.freq" >
+   <filter>conservation == None</filter>
+  </data>
+  <data format="quan" name="out_quantile" label="${tool.name} on ${on_string}: pintail.quan" >
+   <filter>quantile == None</filter>
+   <!-- The following is not working, need to see if filter param can be referenced -->
+   <actions>
+    <conditional name="filter">
+     <when value="True">
+       <conditional name="mask">
+        <when value="">
+         <action type="format" default="filtered.quan"/>
+        </when>
+        <when value="default">
+         <action type="format" default="filtered.masked.quan"/>
+        </when>
+        <when value="history">
+         <action type="format" default="filtered.masked.quan"/>
+        </when>
+       </conditional>
+     </when>
+     <when value="False">
+       <conditional name="mask">
+        <when value="">
+         <action type="format" default="quan"/>
+        </when>
+        <when value="default">
+         <action type="format" default="masked.quan"/>
+        </when>
+        <when value="history">
+         <action type="format" default="masked.quan"/>
+        </when>
+       </conditional>
+     </when>
+    </conditional>
+   </actions>
+  </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 chimera.pintail_ command identifies putative chimeras using the pintail approach.
+
+.. _chimera.pintail: http://www.mothur.org/wiki/Chimera.pintail
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/chimera.slayer.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,100 @@
+<tool id="mothur_chimera_slayer" name="Chimera.slayer" version="1.15.0">
+ <description>Find putative chimeras using slayer</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='chimera.slayer'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.slayer\.chimeras$:'$out_file,'^\S+\.slayer\.accnos$:'$out_accnos
+  --outputdir='$logfile.extra_files_path'
+  --tmpdir='${logfile.extra_files_path}/input'
+  --fasta=$fasta
+  --template=$alignment.template
+  #if $options.setby == 'user':
+   --search=$options.search
+   --window=$options.window
+   --increment=$options.increment
+   --match=$options.match
+   --mismatch=$options.mismatch
+   --numwanted=$options.numwanted
+   --parents=$options.parents
+   --minsim=$options.minsim
+   --mincov=$options.mincov
+   --iters=$options.iters
+   --minbs=$options.minbs
+   --minsnp=$options.minsnp
+   --divergence=$options.divergence
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+  <conditional name="alignment">
+   <param name="source" type="select" label="Select Template from" help="">
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+   </param>
+   <when value="ref">
+    <param name="template" type="select" label="template - Select an alignment database " help="">
+     <options from_file="mothur_aligndb.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="template" type="data" format="fasta" label="template - Template to align with" help=""/>
+   </when>
+  </conditional>
+  <conditional name="options">
+   <param name="setby" type="select" label="Slayer Options" help="">
+    <option value="default">Use default settings</option>
+    <option value="user">Manually set options</option>
+   </param>
+   <when value="default"/>
+   <when value="user">
+    <param name="search" type="select" label="search - Search method for finding the closest parent" help="">
+     <option value="distance" selected="true">distance</option>
+     <option value="kmer">kmer</option>
+     <option value="blast">blast</option>
+    </param>
+    <param name="window" type="integer" value="50" label="window - Window size for searching for chimeras (default 50)" />
+    <param name="increment" type="integer" value="5" label="increment - Increment for window slide on each iteration (default 5)" />
+    <param name="match" type="integer" value="5" label="match - Reward matched bases (default 5)"/>
+    <param name="mismatch" type="integer" value="-4" label="mismatch - Penalty for mismatched bases (default -4)"/>
+    <param name="numwanted" type="integer" value="15" label="numwanted - Number of potential parents to to compare with query sequence (default 15)"/>
+    <param name="parents" type="integer" value="3" label="parents - Number of potential parents to investigate from the numwanted best matches"/>
+    <param name="minsim" type="integer" value="90" label="minsim - Minimum similarity % between the query and parent (default 90)"/>
+    <param name="mincov" type="integer" value="70" label="mincov - Minimum coverage % of closest matches in template and the query (default 70)"/>
+    <param name="iters" type="integer" value="100" label="iters - Number of bootstrap iterations to try (default 100)"/>
+    <param name="minbs" type="integer" value="90" label="minbs - Minimum bootstrap support % for calling a sequence chimeric (default 90)"/>
+    <param name="minsnp" type="integer" value="100" label="minsnp - Percent of SNPs to sample on each side of breakpoint for computing bootstrap support (default 100)"/>
+    <param name="divergence" type="float" value="1.007" label="divergence - Divergence cutoff for chimera determination (default 1.007)"/>
+   </when>
+  </conditional>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="txt" name="out_file" label="${tool.name} on ${on_string}: slayer.chimeras" />
+  <data format="accnos" name="out_accnos" label="${tool.name} on ${on_string}: slayer.accnos" />
+ </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 chimera.slayer_ command identifies putative chimeras using the slayer approach.
+
+.. _chimera.slayer: http://www.mothur.org/wiki/Chimera.slayer
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/chop.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,50 @@
+<tool id="mothur_chop_seqs" name="Chop.seqs" version="1.15.0">
+ <description>Trim sequences to a specified length</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='chop.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+.chop\.fasta$:'$out_fasta
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --numbases=$numbases
+  --keep=$keep
+  $countgaps
+  $short
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Dataset"/>
+  <param name="numbases" type="integer" value="10" label="numbases - Number of bases to keep"/>
+  <param name="keep" type="select" label="keep - Part of the sequence to keep">
+   <option value="front">front</option>
+   <option value="back">back</option>
+  </param>
+  <param name="countgaps" type="boolean" truevalue="--countgaps=true" falsevalue="" checked="false" label="countgaps - Count gaps as bases"/>
+  <param name="short" type="boolean" truevalue="--short=true" falsevalue="" checked="false" label="short - keep sequences that are too short to chop"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_fasta" label="${tool.name} on ${on_string}: chop.fasta" />
+ </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 chop.seqs_ command reads a fasta file and outputs a .chop.fasta containing the trimmed sequences. It works on both aligned and unaligned sequences.
+
+.. _chop.seqs: http://www.mothur.org/wiki/Chop.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/classify.otu.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,73 @@
+<tool id="mothur_classify_otu" name="Classify.otu" version="1.15.0" force_history_refresh="True">
+ <description>Assign sequences to taxonomy</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='classify.otu'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.(unique|[0-9.]*\.cons\.taxonomy)$:cons.taxonomy'
+  --list=$otu
+  --taxonomy=$tax.taxonomy
+  #if 100 >= int($cutoff.__str__) > 0:
+   --cutoff=$cutoff
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+  $probs
+ </command>
+ <inputs>
+  <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List "/>
+  <conditional name="tax">
+   <param name="source" type="select" label="Select Taxonomy from" help="">
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+   </param>
+   <when value="ref">
+    <param name="taxonomy" type="select" format="taxonomy" label="taxonomy - Taxonomy Reference">
+     <options from_file="mothur_taxonomy.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="taxonomy" type="data" format="taxonomy" label="taxonomy - Taxonomy Reference"/>
+   </when>
+  </conditional>
+  <param name="label" type="select" label="label - OTU Labels" multiple="true">
+   <options from_dataset="otu">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+  <param name="cutoff" type="integer" value="60" label="cutoff - Confindence percentage cutoff between 1 and 100"/>
+  <param name="probs" type="boolean" falsevalue="--probs=false" truevalue="" checked="true" label="probs - Show probabilities"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 classify.otu_ command assigns sequences to chosen taxonomy outline.
+
+.. _classify.otu: http://www.mothur.org/wiki/Classify.otu
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/classify.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,138 @@
+<tool id="mothur_classify_seqs" name="Classify.seqs" version="1.15.0">
+ <description>Assign sequences to taxonomy</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='classify.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.taxonomy$:'$taxonomy_out,'^\S+\.tax\.summary$:'$tax_summary
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --template=$alignment.template
+  --taxonomy=$tax.taxonomy
+  #if $classify.method == 'bayesian': 
+   --method=$classify.method
+   #if 15 >= int($classify.ksize.__str__) >= 4:
+    --ksize=$classify.ksize
+   #end if
+   #if int($classify.iters.__str__) > 0:
+    --iters=$classify.iters
+   #end if
+   #if 100 >= int($classify.cutoff.__str__) > 0:
+    --cutoff=$classify.cutoff
+   #end if
+   $classify.probs
+  #elif $classify.method == 'knn': 
+   --method=$classify.method
+   --numwanted=$classify.search.numwanted
+   #if $classify.search.algorithm == 'kmer':
+    --search=$classify.search.algorithm
+    --ksize=$classify.search.ksize
+   #elif $classify.search.algorithm == 'blast':
+    --search=$classify.search.algorithm
+    --match=$classify.search.match
+    --mismatch=$classify.search.mismatch
+    --gapopen=$classify.search.gapopen
+    --gapextend=$classify.search.gapextend
+   #elif $classify.knn.search == 'suffix':
+    --search=$classify.search.algorithm
+   #elif $classify.search.algorithm == 'distance':
+    --search=$classify.search.algorithm
+   #end if
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+  <conditional name="alignment">
+   <param name="source" type="select" label="Select Template from" help="">
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+   </param>
+   <when value="ref">
+    <param name="template" type="select" label="template - Select an alignment database " help="">
+     <options from_file="mothur_aligndb.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="template" type="data" format="fasta" label="template - Template to align with" help=""/>
+   </when>
+  </conditional>
+  <conditional name="tax">
+   <param name="source" type="select" label="Select Taxonomy from" help="">
+    <option value="ref">Cached Reference</option>
+    <option value="hist">History</option>
+   </param>
+   <when value="ref">
+    <param name="taxonomy" type="select" format="taxonomy" label="taxonomy - Taxonomy reference">
+     <options from_file="mothur_taxonomy.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="taxonomy" type="data" format="taxonomy" label="taxonomy - Taxonomy reference"/>
+   </when>
+  </conditional>
+  <conditional name="classify">
+   <param name="method" type="select" label="method - Select a classification method" help="">
+    <option value="bayesian">Bayesian (default)</option>
+    <option value="knn">K-Nearest Neighbor (knn)</option>
+   </param>
+   <when value="bayesian">
+    <param name="ksize" type="integer" value="8" label="ksize - kmer length between 5 and 12"/>
+    <param name="iters" type="integer" value="100" label="iters - iterations to do when calculating the bootstrap confidence score"/>
+    <param name="cutoff" type="integer" value="60" label="cutoff - Confindence percentage cutoff between 1 and 100"/>
+    <param name="probs" type="boolean" falsevalue="--probs=false" truevalue="" checked="true" label="probs - Show probabilities"/>
+   </when>
+   <when value="knn">
+    <param name="numwanted" type="integer" value="10" label="numwanted - "/>
+    <conditional name="search">
+     <param name="algorithm" type="select" label="algorithm - " help="">
+      <option value="kmer">Kmer (default)</option>
+      <option value="blast">BLAST</option>
+     </param>
+     <when value="kmer">
+      <param name="ksize" type="integer" value="8" label="ksize - kmer length between 5 and 12"/>
+     </when>
+     <when value="blast">
+      <param name="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/>
+      <param name="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/>
+      <param name="gapopen" type="integer" value="-2" label="gapopen - Pairwise alignment penalty for opening a gap"/>
+      <param name="gapextend" type="integer" value="-1" label="gapextend - Pairwise alignment penalty for extending a gap"/>
+     </when>
+     <when value="suffix"/>
+     <when value="distance"/>
+    </conditional>
+   </when>
+  </conditional>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: taxonomy" />
+  <data format="tax.summary" name="tax_summary" label="${tool.name} on ${on_string}: tax.summary" />
+ </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 classify.seqs_ command assigns sequences to chosen taxonomy outline.
+
+.. _classify.seqs: http://www.mothur.org/wiki/Classify.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/clearcut.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,87 @@
+<tool id="mothur_clearcut" name="Clearcut" version="1.15.0">
+ <description>Generate a tree using relaxed neighbor joining</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='clearcut'
+  #if $matrixout == True or $matrixout.__str__ == "true":
+   --matrixout='matrixout.dist'
+   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.tre$:'$tree,'^matrixout\.dist$:'$matrix
+  #else 
+   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.tre$:'$tree
+  #end if
+  --outputdir='$logfile.extra_files_path'
+  #if $input.source == 'dna':
+   --fasta=$input.fasta
+   --DNA=true
+  #elif $input.source == 'aa':
+   --fasta=$input.fasta
+   --protein=true
+  #elif $input.source == 'phylip':
+   --phylip=$input.dist
+  #end if
+  #if int($seed.__str__) >= 0:
+   --seed=$seed
+  #end if
+  #if int($ntrees.__str__) > 1:
+   --ntrees=$ntrees
+  #end if
+  $norandom
+  $shuffle
+  $neighbor
+ </command>
+ <inputs>
+  <!-- get.relabund  relabund type should also work -->
+  <conditional name="input">
+   <param name="source" type="select" label="Distance Matrix">
+    <option value="dna">DNA Alignment Fasta</option>
+    <option value="aa">Protein Alignment Fasta</option>
+    <option value="phylip">Phylip Distance Matrix</option>
+   </param>
+   <when value="dna">
+    <param name="fasta" type="data" format="align" label="fasta - Alignment Fasta"/>
+   </when>
+   <when value="aa">
+    <param name="fasta" type="data" format="align" label="fasta - Alignment Fasta"/>
+   </when>
+   <when value="phylip">
+    <param name="dist" type="data" format="lower.dist,square.dist" label="phylip - Distance Matrix"/>
+   </when>
+  </conditional>
+  <param name="seed" type="integer" value="-1" label="seed - Set the PRNG seed to a specific value (ignored if negative)"/>
+  <param name="ntrees" type="integer" value="1" label="ntrees - the number of output trees you want clearcut to generate (ignored if &lt; 1)"/>
+  <param name="norandom" type="boolean" checked="false" truevalue="--norandom=true" falsevalue="" label="norandom - Attempt joins deterministically"/>
+  <param name="shuffle" type="boolean" checked="false" truevalue="--shuffle=true" falsevalue="" label="shuffle - Randomly shuffle the distance matrix"/>
+  <param name="neighbor" type="boolean" checked="false" truevalue="--neighbor=true" falsevalue="" label="neighbor - Use traditional Neighbor-Joining algorithm"/>
+  <param name="expblen" type="boolean" checked="false" truevalue="--expblen=true" falsevalue="" label="expblen - Use exponential notation for branch lengths"/>
+  <param name="expdist" type="boolean" checked="false" truevalue="--expdist=true" falsevalue="" label="expdist - Use exponential notation for distance"/>
+  <param name="matrixout" type="boolean" checked="false" truevalue="true" falsevalue="" label="matrixout - Generate a Distance Matrix"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tre" name="tree" label="${tool.name} on ${on_string}: tree" />
+  <data format="lower.dist" name="matrix" label="${tool.name} on ${on_string}: Phylip Distance Matrix" >
+   <filter>matrixout == True</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 clearcut_ command runs clearcut
+
+.. _clearcut: http://www.mothur.org/wiki/Clearcut
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/cluster.classic.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,97 @@
+<tool id="mothur_cluster_classic" name="Cluster.classic" version="1.15.0">
+ <description>Assign sequences to OTUs (Dotur implementation)</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='cluster.classic'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.[fna]n\.sabund$:'$sabund,'^\S+\.[fna]n\.rabund$:'$rabund,'^\S+\.[fna]n\.list$:'$otulist
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.dist'
+  #if $matrix.format == "column":
+   --READ_column=$matrix.dist
+   --READ_name=$matrix.name
+  #elif $matrix.format == "phylip":
+   --READ_phylip=$matrix.dist
+   #if $matrix.name.__str__ != "None" and len($matrix.name.__str__) > 0:
+    --READ_name=$matrix.name
+   #end if
+  #end if
+  $sim
+  #if float($cutoff.__str__) > 0.0:
+   --READ_cutoff=$cutoff
+  #end if
+  $hard
+  #if len($precision.__str__) > 0:
+   --READ_precision=$precision
+  #end if
+  #if len($method.__str__) > 0:
+   --method=$method
+  #end if
+ </command>
+ <inputs>
+  <conditional name="matrix">
+   <param name="format" type="select" label="Select a Distance Matrix Format" help="">
+    <option value="column">Pairwise Column Matrix</option>
+    <option value="phylip">Phylip Distance Matrix</option>
+   </param>
+   <when value="column">
+    <param name="dist" type="data" format="pair.dist" label="read.dist(column=) - Distance Matrix"/>
+    <param name="name" type="data" format="names" label="read.dist(name=) - Sequences Name reference"/>
+   </when>
+   <when value="phylip">
+    <param name="dist" type="data" format="lower.dist,square.dist" label="read.dist(phylip=) - Distance Matrix"/>
+    <param name="name" type="data" format="names" optional="true" label="read.dist(name=) - Sequences Name reference"/>
+   </when>
+  </conditional>
+  <!-- ? conditional - to hide complexity -->
+  <param name="method" type="select" label="method - Select a Clustering Method" help="">
+   <option value="furthest" selected="true">Furthest neighbor</option>
+   <option value="nearest">Nearest neighbor</option>
+   <option value="average">Average neighbor</option>
+   <option value="weighted">Weighted</option>
+  </param>
+  <param name="cutoff" type="float" value="0.0" label="cutoff - Distance Cutoff threshold - ignored if not > 0" 
+                 help="Ignore pairwise distances larger than this, a common value would be 0.10"/>
+  <param name="hard" type="boolean" checked="false" truevalue="--hard=true" falsevalue="" label="hard - Use hard cutoff instead of rounding" 
+                 help=""/>
+  <param name="precision" type="select" optional="true" label="precision - Precision for rounding distance values"
+                 help="Set higher precision for longer genome scale sequence lengths">
+   <option value="10">.1</option>
+   <option value="100" selected="true">.01</option>
+   <option value="1000">.001</option>
+   <option value="10000">.0001</option>
+   <option value="100000">.00001</option>
+   <option value="1000000">.000001</option>
+  </param>
+  <param name="sim" type="boolean" checked="false" truevalue="--READ_sim=true" falsevalue="" label="sim - Matrix values are Similary instead of Distance" 
+                 help=""/>
+
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="rabund" name="rabund" label="${tool.name} on ${on_string}: rabund (Rank)"/>
+  <data format="sabund" name="sabund" label="${tool.name} on ${on_string}: sabund (Species)"/>
+  <data format="list" name="otulist" label="${tool.name} on ${on_string}: list (OTU List)"/>
+ </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 cluster.classic_ command assign sequences to OTUs (Operational Taxonomy Unit). 
+
+.. _cluster.classic: http://www.mothur.org/wiki/Cluster.classic
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/cluster.fragments.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,42 @@
+<tool id="mothur_cluster_fragments" name="Cluster.fragments" version="1.15.0">
+ <description> Group sequences that are part of a larger sequence</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='cluster.fragments'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.fragclust\.\w+$:'$out_fasta,'^\S+\.names$:'$out_names
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --name=$names
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequences to filter"/>
+  <param name="names" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_fasta" label="${tool.name} on ${on_string}: fasta" />
+  <data format="names" name="out_names" label="${tool.name} on ${on_string}: names" />
+ </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 cluster.fragments_ command groups sequences that are part of a larger sequence.
+
+.. _cluster.fragments: http://www.mothur.org/wiki/Cluster.fragments
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/cluster.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,97 @@
+<tool id="mothur_cluster" name="Cluster" version="1.15.0">
+ <description>Assign sequences to OTUs (Operational Taxonomic Unit)</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='cluster'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.[fna]n\.sabund$:'$sabund,'^\S+\.[fna]n\.rabund$:'$rabund,'^\S+\.[fna]n\.list$:'$otulist
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.dist'
+  #if $matrix.format == "column":
+   --READ_column=$matrix.dist
+   --READ_name=$matrix.name
+  #elif $matrix.format == "phylip":
+   --READ_phylip=$matrix.dist
+   #if $matrix.name.__str__ != "None" and len($matrix.name.__str__) > 0:
+    --READ_name=$matrix.name
+   #end if
+  #end if
+  $sim
+  #if float($cutoff.__str__) > 0.0:
+   --READ_cutoff=$cutoff
+  #end if
+  $hard
+  #if len($precision.__str__) > 0:
+   --READ_precision=$precision
+  #end if
+  #if len($method.__str__) > 0:
+   --method=$method
+  #end if
+ </command>
+ <inputs>
+  <conditional name="matrix">
+   <param name="format" type="select" label="Select a Distance Matrix Format" help="">
+    <option value="column">Pairwise Column Matrix</option>
+    <option value="phylip">Phylip Distance Matrix</option>
+   </param>
+   <when value="column">
+    <param name="dist" type="data" format="pair.dist" label="read.dist(column=) - Distance Matrix"/>
+    <param name="name" type="data" format="names" label="read.dist(name=) - Sequences Name reference"/>
+   </when>
+   <when value="phylip">
+    <param name="dist" type="data" format="lower.dist,square.dist" label="read.dist(phylip=) - Distance Matrix"/>
+    <param name="name" type="data" format="names" optional="true" label="read.dist(name=) - Sequences Name reference"/>
+   </when>
+  </conditional>
+  <!-- ? conditional - to hide complexity -->
+  <param name="method" type="select" label="method - Select a Clustering Method" help="">
+   <option value="furthest" selected="true">Furthest neighbor</option>
+   <option value="nearest">Nearest neighbor</option>
+   <option value="average">Average neighbor</option>
+   <option value="weighted">Weighted</option>
+  </param>
+  <param name="cutoff" type="float" value="0.0" label="cutoff - Distance Cutoff threshold - ignored if not > 0" 
+                 help="Ignore pairwise distances larger than this, a common value would be 0.10"/>
+  <param name="hard" type="boolean" checked="false" truevalue="--hard=true" falsevalue="" label="hard - Use hard cutoff instead of rounding" 
+                 help=""/>
+  <param name="precision" type="select" optional="true" label="precision - Precision for rounding distance values"
+                 help="Set higher precision for longer genome scale sequence lengths">
+   <option value="10">.1</option>
+   <option value="100" selected="true">.01</option>
+   <option value="1000">.001</option>
+   <option value="10000">.0001</option>
+   <option value="100000">.00001</option>
+   <option value="1000000">.000001</option>
+  </param>
+  <param name="sim" type="boolean" checked="false" truevalue="--READ_sim=true" falsevalue="" label="sim - Matrix values are Similary instead of Distance" 
+                 help=""/>
+
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="rabund" name="rabund" label="${tool.name} on ${on_string}: rabund (Rank)"/>
+  <data format="sabund" name="sabund" label="${tool.name} on ${on_string}: sabund (Species)"/>
+  <data format="list" name="otulist" label="${tool.name} on ${on_string}: list (OTU List)"/>
+ </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 cluster_ command assign sequences to OTUs (Operational Taxonomy Unit). 
+
+.. _cluster: http://www.mothur.org/wiki/Cluster
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/collect.shared.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,112 @@
+<tool id="mothur_collect_shared" name="Collect.shared" version="1.15.0" force_history_refresh="True">
+ <description>Generate collector's curves for calculators on OTUs</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='collect.shared'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.(anderberg|braycurtis|jabund|jclass|jest|kstest|kulczynski|kulczynskicody|lennon|morisitahorn|ochiai|shared\.ace|shared\.chao|shared\.nseqs|shared\.sobs|sorabund|sorclass|sorest|thetan|thetayc|whittaker)$:tabular'
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #end if
+  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+    --calc='$calc'
+  #end if
+  $all
+  #if float($freq.__str__) > 0:
+   --freq=$freq
+  #end if
+  #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+   --groups=$input.groups
+  #end if
+ </command>
+ <inputs>
+  <conditional name="input">
+   <param name="source" type="select" label="Generate Collector Curvers for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+     <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to condider" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+   <options from_file="mothur_calulators.loc">
+     <column name="mult" index="1"/>
+     <column name="name" index="0"/>
+     <column name="value" index="0"/>
+     <filter type="static_value" name="mult" column="1" value="shared" />
+   </options>
+  </param>
+  <param name="freq" type="float" value="0.0" label="freq - "/>
+
+  <param name="all" type="boolean" truevalue="--all=true" falsevalue="" checked="false" label="all - Include RAM intensive sharedsobs and sharedchao calculations"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 collect.shared_ command generates collector's curves for calculators, which describe the similarity between communities or their shared richness. Collector's curves describe how richness or diversity change as you sample additional individuals. If a collector's curve becomes parallel to the x-axis, you can be reasonably confident that you have done a good job of sampling and can trust the last value in the curve.
+
+.. _collect.shared: http://www.mothur.org/wiki/Collect.shared
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/collect.single.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,76 @@
+<tool id="mothur_collect_single" name="Collect.single" version="1.15.0" force_history_refresh="True">
+ <description>Summary of calculator values for OTUs</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='collect.single'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+\.(\S+)$:tabular'
+  --READ_cmd='read.otu'
+  --READ_list=$otu
+  #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+   --READ_group='$otu_group'
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+    --calc='$calc'
+  #end if
+  #if int($abund.__str__) > 0:
+   --abund=$abund
+  #end if
+  #if int($size.__str__) > 0:
+   --size=$size
+  #end if
+ </command>
+  #if float($freq.__str__) > 0:
+   --freq=$freq
+  #end if
+ <inputs>
+  <param name="otu" type="data" format="list,shared" label="read.otu(list=) - OTU List"/>
+  <param name="otu_group" type="data" format="groups" optional="true" label="read.otu(group=) - Group file for the OTU List"/>
+  <param name="label" type="select" label="label - OTU Labels" multiple="true">
+   <options from_dataset="otu">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+  <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+   <options from_file="mothur_calulators.loc">
+     <column name="mult" index="1"/>
+     <column name="name" index="0"/>
+     <column name="value" index="0"/>
+     <filter type="static_value" name="mult" column="1" value="single" />
+   </options>
+  </param>
+  <param name="abund" type="integer" value="10" label="abund - ACE Estimator threshold for abundant versus rare OTUs"/>
+  <param name="size" type="integer" value="0" label="size - "/>
+  <param name="freq" type="float" value="0.0" label="freq - "/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 collect.single_ command generates collector's curves using calculators, that describe the richness, diversity, and other features of individual samples. Collector's curves describe how richness or diversity change as you sample additional individuals. If a collector's curve becomes parallel to the x-axis, you can be reasonably confident that you have done a good job of sampling and can trust the last value in the curve. Otherwise, you need to keep sampling.
+
+.. _collect.single: http://www.mothur.org/wiki/Collect.single
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/consensus.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,73 @@
+<tool id="mothur_consensus_seqs" name="Consensus.seqs" version="1.15.0" force_history_refresh="True">
+ <description>Find a consensus sequence for each OTU or phylotype</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='consensus.seqs'
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --name=$name
+  #end if
+  #if $otu.use == 'yes':
+   --list=$otu.list
+   #if $otu.label.__str__ != "None" and len($otu.label.__str__) > 0:
+    --label='$otu.label'
+   #end if
+   --result='^mothur.\S+\.logfile$:'$logfile
+   --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+   --new_datasets='^\S+?\.(((unique|[0-9.]*)\.)?cons\.fasta)$:fasta','^\S+?\.(((unique|[0-9.]*)\.)?cons\.names)$:names','^\S+?\.(((unique|[0-9.]*)\.)?cons\.summary)$:tabular'
+  #else
+   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.cons\.summary$:'$summary,'^\S+\.cons\.fasta$:'$cons_fasta
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequences to Bin" help="Sequences must be the same length"/>
+  <param name="name" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+  <conditional name="otu">
+   <param name="use" type="select" label="Consensus sequence">
+    <option value="no">Single consensus sequence</option>
+    <option value="yes">Consensus sequence for each OTU in list</option>
+   </param>
+   <when value="no"/>
+   <when value="yes">
+    <param name="list" type="data" format="list" label="list - OTU List"/>
+    <param name="label" type="select" optional="true" label="label - OTU Labels" multiple="true">
+     <options from_dataset="list">
+      <column name="name" index="0"/>
+      <column name="value" index="0"/>
+     </options>
+    </param>
+   </when>
+  </conditional> <!-- -->
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="summary" label="${tool.name} on ${on_string}: cons.summary">
+   <filter>otu['use'] == 'no'</filter>
+  </data>
+  <data format="fasta" name="cons_fasta" label="${tool.name} on ${on_string}: cons.fasta">
+   <filter>otu['use'] == 'no'</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 consensus.seqs_ command can be used in 2 ways: create a consensus sequence from a fastafile, or with a listfile create a consensus sequence for each otu. Sequences must be aligned.
+
+.. _consensus.seqs: http://www.mothur.org/wiki/Consensus.seqs
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/degap.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,39 @@
+<tool id="mothur_degap_seqs" name="Degap.seqs" version="1.15.0">
+ <description>Remove gap characters from sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='degap.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+.ng\.\w+$:'$out_fasta
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Dataset"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_fasta" label="${tool.name} on ${on_string}: fasta" />
+ </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 degap.seqs_ command reads a fasta file and outputs a fasta containing the sequences after all gap characters are removed.
+
+.. _degap.seqs: http://www.mothur.org/wiki/Degap.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/deunique.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,41 @@
+<tool id="mothur_deunique_seqs" name="Deunique.seqs" version="1.15.0">
+ <description>Return all sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='deunique.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.redundant\.fasta$:'$out_fasta
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --name=$names
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequences to filter"/>
+  <param name="names" type="data" format="names" optional="true" label="names - Sequences Name reference"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_fasta" label="${tool.name} on ${on_string}: fasta" />
+ </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 deunique.seqs_ command is the reverse of the unique.seqs command, and creates a fasta file from a fasta and name file.
+
+.. _deunique.seqs: http://www.mothur.org/wiki/Deunique.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/dist.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,72 @@
+<tool id="mothur_dist_seqs" name="Dist.seqs" version="1.15.0">
+ <description>calculate uncorrected pairwise distances between aligned sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='dist.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.dist$:'$out_dist
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  #if len($calc.__str__) > 0:
+   --calc=$calc
+  #end if
+  $countends
+  #if float($cutoff.__str__) > 0.0:
+   --cutoff=$cutoff
+  #end if
+  #if len($output.__str__) > 0:
+   --output=$output
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="align" label="fasta - Alignment Fasta"/>
+  <param name="calc" type="select" label="calc - Calc Method - Gap Penality" help="">
+   <option value="">use default</option>
+   <option value="onegap">onegap - counts a string of gaps as a single gap</option>
+   <option value="nogaps">nogaps - ignores gaps</option>
+   <option value="eachgap ">eachgap - penalize each gap</option>
+  </param>
+  <param name="countends" type="boolean" checked="true" truevalue="" falsevalue="--countends=false" label="countends - Penalize terminal gaps"/>
+  <param name="cutoff" type="float" value="0.0" label="cutoff - Distance Cutoff threshold - ignored if not > 0" 
+                 help="Do not save any distances larger than this, a common value would be 0.10"/>
+  <param name="output" type="select" label="output - Distance Matrix Output Format" help="">
+   <option value="">Default Column-Formatted Matrix</option>
+   <option value="lt">Phylip formatted Lower Triangle Matrix</option>
+   <option value="square">Phylip formatted Square Matrix</option>
+  </param>
+  <!--
+   oldfasta
+   column
+  -->
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="pair.dist" name="out_dist" label="${tool.name} on ${on_string}: dist">
+   <change_format>
+    <when input="output" value="lt" format="lower.dist" />
+    <when input="output" value="square" format="square.dist" />
+   </change_format>
+  </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 dist.seqs_ command will calculate uncorrected pairwise distances between aligned sequences.
+
+.. _dist.seqs: http://www.mothur.org/wiki/Dist.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/dist.shared.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,121 @@
+<tool id="mothur_dist_shared" name="Dist.shared" version="1.15.0" force_history_refresh="True">
+ <description>Generate a phylip-formatted dissimilarity distance matrix among multiple groups</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='dist.shared'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  #if len($output.__str__) > 0:
+   #if $output.__str__ == 'square':
+    --new_datasets='^\S+?\.([a-z]+\.(unique|[0-9.]*)\.(square|lt))\.dist$:square.dist'
+   #elif $output.__str__ == 'lt':
+    --new_datasets='^\S+?\.([a-z]+\.(unique|[0-9.]*)\.(square|lt))\.dist$:lower.dist'
+   #end if
+  #else:
+   --new_datasets='^\S+?\.([a-z]+\.(unique|[0-9.]*)\.(square|lt))\.dist$:lower.dist'
+  #end if
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #end if
+  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+   --calc=$calc
+  #end if
+  #if $output.__str__ != "None" and len($output.__str__) > 0:
+   --output=$output
+  #end if
+ </command>
+ <inputs>
+  <!-- list,group  or shared -->
+  <conditional name="input">
+   <param name="source" type="select" label="Generate Collector Curvers for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group=) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+       <filter type="unique_value" name="unq_lbl" column="0" />
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+     <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+       <filter type="unique_value" name="unq_lbl" column="0" />
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+   <options from_file="mothur_calulators.loc">
+     <column name="mult2" index="2"/>
+     <column name="name" index="0"/>
+     <column name="value" index="0"/>
+     <filter type="static_value" name="mult2" column="2" value="shar" />
+   </options>
+  </param>
+  <param name="output" type="select" label="output - Distance Matrix Output Format" help="">
+   <option value="lt">Phylip formatted Lower Triangle Matrix</option>
+   <option value="square">Phylip formatted Square Matrix</option>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 dist.shared_ command will generate a phylip-formatted distance matrix that describes the dissimilarity (1-similarity) among multiple groups.
+
+.. _dist.shared: http://www.mothur.org/wiki/Dist.shared
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/fastq.info.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,40 @@
+<tool id="mothur_fastq_info" name="Fastq.info" version="1.15.0">
+ <description>Convert fastq to fasta and quality</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='fastq.info'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.fasta$:'$out_fasta,'^\S+\.qual$:'$out_qfile
+  --outputdir='$logfile.extra_files_path'
+  --fastq=$fastq
+ </command>
+ <inputs>
+  <param name="fastq" type="data" format="fastq" label="fastq - Fastq Sequence file"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_fasta" label="${tool.name} on ${on_string}: fasta"/>
+  <data format="qual" name="out_qfile" label="${tool.name} on ${on_string}: qual"/>
+ </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 fastq.info_ command reads a fastq file and creates a fasta and quality file.
+
+
+.. _fastq.info: http://www.mothur.org/wiki/Fastq.info
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/filter.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,80 @@
+<tool id="mothur_filter_seqs" name="Filter.seqs" version="1.15.0" force_history_refresh="True">
+ <description>removes columns from alignments</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  --cmd='filter.seqs'
+  ## #set fasta_result = "'" + "^\S+\.filter.fasta$:'" + $out_fasta.__str__
+  #set fasta_result = "'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.filter.fasta$',$os.path.basename($fasta.__str__)) + ":'" + $out_fasta.__str__
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.filter$:'$out_filter,$fasta_result
+  --outputdir='$logfile.extra_files_path'
+  ## filter.seqs creates a temp file, this can fail if the path contains dashes (common on MacOSX temp files)
+  ## so specify an tmpdir for the working dir, and the wrapper will symlink inputs into that dir
+  --tmpdir='${logfile.extra_files_path}/input'
+  --fasta=$fasta#for i in $inputs#,${i.fasta}#end for#
+  #if $inputs != None and len($inputs) > 0:
+   --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+   #set datasets = []
+   #for i in $inputs:
+    #set datasets = $datasets + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'^\1.filter.fasta$',$os.path.basename($i.fasta.__str__)) + ":align'"]
+   #end for
+   --new_datasets=#echo ','.join($datasets)
+  #end if
+  $vertical
+  #if $trump.__str__ != None and len($trump.__str__) > 0:
+   --trump=$trump
+  #end if
+  #if 100 >= $soft >= 0:
+   --soft='$soft'
+  #end if
+  #if $hard.__str__ != "None" and len($hard.__str__) > 0:
+   --hard=$hard
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="align" label="fasta - Alignment Fasta"/>
+  <repeat name="inputs" title="Additional Alignment File">
+   <param name="fasta" type="data" format="align" label="fasta - Alignment Fasta"/>
+  </repeat>
+  <param name="vertical" type="boolean" checked="true" truevalue="" falsevalue="--vertical=false" label="vertical - Vertical column" 
+         help="Ignore any column that only contains gap characters (i.e. '-' or '.')"/>
+  <param name="trump" type="select" label="trump - Trump character" 
+         help="Remove a column if the trump character is found at that position in any sequence of the alignment.">
+   <option value="">Off</option>
+   <option value=".">.</option>
+   <option value="-">-</option>
+   <option value="N">N</option>
+  </param>
+  <param name="soft" type="integer" value="-1" label="soft - percentage required to retain column. (0-100)" 
+         help="Removes any column where the dominant base (i.e. A, T, G, C, or U) does not occur in at least a designated percentage of sequences."/>
+  <param name="hard" type="data" format="filter" optional="True" label="hard - Hard Column Filter"
+         help="A file should only contain one line consisting of 0's and 1's. "/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="filter" name="out_filter" label="${tool.name} on ${on_string}: filter" />
+  <data format="align" name="out_fasta" label="${tool.name} on ${on_string}: filtered fasta" />
+ </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 filter.seqs_ command removes columns from alignments based on a criteria defined by the user. For example, alignments generated against reference alignments (e.g. from RDP, SILVA, or greengenes) often have columns where every character is either a '.' or a '-'. These columns are not included in calculating distances because they have no information in them. By removing these columns, the calculation of a large number of distances is accelerated. Also, people also like to mask their sequences to remove variable regions using a soft or hard mask (e.g. Lane's mask). This type of masking is only encouraged for deep-level phylogenetic analysis, not fine level analysis such as that needed with calculating OTUs. 
+
+.. _filter.seqs: http://www.mothur.org/wiki/Filter.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/get.groups.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,90 @@
+<tool id="mothur_get_groups" name="Get.groups" version="1.15.0">
+ <description>Select groups</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='get.groups'
+  --outputdir='$logfile.extra_files_path'
+  --group=$group_in
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups=$groups
+  #end if
+  #if $accnos.__str__ != "None" and len($accnos.__str__) > 0:
+   --accnos=$accnos
+  #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 $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
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <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 from_dataset="group_in">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="accnos" type="data" format="accnos" optional="true" label="accnos - Accession Names"/>
+  <param name="fasta_in" type="data" format="fasta" 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="taxonomy_in" type="data" format="taxonomy" optional="true" label="taxonomy - Taxonomy"/>
+ </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="fasta" 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="taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy">
+   <filter>taxonomy_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 get.groups_ command selects sequences from a specific group or set of groups from the following file types: fasta, name, group, list, taxonomy. 
+
+.. _get.groups: http://www.mothur.org/wiki/Get.groups
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/get.lineage.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,95 @@
+<tool id="mothur_get_lineage" name="Get.lineage" version="1.15.0">
+ <description>Picks by taxon</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($taxonomy.__str__)) + ":'" + $taxonomy_out.__str__]
+  --cmd='get.lineage'
+  --outputdir='$logfile.extra_files_path'
+  --taxonomy=$taxonomy
+  --taxon="'$re.sub('\(\d+\)','',$taxon.value.__str__)'"
+  #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 $group_in.__str__ != "None" and len($group_in.__str__) > 0:
+   --group=$group_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($group_in.__str__)) + ":'" + $group_out.__str__]
+  #end if
+  #if $alignreport_in.__str__ != "None" and len($alignreport_in.__str__) > 0:
+   --alignreport=$alignreport_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($alignreport_in.__str__)) + ":'" + $alignreport_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 $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__]
+   $dups
+  #end if
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="taxonomy" type="data" format="taxonomy" label="taxonomy - Taxonomy"/>
+  <param name="taxons" type="select" size="120" label="Browse Taxons from Taxonomy">
+   <options from_dataset="taxonomy">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unique_taxon" column="1" />
+   </options>
+  </param>
+  <param name="taxon" type="text" size="120" label="taxon - Select Taxon for filtering"/>
+  <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - Fasta Sequences"/>
+  <param name="group_in" type="data" format="groups" optional="true" label="group - Groups"/>
+  <param name="alignreport_in" type="data" format="align.report" optional="true" label="alignreport - Align Report"/>
+  <param name="list_in" type="data" format="list" optional="true" label="list - OTU List"/>
+  <param name="name_in" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+  <param name="dups" type="boolean" truevalue="" falsevalue="--dups=false" checked="true" label="dups - Apply to duplicate names"/>
+ </inputs>
+ <outputs>
+  <!-- fix format -->
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy"/>
+  <data format="fasta" name="fasta_out" label="${tool.name} on ${on_string}: pick.fasta">
+   <filter>fasta_in != None</filter>
+  </data>
+  <data format="groups" name="group_out" label="${tool.name} on ${on_string}: pick.group">
+   <filter>group_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="names" name="name_out" label="${tool.name} on ${on_string}: pick.name">
+   <filter>name_in != None</filter>
+  </data>
+  <data format="align.report" name="alignreport_out" label="${tool.name} on ${on_string}: pick.align.report">
+   <filter>alignreport_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 get.lineage_ command reads a taxonomy file and a taxon and generates a new file that contains only the sequences in the that are from that taxon. You may also include either a fasta, name, group, list, or align.report file to this command and mothur will generate new files for each of those containing only the selected sequences.
+
+.. _get.lineage: http://www.mothur.org/wiki/Get.lineage
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/get.oturep.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,97 @@
+<tool id="mothur_get_oturep" name="Get.oturep" version="1.15.0"  force_history_refresh="True">
+ <description>Generate a fasta with a representative sequence for each OTU</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='get.oturep'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.((unique|[0-9.]*)(\S+)\.rep\.fasta)$:fasta','^\S+?\.((unique|[0-9.]*)(\S+)\.rep\.names)$:names'
+  --fasta=$fasta
+  --list=$otu_list
+  #if $input.source == 'column':
+   --column=$input.dist
+   --name=$input.name
+  #elif $input.source == 'phylip':
+   --phylip=$input.dist
+   #if $input.name.__str__ != "None" and len($input.name.__str__) > 0:
+    --name=$input.name
+   #end if
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups=$groups
+  #end if
+  #if $sorted.__str__ != "None" and len($sorted.__str__) > 0:
+   --sorted=$sorted
+  #end if
+  $large
+ </command>
+ <inputs>
+  <!-- get.relabund  relabund type should also work -->
+  <param name="fasta" type="data" format="fasta" label="fasta - Fasta"/>
+  <param name="otu_list" type="data" format="list" label="list - OTU List"/>
+  <conditional name="input">
+   <param name="source" type="select" label="Distance Matrix">
+    <option value="column">Pairwise Column Distance Matrix</option>
+    <option value="phylip">Phylip Distance Matrix</option>
+   </param>
+   <when value="column">
+       <param name="dist" type="data" format="pair.dist" label="column - Distance Matrix"/>
+       <param name="name" type="data" format="names" label="name - Sequences Name reference"/>
+   </when>
+   <when value="phylip">
+       <param name="dist" type="data" format="lower.dist,square.dist" label="phylip - Distance Matrix"/>
+       <param name="name" type="data" format="names" optional="true" label="name - Names"/>
+   </when>
+  </conditional>
+  <param name="group" type="data" format="groups" optional="true" label="group - Group file for the OTU List"/>
+  <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+   <options from_dataset="group">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+   </options>
+  </param>
+  <param name="label" type="select" label="label - OTU Labels" multiple="true">
+   <options from_dataset="otu_list">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+  <param name="sorted" type="select" label="sorted - Sort Sequences by">
+   <option value="">Don't sort</option>
+   <option value="name">Sequence Name</option>
+   <option value="number">Bin Number</option>
+   <option value="size">Bin Size</option>
+   <option value="group">Group</option>
+  </param>
+
+  <param name="large" type="boolean" checked="false" truevalue="--large=true" falsevalue="" label="large - Distance Matrix is very Large"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 get.oturep_ command generates a fasta-formatted sequence file containing only a representative sequence for each OTU.  The opposite of the bin.seqs command.
+
+.. _get.oturep: http://www.mothur.org/wiki/Get.oturep
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/get.otus.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,68 @@
+<tool id="mothur_get_otus" name="Get.otus" version="1.15.0">
+ <description>Get otus containing sequences from specified groups</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  ## output {group_file_name}.pick.{label}.groups   {list_file_name}.pick.{label}.list 
+  #import re, os.path
+  --cmd='get.otus'
+  --outputdir='$logfile.extra_files_path'
+  --group=$group_in
+  --list=$list_in
+  --label=$label
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups=$groups
+  #end if
+  #if $accnos.__str__ != "None" and len($accnos.__str__) > 0:
+   --accnos=$accnos
+  #end if
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.' + $label.__str__ + '.\2',$os.path.basename($group_in.__str__)) + ":'" + $group_out.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.'+ $label.__str__ + '.\2',$os.path.basename($list_in.__str__)) + ":'" + $list_out.__str__]
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="group_in" type="data" format="groups" label="group - Groups"/>
+  <param name="list_in" type="data" format="list" label="list - OTU List"/>
+  <param name="label" type="select" label="label - OTU Labels" >
+   <options from_dataset="list_in">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+  <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true">
+   <options from_dataset="group_in">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="accnos" type="data" format="accnos" optional="true" label="accnos - Group Names from your history"/>
+ </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"/>
+  <data format="list" name="list_out" label="${tool.name} on ${on_string}: pick.list"/>
+ </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 get.otus_ command selects otus containing sequences from a specific group or set of groups.
+
+.. _get.otus: http://www.mothur.org/wiki/Get.otus
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/get.relabund.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,100 @@
+<tool id="mothur_get_relabund" name="Get.relabund" version="1.15.0">
+ <description>Calculate the relative abundance of each otu</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='get.relabund'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.relabund$:'$relabund
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #end if
+  #if $scale.__str__ != "None" and len($scale.__str__) > 0:
+   --scale=$scale
+  #end if
+ </command>
+ <inputs>
+  <conditional name="input">
+   <param name="source" type="select" label="Get Relative abundance for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group=) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+     <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="scale" type="select" label="scale - Scale by">
+   <option value="">Use default</option>
+   <option value="totalgroup">Total Groups</option>
+   <option value="totalotu">Total OTUs</option>
+   <option value="averagegroup">Average Groups</option>
+   <option value="averageotu">Average OTUs</option>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="relabund" name="relabund" label="${tool.name} on ${on_string}: relabund" />
+ </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 get.relabund_ command calculates the relative abundance of each otu in a sample. It outputs a .relabund file.
+
+.. _get.relabund: http://www.mothur.org/wiki/Get.relabund
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/get.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,101 @@
+<tool id="mothur_get_seqs" name="Get.seqs" version="1.15.0">
+ <description>Picks sequences by name</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 (except align.report)
+  --cmd='get.seqs'
+  --outputdir='$logfile.extra_files_path'
+  --accnos=$accnos
+  #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 $qfile_in.__str__ != "None" and len($qfile_in.__str__) > 0:
+   --qfile=$qfile_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($qfile_in.__str__)) + ":'" + $qfile_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__]
+   $dups
+  #end if
+  #if $group_in.__str__ != "None" and len($group_in.__str__) > 0:
+   --group=$group_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($group_in.__str__)) + ":'" + $group_out.__str__]
+  #end if
+  #if $alignreport_in.__str__ != "None" and len($alignreport_in.__str__) > 0:
+   --alignreport=$alignreport_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.pick.align.report',$os.path.basename($alignreport_in.__str__)) + ":'" + $alignreport_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 $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
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="accnos" type="data" format="accnos" label="accnos - Accession Names"/>
+  <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - Fasta Sequences"/>
+  <param name="qfile_in" type="data" format="qual" optional="true" label="qfile - Fasta Quality"/>
+  <param name="name_in" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+  <param name="group_in" type="data" format="groups" optional="true" label="group - Sequences Groups"/>
+  <param name="alignreport_in" type="data" format="align.report" optional="true" label="alignreport - Align Report"/>
+  <param name="list_in" type="data" format="list" optional="true" label="list - OTU List"/>
+  <param name="taxonomy_in" type="data" format="taxonomy" optional="true" label="taxonomy - Taxonomy"/>
+  <param name="dups" type="boolean" truevalue="" falsevalue="--dups=false" checked="true" label="dups - Apply to duplicates"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <!-- format should be set to match input -->
+  <data format="fasta" name="fasta_out" label="${tool.name} on ${on_string}: pick.fasta">
+   <filter>fasta_in != None</filter>
+  </data>
+  <!-- format should be set to match input -->
+  <data format="qual" name="qfile_out" label="${tool.name} on ${on_string}: pick.qfile">
+   <filter>qfile_in != None</filter>
+  </data>
+  <data format="names" name="name_out" label="${tool.name} on ${on_string}: pick.names">
+   <filter>name_in != None</filter>
+  </data>
+  <data format="groups" name="group_out" label="${tool.name} on ${on_string}: pick.groups">
+   <filter>group_in != None</filter>
+  </data>
+  <data format="align.report" name="alignreport_out" label="${tool.name} on ${on_string}: pick.align.report">
+   <filter>alignreport_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="taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy">
+   <filter>taxonomy_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 get.seqs_ command takes a list of sequence names and either a fasta, name, group, list, or align.report file to generate a new file that contains only the sequences in the list. This command may be used in conjunction with the list.seqs command to help screen a sequence collection.
+
+.. _get.seqs: http://www.mothur.org/wiki/Get.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/hcluster.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,100 @@
+<tool id="mothur_hcluster" name="Hcluster" version="1.15.0">
+ <description>Assign sequences to OTUs (Operational Taxonomic Unit)</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='hcluster'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.[fna]n\.sabund$:'$sabund,'^\S+\.[fna]n\.rabund$:'$rabund,'^\S+\.[fna]n\.list$:'$otulist
+  --outputdir='$logfile.extra_files_path'
+  #if $matrix.format == "column":
+   --column=$matrix.dist
+   --name=$matrix.name
+  #elif $matrix.format == "phylip":
+   --phylip=$matrix.dist
+   #if $matrix.name.__str__ != "None" and len($matrix.name.__str__) > 0:
+    --name=$matrix.name
+   #end if
+  #end if
+  #if len($method.__str__) > 0:
+   --method=$method
+  #end if
+  #if float($cutoff.__str__) > 0.0:
+   --READ_cutoff=$cutoff
+  #end if
+  #if len($precision.__str__) > 0:
+   --READ_precision=$precision
+  #end if
+  $hard
+  $sorted
+  $showabund
+ </command>
+ <inputs>
+  <conditional name="matrix">
+   <param name="format" type="select" label="Select a Distance Matrix Format" help="">
+    <option value="column">Pairwise Column Matrix</option>
+    <option value="phylip">Phylip Distance Matrix</option>
+   </param>
+   <when value="column">
+    <param name="dist" type="data" format="pair.dist" label="column - Distance Matrix"/>
+    <param name="name" type="data" format="names" label="name - Names"/>
+   </when>
+   <when value="phylip">
+    <param name="dist" type="data" format="lower.dist,square.dist" label="phylip - Distance Matrix"/>
+    <param name="name" type="data" format="names" optional="true" label="name - Names"/>
+   </when>
+  </conditional>
+  <!-- ? conditional - to hide complexity -->
+  <param name="cutoff" type="float" value="0.0" label="cutoff - Distance Cutoff threshold - ignored if not > 0" 
+                 help="Ignore pairwise distances larger than this, a common value would be 0.10"/>
+  <param name="hard" type="boolean" checked="false" truevalue="--hard=true" falsevalue="" label="hard - Use hard cutoff instead of rounding" 
+                 help=""/>
+  <param name="precision" type="select" optional="true" label="precision - Precision for rounding distance values"
+                 help="Set higher precision for longer genome scale sequence lengths">
+   <option value="10">.1</option>
+   <option value="100" selected="true">.01</option>
+   <option value="1000">.001</option>
+   <option value="10000">.0001</option>
+   <option value="100000">.00001</option>
+   <option value="1000000">.000001</option>
+  </param>
+
+  <param name="method" type="select" label="method - Select a Clustering Method" help="">
+   <option value="furthest" selected="true">Furthest neighbor</option>
+   <option value="nearest">Nearest neighbor</option>
+   <option value="average">Average neighbor</option>
+   <option value="weighted">Weighted</option>
+  </param>
+  <param name="sorted" type="boolean" checked="false" truevalue="--sorted=true" falsevalue="" label="sorted - The input matrix is already sorted" 
+                 help=""/>
+  <param name="showabund" type="boolean" checked="true" truevalue="" falsevalue="--showabund=false" label="showabund - Verbose ouput" 
+                 help=""/>
+
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="rabund" name="rabund" label="${tool.name} on ${on_string}: rabund (Rank)"/>
+  <data format="sabund" name="sabund" label="${tool.name} on ${on_string}: sabund (Species)"/>
+  <data format="list" name="otulist" label="${tool.name} on ${on_string}: list (OTU List)"/>
+ </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 cluster_ command assign sequences to OTUs (Operational Taxonomy Unit). 
+
+.. _cluster: http://www.mothur.org/wiki/Cluster
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/heatmap.bin.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,121 @@
+<tool id="mothur_heatmap_bin" name="Heatmap.bin" version="1.15.0"  force_history_refresh="True">
+ <description>Generate a heatmap for OTUs</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='heatmap.bin'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.((\S+)\.(unique|[0-9.]*)\.heatmap\.bin\.svg)$:svg'
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_relabund=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #end if
+  #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+   --groups=$input.groups
+  #end if
+  #if $scale.__str__ != "None" and len($scale.__str__) > 0:
+   --scale='$scale'
+  #end if
+  #if $sorted.__str__ != "None" and len($sorted.__str__) > 0:
+   --sorted='$sorted'
+  #end if
+  #if $numotu > 0:
+   --numotu=$numotu
+  #end if
+  #if 100 > $fontsize > 0:
+   --fontsize=$fontsize
+  #end if
+ </command>
+ <inputs>
+  <!-- get.relabund  relabund type should also work -->
+ <conditional name="input">
+   <param name="source" type="select" label="Generate Heatmap for">
+    <option value="similarity">OTU list</option>
+    <option value="relabund">OTU Relative Abundance</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="relabund">
+     <param name="otu" type="data" format="relabund" label="read.otu(relabund=) - OTU Relative Abundance"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="scale" type="select" label="scale - Scaling for heatmap">
+   <option value="">Default</option>
+   <option value="log10">Log10</option>
+   <option value="log2">Log2</option>
+   <option value="linear">Linear</option>
+  </param>
+  <param name="sorted" type="select" label="sorted - Sort heatmap">
+   <option value="">By shared</option>
+   <option value="none">Don't sort</option>
+   <option value="totalotu">By Total OTUs</option>
+   <option value="totalgroup">By Total Groups</option>
+  </param>
+  <param name="numotu" type="integer" value="0" label="numotu - Limit the number of OTUs displayed (ignored if 0)"/>
+  <param name="fontsize" type="integer" value="24" label="fontsize - Fontsize (default is 24)"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 heatmap.bin_ command generates a heat map from data provided in either a .list or a .shared file.
+
+.. _heatmap.bin: http://www.mothur.org/wiki/Heatmap.bin
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/heatmap.sim.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,131 @@
+<tool id="mothur_heatmap_sim" name="Heatmap.sim" version="1.15.0"  force_history_refresh="True">
+ <description>Generate a heatmap for pariwise similarity</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='heatmap.sim'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.((unique|[0-9.]*)(\S+)\.heatmap\.sim\.svg)$:svg'
+  #if $input.source == 'similarity':
+   --READ_cmd='read.otu'
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --label='$input.label'
+   #end if
+   #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+    --groups=$input.groups
+   #end if
+   #if $input.calc.__str__ != "None" and len($input.calc.__str__) > 0:
+     --calc='$input.calc'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_cmd='read.otu'
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --label='$input.label'
+   #end if
+   #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+    --groups=$input.groups
+   #end if
+   #if $input.calc.__str__ != "None" and len($input.calc.__str__) > 0:
+     --calc='$input.calc'
+   #end if
+  #elif $input.source == 'column':
+   --column=$input.dist
+   --name=$input.name
+  #elif $input.source == 'phylip':
+   --phylip=$input.dist
+   #if $input.name.__str__ != "None" and len($input.name.__str__) > 0:
+    --name=$input.name
+   #end if
+  #end if
+ </command>
+ <inputs>
+  <!-- get.relabund  relabund type should also work -->
+  <conditional name="input">
+   <param name="source" type="select" label="Generate Heatmap for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+    <option value="column">Pairwise Column Distance Matrix</option>
+    <option value="phylip">Phylip Distance Matrix</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group=) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to include" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+     <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+      <options from_file="mothur_calulators.loc">
+        <column name="mult2" index="2"/>
+        <column name="name" index="0"/>
+        <column name="value" index="0"/>
+        <filter type="static_value" name="mult2" column="2" value="shar" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+    <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+    <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to include" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="column">
+       <param name="dist" type="data" format="pair.dist" label="column - Distance Matrix"/>
+       <param name="name" type="data" format="names" label="name - Names"/>
+   </when>
+   <when value="phylip">
+       <param name="dist" type="data" format="lower.dist,square.dist" label="phylip - Distance Matrix"/>
+       <param name="name" type="data" format="names" optional="true" label="name - Names"/>
+   </when>
+  </conditional>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 heatmap.sim_ command generates a heat map from data provided in either a .list or a .shared file.
+
+.. _heatmap.sim: http://www.mothur.org/wiki/Heatmap.sim
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/indicator.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,68 @@
+<tool id="mothur_indicator" name="Indicator" version="1.15.0">
+ <description>Identify indicator "species" for nodes on a tree</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  ## output {group_file_name}.pick.{label}.groups   {list_file_name}.pick.{label}.list 
+  #import re, os.path
+  --cmd='indicator'
+  --outputdir='$logfile.extra_files_path'
+  --tree=$tree
+  #if isinstance($otu.datatype, $__app__.datatypes_registry.get_datatype_by_extension('shared').__class__):
+   --shared=$otu
+  #elif isinstance($otu.datatype, $__app__.datatypes_registry.get_datatype_by_extension('relabund').__class__):
+  --relabund=$otu
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label=$label
+  #end if
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups=$groups
+  #end if
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.indicator.tre$:'$tree_out,'^\S+\.indicator.summary$:'$summary
+ </command>
+ <inputs>
+  <param name="tree" type="data" format="tree" label="tree - A newick-formatted tree"/>
+  <param name="otu" type="data" format="shared,relabund" label="shared/relabund - Otu dataset"/>
+  <param name="label" type="select" optional="true" label="label - OTU Labels" >
+   <options from_dataset="otu">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+    <filter type="unique_value" name="unq_lbl" column="0" />
+   </options>
+  </param>
+  <param name="groups" type="select" optional="true" label="groups - Pick groups to annalyze" multiple="true">
+   <options from_dataset="otu">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tre" name="tree_out" label="${tool.name} on ${on_string}: indicator.tre"/>
+  <data format="txt" name="summary" label="${tool.name} on ${on_string}: indicator.summary"/>
+ </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 indicator_ command reads a shared or relabund file and a tree file, and outputs a .indicator.tre and .indicator.summary file. The new tree contains labels at each internal node. The label is the node number so you can relate the tree to the summary file. The summary file lists the indicator value for each OTU for each node.
+
+.. _indicator: http://www.mothur.org/wiki/Indicator
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/libshuff.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,85 @@
+<tool id="mothur_libshuff" name="Libshuff" version="1.15.0">
+ <description>Cramer-von Mises tests communities for the same structure</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='libshuff'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.libshuff\.summary$:'$summary,'^\S+\.libshuff\.coverage$:'$coverage
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.dist'
+  #if $matrix.format == "column":
+   --READ_column=$matrix.dist
+   --READ_name=$matrix.name
+  #elif $matrix.format == "phylip":
+   --READ_phylip=$matrix.dist
+  #end if
+  --READ_group=$group
+  #if len($iters.__str__) > 0:
+   --iters=$iters
+  #end if
+  #if $form == "discrete":
+   #if 1.0 >= float($form.step.__str__) > 0.0:
+    --step=$form.step
+   #end if
+   #if 1.0 >= float($cutoff.__str__) > 0.0:
+    --cutoff=$form.cutoff
+   #end if
+  #end if
+ </command>
+ <inputs>
+  <conditional name="matrix">
+   <param name="format" type="select" label="Select a Distance Matrix Format" help="">
+    <option value="column">Pairwise Column Matrix</option>
+    <option value="phylip">Phylip Distance Matrix</option>
+   </param>
+   <when value="column">
+    <param name="dist" type="data" format="pair.dist" label="read.dist(column=) - Distance Matrix"/>
+    <param name="name" type="data" format="names" label="read.dist(name) - Sequences Name reference"/>
+   </when>
+   <when value="phylip">
+    <param name="dist" type="data" format="lower.dist,square.dist" label="read.dist(phylip=) - Distance Matrix"/>
+   </when>
+  </conditional>
+  <param name="group" type="data" format="groups" label="read.dist(group=) - Groups"/>
+  <!-- ? conditional - to hide complexity -->
+  <param name="iters" type="integer" value="10000" label="iters - Number of iterations to try (default 10000)"/>
+  <conditional name="form">
+   <param name="form" type="select" label="form - Select a Clustering Method" help="">
+    <option value="integral" selected="true">Integral</option>
+    <option value="discrete">Discrete</option>
+   </param>
+   <when value="integral"/>
+   <when value="discrete">
+    <param name="step" type="float" value="0.0" label="step - Step size - ignored if not > 0" 
+                 help="default value 0.10, smaller steps approach integral"/>
+    <param name="cutoff" type="float" value="0.0" label="cutoff - Cutoff threshold - ignored if not > 0" help=""/>
+   </when>
+  </conditional>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="summary" label="${tool.name} on ${on_string}: summary"/>
+  <data format="tabular" name="coverage" label="${tool.name} on ${on_string}: coverage"/>
+ </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 libshuff_ method is a generic test that describes whether two or more communities have the same structure using the Cramer-von Mises test statistic. The significance of the test statistic indicates the probability that the communities have the same structure by chance. Because each pairwise comparison requires two significance tests, a correction for multiple comparisons (e.g. Bonferroni's correction) must be applied.
+
+.. _libshuff: http://www.mothur.org/wiki/Libshuff
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/list.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,79 @@
+<tool id="mothur_list_seqs" name="List.seqs" version="1.15.0">
+ <description>Lists the names of the sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='list.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.accnos$:'$out_file
+  --outputdir='$logfile.extra_files_path'
+  #if $search.type == "fasta":
+   --fasta=$search.input
+  #elif $search.type == "name":
+   --name=$search.input
+  #else if search.type == "group":
+   --group=$search.input
+  #elif $search.type == "alignreport":
+   --alignreport=$search.input
+  #elif $search.type == "list":
+   --list=$search.input
+  #elif $search.type == "taxonomy":
+   --taxonomy=$search.input
+  #end if
+ </command>
+ <inputs>
+  <conditional name="search">
+   <param name="type" type="select" label="Type to list" help="">
+    <option value="fasta">Sequence Fasta</option>
+    <option value="name">Sequences Name reference</option>
+    <option value="group">Groups</option>
+    <option value="alignreport">Align Report</option>
+    <option value="list">OTU List</option>
+    <option value="taxonomy">Sequence Taxonomy</option>
+   </param>
+   <when value="fasta">
+    <param name="input" type="data" format="fasta" label="fasta - Fasta"/>
+   </when>
+   <when value="name">
+    <param name="input" type="data" format="names" label="name - Names"/>
+   </when>
+   <when value="group">
+    <param name="input" type="data" format="groups" label="group - Groups"/>
+   </when>
+   <when value="alignreport">
+    <param name="input" type="data" format="align.report" label="alignreport - Align Report"/>
+   </when>
+   <when value="list">
+    <param name="input" type="data" format="list" label="list - OTU List"/>
+   </when>
+   <when value="taxonomy">
+    <param name="input" type="data" format="taxonomy" label="taxonomy - Sequence Taxonomy"/>
+   </when>
+  </conditional>
+ </inputs>
+ <outputs>
+  <!-- fix format -->
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="accnos" name="out_file" label="${tool.name} on ${on_string}: accnos" />
+ </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 list.seqs_ command writes out the names of the sequences found within a fasta, name, group, list, or align.report file.
+
+.. _list.seqs: http://www.mothur.org/wiki/list.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/make.group.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,45 @@
+<tool id="mothur_make_files" name="Make.group" version="1.15.0">
+ <description>Make a group file</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='make.group'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.group:'$output
+  --outputdir='$logfile.extra_files_path'
+  --fasta=${fasta}#for i in $inputs#,${i.fasta}#end for#
+  --groups=${group}#for i in $inputs#,${i.group}#end for#
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Fasta to group"/>
+  <param name="group" type="text" label="group - Group name"/>
+  <repeat name="inputs" title="Additional"> 
+   <param name="fasta" type="data" format="fasta" label="fasta - Fasta to group"/>
+   <param name="group" type="text" label="group - Group name"/>
+  </repeat>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="groups" name="output" label="${tool.name} on ${on_string}: group" />
+ </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 make.group_ command reads a fasta file or series of fasta files and creates a group file.
+
+.. _make.group: http://www.mothur.org/wiki/Make.group
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/merge.files.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,43 @@
+<tool id="mothur_merge_files" name="Merge.files" version="1.15.0">
+ <description>Merge data</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='merge.files'
+  --result='^mothur.\S+\.logfile$:'$logfile,'mergefile:'$output
+  --outputdir='$logfile.extra_files_path'
+  --input=${input}#for i in $inputs#,${i.input}#end for#
+  --output='mergefile'
+ </command>
+ <inputs>
+  <param name="input" type="data" format="fasta" label="input - Dataset"/>
+  <repeat name="inputs" title="Files to Merge"> 
+   <param name="input" type="data" format="fasta" label="input - Dataset"/>
+  </repeat>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="input" name="output" label="${tool.name} on ${on_string}: fasta" />
+ </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 merge.files_ command merge inputs into a single output.
+
+.. _merge.files: http://www.mothur.org/wiki/Merge.files
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/mothur_wrapper.py	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,609 @@
+#!/usr/bin/env python
+
+"""
+http://www.mothur.org/
+
+Supports mothur version 
+mothur v.1.15.0
+
+Class encapsulating Mothur galaxy tool.
+Expect each invocation to include:
+Here is an example call to this script with an explanation before each param :
+ mothur_wrapper.py
+ # name of a mothur command, this is required
+ --cmd='summary.shared'
+ # Galaxy output dataset list, these are output files that can be determined before the command is run
+ # The items in the list are separated by commas
+ # Each item contains a regex to match the output filename and a galaxy dataset filepath in which to copy the data (separated by :)
+ --result='^mothur.\S+\.logfile$:'/home/galaxy/data/database/files/002/dataset_2613.dat,'^\S+\.summary$:'/home/galaxy/data/database/files/002/dataset_2614.dat
+ # Galaxy output dataset extra_files_path direcotry in which to put all output files
+ --outputdir='/home/galaxy/data/database/files/002/dataset_2613_files'
+ # The id of one of the galaxy outputs (e.g. the mothur logfile) used for dynamic dataset generation
+ #  http://bitbucket.org/galaxy/galaxy-central/wiki/ToolsMultipleOutput
+ --datasetid='2578'
+ # The galaxy directory in which to copy all output files for dynamic dataset generation
+ --new_file_path='/home/galaxy/data/database/tmp'
+ # specifies files to copy to the new_file_path
+ # The list is separated by commas
+ # Each item  conatins:   a regex pattern for matching filenames and  a galaxy datatype (separated by :)
+ # The regex match.groups()[0] is used as the id name of the dataset, and must result in  unique name for each output
+ --new_datasets='^\S+?\.((\S+)\.(unique|[0-9.]*)\.dist)$:lower.dist'
+ # Many mothur commands first require data to be read into memory using: read.otu, read.dist, or read.tree
+ # This prequisite command and its params are prefixed with 'READ_'
+ --READ_cmd='read.otu'
+ --READ_list=/home/galaxy/data/database/files/001/dataset_1557.dat
+ --READ_group='/home/galaxy/data/database/files/001/dataset_1545.dat'
+ --READ_label='unique,0.07'
+"""
+# import pkg_resources;
+import logging, os, string, sys, tempfile, glob, shutil, types, urllib, optparse, re
+import shlex, subprocess
+from stat import *
+
+log = logging.getLogger( __name__ )
+
+assert sys.version_info[:2] >= ( 2, 4 )
+
+debug = False
+#debug = True
+
+def stop_err( msg ):
+    sys.stderr.write( "%s\n" % msg )
+    sys.exit()
+
+def __main__():
+    # tranform the logfile into html 
+    def logfile_to_html(logfile_path,htmlfile_path,tmp_input_dir_name,tmp_output_dir_name,title="Mothur Logfile"):
+        if debug:  print >> sys.stdout, 'logfile_to_html %s -> %s' % (logfile_path, htmlfile_path)
+        if debug:  print >> sys.stdout, 'logfile_to_html input_dir:  %s' % tmp_input_dir_name
+        if debug:  print >> sys.stdout, 'logfile_to_html output_dir: %s' % tmp_output_dir_name
+        txt = open(logfile_path,'r')
+        in_pat = re.sub('[^a-zA-Z0-9_/]','.',tmp_input_dir_name) + '/(.+)'
+        out_pat = re.sub('[^a-zA-Z0-9_/]','.',tmp_output_dir_name) + '/(.+)'
+        html = open(htmlfile_path,'w')
+        html.write("<html><head><title>%s</title></head>\n<body>\n<pre>\n" % title)
+        try:
+            for line in txt:
+		if line.find('set.dir') >= 0:
+                    continue
+		elif line.find('put directory to ') >= 0:
+                    continue
+		elif line.startswith('Type ') :
+                    continue
+                elif line.find(tmp_output_dir_name) >= 0:
+                    line = re.sub(out_pat,'<a href="\\1">\\1</a>',line)
+                elif line.find(tmp_input_dir_name) >= 0:
+                    line = re.sub(in_pat,'\\1',line)
+                html.write(line)
+        except Exception, e:
+            print(str(e))
+            pass 
+        html.write('</pre>\n</body>\n</html>\n')
+        html.close()
+    #Strip out "(xx)" confidence values from a taxonomy list
+    def remove_confidence_callback(option, opt, value, parser):
+        # val = "'" + re.sub('\(\d+\)','',value) + "'"
+        setattr(parser.values, option.dest, re.sub('\(\d+\)','',value))
+    #Mothur separates items in a list of values with hyphens
+    def multi_val_callback(option, opt, value, parser):
+        setattr(parser.values, option.dest, '-'.join(value.split(',')))
+    #Handle list arguments that may contain dataset files
+    def prepare_input(value,input_dir):
+        """
+        Mothur requires items in a list of input values to be separated by hyphens
+        Change list separator from comma to hyphen 
+        If those items are files, copy them to the input dir.
+        """
+        if input_dir != None and value != None and isinstance(value, str): 
+            vals = []
+            for val in value.split(','):
+                if val[0] == '/' and os.path.isfile(val):
+                    (dir,fname) = os.path.split(val)
+                    try:
+                        os.symlink(val,os.path.join(input_dir,fname))
+                    except:
+                        shutil.copy(val,os.path.join(input_dir,fname))
+                    vals.append(fname)
+                    if debug: print >> sys.stderr, "scp %s %s" % (val, os.path.join(input_dir,fname))
+                else: 
+                    vals.append(val)
+            return '-'.join(vals)
+        return value
+    #Parse Command Line and get a list of params
+    # Prefix is used to differentiate between prerequisite commands: read.otu, read.dist, read.tree
+    def get_params(cmd, options, input_dir, prefix=''):
+        if debug: print >> sys.stderr, options
+        params = []  
+        for opt in cmd_dict[cmd]['required']:
+            if debug: print >> sys.stderr, opt
+            if isinstance(opt,list): # One of these must be present
+                missing = True
+                for sel in opt:
+                    # if debug: print >> sys.stderr, sel
+                    try:
+                        value = prepare_input(getattr(options,prefix+sel), input_dir)
+                        if value != None:
+                            params.append('%s=%s' % (sel,value))
+                            missing = False
+                    except Exception, e:
+                        stop_err('Illegal option for cmd %s : %s %s' % (cmd,sel,e))
+                if missing: 
+                    stop_err('Missing a required parameter for %s, need one of %s' % (cmd,opt))
+            else: # This option is required
+                try:
+                    value = prepare_input(getattr(options,prefix+opt), input_dir)
+                    # if debug: print >> sys.stderr, value
+                    if value != None:
+                        params.append('%s=%s' % (opt,value))
+                    else:
+                       stop_err('Missing a required parameter for %s : %s' % (cmd,opt))
+                except Exception, e:
+                    stop_err('Illegal option %s %s' % (opt,e))
+        if 'optional' in cmd_dict[cmd]:
+            for opt in cmd_dict[cmd]['optional']:
+                # if debug: print >> sys.stderr, opt
+                try:
+                    value = prepare_input(getattr(options,prefix+opt), input_dir)
+                    # if debug: print >> sys.stderr, value
+                    if value != None:
+                        params.append('%s=%s' % (opt,value))
+                except Exception, e:
+                    # should distinguish between READ_ opts and cmd opts
+                    # stop_err('Illegal option for %s : %s' % (cmd,opt))
+                    pass
+        return params
+    """
+    The command dict has a dict for each mothur command with required and options arguments
+    The top level list of required arguments is interpreted that each value item is required and any list item represents a choice of arguments 
+    This covers many, but not all of the argument dependency requirements.
+    For example - read.dist  required a phylip or (column and name) argument.
+    The complexity of inputs should be handled by the glaxy tool xml file.
+    """
+    cmd_dict = dict()
+    cmd_dict['merge.files'] = dict({'required' : ['input','output']})
+    cmd_dict['make.group'] = dict({'required' : ['fasta','groups'],  'optional' : ['output']})
+    cmd_dict['summary.seqs'] = dict({'required' : ['fasta'],
+              'outputs' : ['.names']})
+    cmd_dict['reverse.seqs'] = dict({'required' : ['fasta']})
+    cmd_dict['degap.seqs'] = dict({'required' : ['fasta']})
+    cmd_dict['unique.seqs'] = dict({'required' : ['fasta'],  'optional' : ['names']})
+    cmd_dict['deunique.seqs'] = dict({'required' : ['fasta','names'],  'optional' : []})
+    cmd_dict['chop.seqs'] = dict({'required' : ['fasta','numbases'],  'optional' : ['keep','short']})
+    cmd_dict['filter.seqs'] = dict({'required' : ['fasta'],  'optional' : ['vertical','trump','soft','hard']})
+    cmd_dict['screen.seqs'] = dict({'required' : ['fasta'],  'optional' : ['start','end','maxambig','maxhomop','minlength','maxlength','criteria','optimize','name','group','alignreport']})
+    cmd_dict['trim.seqs'] = dict({'required' : ['fasta'],  'optional' : ['group','oligos','qfile','qaverage','qthreshold','qtrim','flip','maxambig','maxhomop','minlength','maxlength','bdiffs','pdiffs','tdiffs','allfiles']})
+    cmd_dict['list.seqs'] = dict({'required' : [['fasta','name','group','list','alignreport','taxonomy']]})
+    cmd_dict['get.seqs'] = dict({'required' : ['accnos',['fasta','qfile','name','group','list','alignreport','taxonomy']], 'optional' : ['dups']})
+    cmd_dict['remove.seqs'] = dict({'required' : ['accnos',['fasta','qfile','name','group','list','alignreport','taxonomy']], 'optional' : ['dups']})
+    cmd_dict['align.seqs'] = dict({'required' : ['candidate','template'], 'optional' : ['search','ksize','align','match','mismatch','gapopen','gapextend','flip','threshold']})
+    cmd_dict['align.check'] = dict({'required' : ['fasta','map']})
+    cmd_dict['pre.cluster'] = dict({'required' : ['fasta'],  'optional' : ['names','diffs']})
+    cmd_dict['bin.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','label','group']})
+    cmd_dict['classify.seqs'] = dict({'required' : ['fasta','template','taxonomy'],'optional' : ['name','search','ksize','method','match','mismatch','gapopen','gapextend','numwanted','probs']})
+    cmd_dict['classify.otu'] = dict({'required' : ['list','taxonomy'],'optional' : ['name','cutoff','label','probs']})
+    # label=0.01-0.02-0.03   from 0.01,0.02,0.03  string.replace(options.label,',','-')
+    cmd_dict['chimera.bellerophon'] = dict({'required' : ['fasta'], 'optional' : ['filter','correction','window','increment']})
+    cmd_dict['chimera.ccode'] = dict({'required' : ['fasta','template'], 'optional' : ['filter','mask','window','numwanted']})
+    cmd_dict['chimera.check'] = dict({'required' : ['fasta','template'], 'optional' : ['ksize','svg','name','increment']})
+    cmd_dict['chimera.pintail'] = dict({'required' : ['fasta','template'], 'optional' : ['conservation','quantile','filter','mask','window','increment']})
+    cmd_dict['chimera.slayer'] = dict({'required' : ['fasta','template'], 'optional' : ['search','window','increment','match','mismatch','numwanted','parents','minsim','mincov','iters','minbs','minsnp','divergence','realign']})
+    cmd_dict['dist.seqs'] = dict({'required' : ['fasta'],  'optional' : ['calc','countends','output','cutoff']})
+    cmd_dict['pairwise.seqs'] = dict({'required' : ['fasta'],  'optional' : ['align','calc','countends','output','cutoff','match','mismatch','gapopen','gapextend']})
+    cmd_dict['read.dist'] = dict({'required' : [['phylip','column']],  'optional' : ['name','cutoff','hard','precision','sim','group']})
+    cmd_dict['read.otu'] = dict({'required' : [['rabund','sabund','list','shared','relabund']],  'optional' : ['label','group','groups','ordergroup']})
+    cmd_dict['read.tree'] = dict({'required' : ['tree'],  'optional' : ['name','group']})
+    cmd_dict['cluster'] = dict({'required' : [] ,  'optional' : ['method','cutoff','hard','precision']})
+    cmd_dict['hcluster'] = dict({'required' : [['column','phylip']] , 'optional' : ['name','method','cutoff','hard','precision','sorted','showabund']})
+    cmd_dict['cluster.fragments'] = dict({'required' : ['fasta'] ,  'optional' : ['name']})
+    cmd_dict['summary.single'] = dict({'required' : [], 'optional' : ['calc','abund','size','label','groupmode']})
+    cmd_dict['summary.shared'] = dict({'required' : [], 'optional' : ['calc','label','groups','all','distance']})
+    cmd_dict['collect.single'] = dict({'required' : [], 'optional' : ['calc','abund','size','label','freq']})
+    cmd_dict['collect.shared'] = dict({'required' : [], 'optional' : ['calc','label','freq','groups','all']})
+    cmd_dict['rarefaction.single'] = dict({'required' : [], 'optional' : ['calc','abund','iters','label','freq']})
+    cmd_dict['rarefaction.shared'] = dict({'required' : [], 'optional' : ['label','iters','groups','jumble']})
+    cmd_dict['normalize.shared'] = dict({'required' : [], 'optional' : ['label','method','norm','groups']})
+    cmd_dict['dist.shared'] = dict({'required' : [], 'optional' : ['calc','label','groups','output']})
+    cmd_dict['split.abund'] = dict({'required' : ['fasta',['name','list']], 'optional' : ['cutoff','group','groups','label','accnos']})
+    cmd_dict['split.groups'] = dict({'required' : ['fasta','group'], 'optional' : []})
+    cmd_dict['tree.shared'] = dict({'required' : [], 'optional' : ['groups','calc','cutoff','precision','label']})
+    cmd_dict['unifrac.unweighted'] = dict({'required' : [], 'optional' : ['groups','iters','distance','random']})
+    cmd_dict['unifrac.weighted'] = dict({'required' : [], 'optional' : ['groups','iters','distance','random']})
+    cmd_dict['parsimony'] = dict({'required' : [], 'optional' : ['groups','iters','random']})
+    cmd_dict['sffinfo'] = dict({'required' : ['sff'], 'optional' : ['fasta','qfile','trim','sfftxt','flow','accnos']})
+    cmd_dict['fastq.info'] = dict({'required' : ['fastq'], 'optional' : []})
+    cmd_dict['heatmap.bin'] = dict({'required' : [], 'optional' : ['label','groups','scale','sorted','numotu','fontsize']})
+    cmd_dict['heatmap.sim'] = dict({'required' : [], 'optional' : ['calc','phylip','column','name','label','groups']})
+    cmd_dict['venn'] = dict({'required' : [], 'optional' : ['calc','label','groups','nseqs','permute']})
+    cmd_dict['pcoa'] = dict({'required' : ['phylip'], 'optional' : []})
+    cmd_dict['phylotype'] = dict({'required' : ['taxonomy'],'optional' : ['name','cutoff','label']})
+    cmd_dict['phylo.diversity'] = dict({'required' : [],'optional' : ['groups','iters','freq','processors','scale','rarefy','collect','summary']})
+    cmd_dict['get.oturep'] = dict({'required' : ['fasta','list'], 'optional' : ['phylip','column','name','label','group','groups','sorted','precision','cutoff','large','weighted']})
+    cmd_dict['get.relabund'] = dict({'required' : [],'optional' : ['scale','label','groups']})
+    cmd_dict['libshuff'] = dict({'required' : [],'optional' : ['iters','form','step','cutoff']})
+    # clearcut options not needed in galaxy: 'version','verbose','quiet','stdout'
+    cmd_dict['clearcut'] = dict({'required' : [['list','fasta']],'optional' : ['seed','norandom','shuffle','neighbor','expblen','expdist','ntrees','matrixout','kimura','jukes','protein','DNA']})
+    cmd_dict['get.lineage'] = dict({'required' : ['taxonomy','taxon'],'optional' : ['fasta','name','group','list','alignreport','dups']})
+    cmd_dict['remove.lineage'] = dict({'required' : ['taxonomy','taxon'],'optional' : ['fasta','name','group','list','alignreport','dups']})
+    cmd_dict['bootstrap.shared'] = dict({'required' : [], 'optional' : ['calc','groups','iters','label']})
+    """
+    Mothur 1.15
+    """
+    cmd_dict['cluster.classic'] = dict({'required' : [] ,  'optional' : ['method','cutoff','hard','precision']})
+    cmd_dict['get.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','taxonomy']})
+    cmd_dict['remove.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','taxonomy']})
+    cmd_dict['get.otus'] = dict({'required' : ['group','list','label'], 'optional' : ['groups','accnos']})
+    cmd_dict['remove.otus'] = dict({'required' : ['group','list','label'], 'optional' : ['groups','accnos']})
+    cmd_dict['parse.list'] = dict({'required' : ['list','group'], 'optional' : ['label']})
+
+    cmd_dict['sub.sample'] = dict({'required' : [['fasta','list','sabund','rabund','shared']], 'optional' : ['name','group','groups','label','size']})
+    cmd_dict['consensus.seqs'] = dict({'required' : ['fasta'], 'optional' : ['list','name','label']})
+    cmd_dict['indicator'] = dict({'required' : ['tree',['shared','relabund']], 'optional' : ['groups','label']})
+    parser = optparse.OptionParser()
+    # Options for managing galaxy interaction
+    parser.add_option( '--debug', dest='debug', action='store_true', default=False, help='Turn on wrapper debugging to stdout'  )
+    parser.add_option( '--cmd', dest='cmd', help='The mothur command' )
+    parser.add_option( '--inputdir', dest='inputdir', help='The directory in which to work' )
+    parser.add_option( '--outputdir', dest='outputdir', help='The directory in which to work' )
+    parser.add_option( '--tmpdir', dest='tmpdir', help='The directory in which to work' )
+    parser.add_option( '--tempdefault', dest='tempdefault', help='The default directory in which to search for input' )
+    parser.add_option( '--result', dest='result', help='The name pattern and destination for each output file' )
+    parser.add_option( '--new_file_path', dest='new_file_path', help='The Galaxy new_file_path, dir for extra output datasets' )
+    parser.add_option( '--datasetid', dest='datasetid', help='The Galaxy new_file_path, dir for extra output datasets' )
+    parser.add_option( '--new_datasets', dest='new_datasets', help='The name pattern and datatype ext for ouputs' )
+    # Options for prerequisite Read commands
+    parser.add_option( '--READ_cmd', dest='READ_cmd', help='The mothur command' )
+    # required arguments for Read.dist
+    parser.add_option( '--READ_phylip', dest='READ_phylip', help='' )
+    parser.add_option( '--READ_column', dest='READ_column', help='' )
+    # required arguments for Read.otu
+    parser.add_option( '--READ_rabund', dest='READ_rabund', help='' )
+    parser.add_option( '--READ_sabund', dest='READ_sabund', help='' )
+    parser.add_option( '--READ_list', dest='READ_list', help='' )
+    parser.add_option( '--READ_shared', dest='READ_shared', help='' )
+    parser.add_option( '--READ_relabund', dest='READ_relabund', help='' )
+    # required arguments for Read.tree
+    parser.add_option( '--READ_tree', dest='READ_tree', help='' )
+    # optional arguments for Read cmds
+    parser.add_option( '--READ_name', dest='READ_name', help='' )
+    parser.add_option( '--READ_cutoff', dest='READ_cutoff',  type="float", help='' )
+    parser.add_option( '--READ_hard', dest='READ_hard', help='' )
+    parser.add_option( '--READ_precision', dest='READ_precision', type="int", help='' )
+    parser.add_option( '--READ_sim', dest='READ_sim', help='' )
+    parser.add_option( '--READ_group', dest='READ_group', help='' )
+    parser.add_option( '--READ_groups', dest='READ_groups', help='' )
+    parser.add_option( '--READ_ordergroup', dest='READ_ordergroup', help='')
+    parser.add_option( '--READ_label', dest='READ_label', help='' )
+    # Parameter specified in mothur
+    parser.add_option( '--numbases', dest='numbases', type="int", help='Number of base to allow' )
+    parser.add_option( '--fasta', dest='fasta', help='fasta file paths' )
+    parser.add_option( '--fastq', dest='fastq', help='fastq file paths' )
+    parser.add_option( '--qfile', dest='qfile', help='Sequence read quality file (454 platform)' )
+    parser.add_option( '--qaverage', dest='qaverage', type="int", help='Remove sequences that have an average quality below the value' )
+    parser.add_option( '--qthreshold', dest='qthreshold', type="int", help='If at any point a base call in a sequence has a quality score below the value provided to the option, the sequence is terminated' )
+    parser.add_option( '--qtrim', dest='qtrim', help='For sequence below qthreshold, false to scrap file, true to trimmed and in trim file' )
+    parser.add_option( '--flip', dest='flip', help='If true, reverse complement the sequences' )
+    parser.add_option( '--maxambig', dest='maxambig', type="int", help='Number of ambiguous base calls to allow' )
+    parser.add_option( '--maxhomop', dest='maxhomop', type="int", help='Maximun homopolymer length allowed' )
+    parser.add_option( '--minlength', dest='minlength', type="int", help='Minimun sequence length' )
+    parser.add_option( '--maxlength', dest='maxlength', type="int", help='Maximun sequence length' )
+    parser.add_option( '--oligos', dest='oligos', help='The oligos option takes a file that can contain the sequences of the forward and reverse primers and barcodes and their sample identifier.' )
+    parser.add_option( '--bdiffs', dest='bdiffs', type="int", help='Number of barcode differences to allow' )
+    parser.add_option( '--pdiffs', dest='pdiffs', type="int", help='Number of primer differences to allow' )
+    parser.add_option( '--tdiffs', dest='tdiffs', type="int", help='Total number of barcode and primer differences to allow' )
+    parser.add_option( '--diffs', dest='diffs', type="int", help='Number of mismatched bases to allow between sequences in a group' )
+    parser.add_option( '--allfiles', dest='allfiles', help='T - generate fasta and group for each barcode' )
+    parser.add_option( '--name', dest='name', help='A file containing a 2 column table: name, and comma separated list of represetatives' )
+    parser.add_option( '--accnos', dest='accnos', help='A file containing a list of names' )
+    parser.add_option( '--groups', dest='groups', help='pairwise group labels' )
+    parser.add_option( '--group', dest='group', help='A file containing a list of names' )
+    parser.add_option( '--list', dest='list', help='A file containing a list of names' )
+    parser.add_option( '--alignreport', dest='alignreport', help='A align.report file ' )
+    parser.add_option( '--taxonomy', dest='taxonomy', help='A Taxonomy file' )
+    parser.add_option( '--taxon', dest='taxon',  help='A Taxon' )
+    # parser.add_option( '--taxon', dest='taxon', action="callback", callback=remove_confidence_callback, help='A Taxon' )
+    parser.add_option( '--candidate', dest='candidate', help=' file ' )
+    parser.add_option( '--template', dest='template', help=' file ' )
+    parser.add_option( '--dups', dest='dups', help='if True also apply to the aliases from the names files' )
+    parser.add_option( '--keep', dest='keep', help='Either front or back to specify the which end of the sequence to keep' )
+    parser.add_option( '--search', dest='search', help='Method for finding the template sequence: kmer, blast, suffix' )
+    parser.add_option( '--ksize', dest='ksize',  type="int", help='Size of kmers (5 - 12)' )
+    parser.add_option( '--align', dest='align', help='Alignment method: needleman, blastn, gotoh' )
+    parser.add_option( '--match', dest='match', type="float", help='Reward for a match, default is +1.0' )
+    parser.add_option( '--mismatch', dest='mismatch', type="float", help='Penalty for a mismatch, default is -1.0' )
+    parser.add_option( '--gapopen', dest='gapopen', type="float", help='Penalty for a opening, default is -2.0' )
+    parser.add_option( '--gapextend', dest='gapextend', type="float", help='Penalty for extending a gap, default is -1.0' )
+    parser.add_option( '--threshold', dest='threshold', type="float", help='Cutoff at which an alignment is deemed bad and the reverse complement may be tried, 0.0 - 1.0 default 0.50' )
+    parser.add_option( '--map', dest='map', help='File containing the secondary structure map.' )
+    parser.add_option( '--label', dest='label', type='string', action="callback", callback=multi_val_callback, help='Distance levels you would like a output files created for(separated by commas or dashes)' )
+    parser.add_option( '--filter', dest='filter', help='If true, a 50% soft filter will be applied' )
+    parser.add_option( '--correction', dest='correction', help='If true, square root of the distances is used instead of the distance value' )
+    parser.add_option( '--window', dest='window', type="int", help='Window size for searching for chimeras, default is 1/4 sequence length' )
+    parser.add_option( '--increment', dest='increment', type="int", help='How far you move each window while finding chimeric sequences, default is 25' )
+    parser.add_option( '--mask', dest='mask',  help='A file containing one sequence you wish to use as a mask for the your sequences' )
+    parser.add_option( '--numwanted', dest='numwanted', type="int", help='How many sequences you would each query sequence compared with' )
+    parser.add_option( '--start', dest='start', type="int", help='Remove sequences that start after thisposition' )
+    parser.add_option( '--end', dest='end', type="int", help='Remove sequences that end before this position' )
+    parser.add_option( '--criteria', dest='criteria', type="int", help='Percentage of sequences to match' )
+    parser.add_option( '--optimize', dest='optimize', help='List of parameters to optimize' )
+    parser.add_option( '--vertical', dest='vertical',  help='Ignore any column that only contains gap characters, "-" or "."' )
+    parser.add_option( '--trump', dest='trump', help='Remove a column if the trump character is found at that position in any sequence of the alignment.' )
+    parser.add_option( '--soft', dest='soft', type='int', help='Soft Mask - percentage required to retain column. (0-100)' )
+    parser.add_option( '--hard', dest='hard', help='Hard Column Filter - A file should only contain one line consisting of 0 and 1 chars' )
+    parser.add_option( '--calc', dest='calc', help='Calc Method - Gap Penality' )
+    parser.add_option( '--countends', dest='countends',  help='Penalize terminal gaps' )
+    # parser.add_option( '--cutoff', dest='cutoff', type="float", help='Distance Cutoff threshold, discard larger distances' )
+    parser.add_option( '--cutoff', dest='cutoff', help='Distance Cutoff threshold, discard larger distances' )
+    parser.add_option( '--countgaps', dest='countgaps',  help='count gaps as bases' )
+    parser.add_option( '--output', dest='output', help='Format for output' )
+    parser.add_option( '--method', dest='method', help='Method to use for analysis - cluster' )
+    parser.add_option( '--abund', dest='abund', type='int', help='Threshold for rare to Abundant OTU classification' )
+    parser.add_option( '--size', dest='size', type='int', help='Size - sample size' )
+    parser.add_option( '--groupmode', dest='groupmode', help='Collate groups into one result table' )
+    parser.add_option( '--all', dest='all', help='Calculate for all' )
+    parser.add_option( '--freq', dest='freq', type="float", help='Frequency of sequences to choose, as fraction is 0.0 - 1.0 or iteration if int > 1' )
+    parser.add_option( '--iters', dest='iters', type='int', help='Iterations of randomizations' )
+    parser.add_option( '--jumble', dest='jumble',  help='If false, just a collector curve across the samples' )
+    parser.add_option( '--conservation', dest='conservation',  help='Template frequency information' )
+    parser.add_option( '--quantile', dest='quantile',  help='Template quantile information' )
+    parser.add_option( '--parents', dest='parents', type='int', help='Number of Parents to investigate' )
+    parser.add_option( '--minsim', dest='minsim', type='int', help='Minimum simarity (0-100 percent)' )
+    parser.add_option( '--mincov', dest='mincov', type='int', help='Minimum coverage (0-100 percent)' )
+    parser.add_option( '--minbs', dest='minbs', type='int', help='Minimum bootstrap support (0-100 percent)' )
+    parser.add_option( '--minsnp', dest='minsnp', type='int', help='Minimum SNPs to sample(0-100 percent)' )
+    parser.add_option( '--divergence', dest='divergence', type='float', help='Divergence cutoff for chimera determination' )
+    parser.add_option( '--sff', dest='sff',  help='Sff file' )
+    parser.add_option( '--sfftxt', dest='sfftxt',  help='Generate a sff.txt file' )
+    parser.add_option( '--flow', dest='flow',  help='Generate a flowgram file' )
+    parser.add_option( '--trim', dest='trim', help='Whether sequences and quality scores are trimmed to the clipQualLeft and clipQualRight values' )
+    parser.add_option( '--input', dest='input', help='' )
+    parser.add_option( '--phylip', dest='phylip', help='' )
+    parser.add_option( '--column', dest='column', help='' )
+    parser.add_option( '--sorted', dest='sorted', help='Input is presorted' )
+    parser.add_option( '--showabund', dest='showabund', help='' )
+    parser.add_option( '--short', dest='short', help='Keep sequences that are too short to chop' )
+    parser.add_option( '--distance', dest='distance', help='' )
+    parser.add_option( '--scale', dest='scale', help='' )
+    parser.add_option( '--numotu', dest='numotu', help='' )
+    parser.add_option( '--fontsize', dest='fontsize', help='' )
+    parser.add_option( '--neqs', dest='neqs', help='' )
+    parser.add_option( '--permute', dest='permute', help='' )
+    parser.add_option( '--rarefy', dest='rarefy', help='' )
+    parser.add_option( '--collect', dest='collect', help='' )
+    parser.add_option( '--summary', dest='summary', help='' )
+    parser.add_option( '--large', dest='large', help='' )
+    parser.add_option( '--shuffle', dest='shuffle', help='' )
+    parser.add_option( '--neighbor', dest='neighbor', help='' )
+    parser.add_option( '--expblen', dest='expblen', help='' )
+    parser.add_option( '--expdist', dest='expdist', help='' )
+    parser.add_option( '--ntrees', dest='ntrees', help='' )
+    parser.add_option( '--DNA', dest='DNA', help='' )
+    parser.add_option( '--protein', dest='protein', help='' )
+    parser.add_option( '--kimura', dest='kimura', help='' )
+    parser.add_option( '--jukes', dest='jukes', help='' )
+    parser.add_option( '--matrixout', dest='matrixout', help='' )
+    # include read.otu options
+    parser.add_option( '--rabund', dest='rabund', help='' )
+    parser.add_option( '--sabund', dest='sabund', help='' )
+    parser.add_option( '--shared', dest='shared', help='' )
+    parser.add_option( '--relabund', dest='relabund', help='' )
+    parser.add_option( '--ordergroup', dest='ordergroup', help='')
+    # include read.tree options
+    parser.add_option( '--tree', dest='tree', help='' )
+
+    (options, args) = parser.parse_args()
+    """
+    """
+    # print >> sys.stderr, options # so will appear as blurb for file
+    if options.debug != None:
+       debug = options.debug
+    params = []  
+    inputdir = None
+    outputdir = None
+    tmp_dir = None
+    tempdefault = ''
+    # Report exception if no command is given
+    if options.cmd == None:
+       stop_err('No mothur command given')
+    # Read directory options
+    if options.tmpdir != None:
+        if not os.path.isdir(options.tmpdir):
+            os.makedirs(options.tmpdir)
+        tmp_dir = options.tmpdir
+    else:
+        tmp_dir = tempfile.mkdtemp()
+    if options.inputdir != None:
+        if not os.path.isdir(options.inputdir):
+            os.makedirs(options.inputdir)
+        inputdir = options.inputdir
+    if options.outputdir != None:
+        if not os.path.isdir(options.outputdir):
+            os.makedirs(options.outputdir)
+        try:
+            outputdir = os.path.join(tmp_dir,'out') 
+            os.symlink(options.outputdir,outputdir)
+        except Exception, e:
+            print >> sys.stderr, e
+            outputdir = options.outputdir
+    # Set directories
+    if inputdir == None or not os.path.isdir(inputdir):
+        inputdir = tmp_dir
+    if outputdir == None or not os.path.isdir(outputdir):
+        outputdir = tempfile.mkdtemp()
+    if options.tempdefault != None and os.path.isdir(options.tempdefault):
+        tempdefault = ', tempdefault=%s' % options.tempdefault
+    # params.append('set.dir(input=%s,output=%s%s)' % (inputdir,outputdir,tempdefault))
+    params.append('set.dir(output=%s%s)' % (outputdir,tempdefault))
+    # Check for prerequisite read command 
+    if options.READ_cmd != None:
+        read_cmd_opts = ','.join(get_params(options.READ_cmd,options,inputdir,prefix='READ_'))
+        params.append('%s(%s)' % (options.READ_cmd,read_cmd_opts))
+    # Check for command options 
+    cmd_opts = ','.join(get_params(options.cmd,options,inputdir))
+    # print >> sys.stderr, cmd_opts
+    # print >> sys.stderr, params # so will appear as blurb for file
+    params.append('%s(%s)' % (options.cmd,cmd_opts))
+    try:
+        # Generate the mothur commandline 
+        # http://www.mothur.org/wiki/Command_line_mode
+        cmdline = 'mothur "#'  + '; '.join(params) + '"'
+        # print >> sys.stdout, '%s' % cmdline
+        if tmp_dir == None or not os.path.isdir(tmp_dir):
+            tmp_dir = tempfile.mkdtemp()
+        tmp_stderr_name = tempfile.NamedTemporaryFile( dir=tmp_dir,suffix='.err' ).name
+        tmp_stderr = open( tmp_stderr_name, 'wb' )
+        tmp_stdout_name = tempfile.NamedTemporaryFile( dir=tmp_dir,suffix='.out' ).name
+        tmp_stdout = open( tmp_stdout_name, 'wb' )
+        proc = subprocess.Popen( args=cmdline, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno(), stdout=tmp_stdout.fileno() )
+        # proc = subprocess.Popen( args=cmdline, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE )
+        returncode = proc.wait()
+        tmp_stderr.close()
+        # get stderr, allowing for case where it's very large
+        tmp_stderr = open( tmp_stderr_name, 'rb' )
+        stderr = ''
+        buffsize = 1048576
+        try:
+            while True:
+                stderr += tmp_stderr.read( buffsize )
+                if not stderr or len( stderr ) % buffsize != 0:
+                    break
+        except OverflowError:
+            pass
+        tmp_stderr.close()
+        if returncode != 0:
+            raise Exception, stderr
+        stdout = ''
+        # Parse stdout to provide info
+        tmp_stdout.close()
+        tmp_stdout = open( tmp_stdout_name, 'rb' )
+        info = ''
+        if options.cmd.startswith('chimera') and not options.cmd.endswith('check'):
+            pattern = '^.*$'
+            if options.cmd == 'chimera.slayer':
+                # gi|11093931|MNE12|AF293003	yes
+                pattern = '\S.*\tyes$' 
+            elif options.cmd == 'chimera.bellerophon':
+                # gi|11093939|MNB2|AF293011 is a suspected chimera at breakpoint 2195
+                pattern = '\S.* suspected chimera .*'
+            elif options.cmd == 'chimera.ccode':
+                # gi|11093940|MNF8|AF293012 was found have at least one chimeric window.
+                pattern = '\S.* chimeric window.*'
+            elif options.cmd == 'chimera.pintail':
+                pattern = '\S.*chimera.*Yes'
+                # move new generated template .freq and .quan files to outputdir  
+            chimera_count = 0
+            for line in tmp_stdout:
+                if re.match(pattern,line):
+                    chimera_count += 1
+            info += "Chimeras: %d" % chimera_count
+        else:
+            found_begin = False
+            for line in tmp_stdout:
+                if line.find(outputdir) >= 0:
+                    continue
+                if re.match('^Processing.*',line):
+                    continue
+                if re.match('.*\.\.\.\s*$',line):
+                    continue
+                if re.match('^\d*\s*$',line):
+                    continue
+                if re.match('Output .*',line):
+                    break
+                if found_begin:
+                    info += "%s" % line
+                if re.match('mothur > ' + options.cmd + '\(.*\)', line):
+                    found_begin = True
+        tmp_stdout.close()
+        print >> sys.stdout, info
+        # Collect output files
+        flist = os.listdir(outputdir)
+        if debug: print >> sys.stdout, '%s' % flist
+        # process option result first  
+        # These are the known galaxy datasets listed in the --result= param
+        if len(flist) > 0 and options.result:
+            # items in list are separated by commas
+            for output in options.result.split(','):
+                # Each item has a regex pattern and a file path to a galaxy dataset
+                (pattern,path) = output.split(':')
+                if debug: print >> sys.stdout, '%s -> %s' % (pattern,path)
+                if path == None or path == 'None':
+                    continue
+                found = False
+                for fname in flist:
+                    if debug: print >> sys.stdout, 'outdir %s match: %s' % (fname,re.match(pattern,fname))
+                    if re.match(pattern,fname):
+                        found = True
+                        flist.remove(fname)
+                        fpath = os.path.join(outputdir,fname)
+                        if fname.endswith('.logfile'):  
+                            # Make the logfile into html
+                            logfile_to_html(fpath,path,inputdir,outputdir,title="Mothur %s Logfile" % options.cmd)
+                        elif False and outputdir == options.outputdir:
+                            # Use a hard link if outputdir is the extra_files_path
+                            try:
+                                os.link(fpath, path)
+                            except:
+                                shutil.copy2(fpath, path)
+                        else:
+                            shutil.copy2(fpath, path)
+                        break
+                # chimera.pintail e.g.  generates files in the working dir that we might want to save
+                if not found:
+                    for fname in os.listdir(tmp_dir):
+                        if debug: print >> sys.stdout, 'tmpdir %s match: %s' % (fname,re.match(pattern,fname))
+                        if re.match(pattern,fname):
+                            fpath = os.path.join(tmp_dir,fname)
+                            shutil.copy2(fpath, path)
+                            break
+        # Handle the dynamically generated galaxy datasets
+        # http://bitbucket.org/galaxy/galaxy-central/wiki/ToolsMultipleOutput
+        # --new_datasets=   specifies files to copy to the new_file_path
+        # The list items are separated by commas
+        # Each item  conatins:   a regex pattern for matching filenames and  a galaxy datatype (separated by :)
+        # The regex match.groups()[0] is used as the id name of the dataset, and must result in  unique name for each output
+        if options.new_datasets != None and options.new_file_path != None and options.datasetid != None:
+            datasets = options.new_datasets.split(',')
+            for output in options.new_datasets.split(','):
+                (pattern,ext) = output.split(':');
+                for fname in flist:
+                    m = re.match(pattern,fname)
+                    if m:
+                        fpath = os.path.join(outputdir,fname)
+                        if len(m.groups()) > 0:
+                            root = m.groups()[0]
+                        else:
+                            # remove  the ext from the name if it exists, galaxy will add back later
+                            # remove underscores since galaxy uses that as a field separator for dynamic datasets
+                            root = re.sub('\.?'+ext+'$','',fname).replace('_','').replace('.','')
+                        # filename pattern required by galaxy 
+                        fn = "%s_%s_%s_%s_%s" % ( 'primary', options.datasetid, root, 'visible', ext )
+                        if debug:  print >> sys.stdout, '> %s' % fpath
+                        if debug:  print >> sys.stdout, '< %s' % os.path.join(options.new_file_path,fn)
+                        try:
+                            os.link(fpath, os.path.join(options.new_file_path,fn))
+                        except:
+                            shutil.copy2(fpath, os.path.join(options.new_file_path,fn))
+    except Exception, e:
+        msg = str(e) + stderr
+        """
+        if len(msg) < 50 and stdout != None:  
+            # include the last line of stdout
+            msg += stdout.splitlines()[-1]
+        """
+        stop_err( 'Error running  ' + msg)
+    finally:
+        # Only remove temporary directories
+        # Enclose in try block, so we don't report error on stale nfs handles
+        try: 
+            if outputdir != options.outputdir and os.path.exists(outputdir):
+                if os.path.islink(outputdir):
+                    os.remove(outputdir)
+                    shutil.rmtree(os.path.dirname(outputdir))
+                else:
+                    shutil.rmtree(outputdir)
+            if inputdir != options.inputdir and os.path.exists(inputdir):
+                shutil.rmtree(inputdir)
+        except:
+            pass
+        
+
+if __name__ == "__main__": __main__()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/normalize.shared.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,105 @@
+<tool id="mothur_normalize_shared" name="Normalize.shared" version="1.15.0">
+ <description>Normalize the number of sequences per group to a specified level</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='normalize.shared'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.norm\.shared$:'$shared
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #end if
+  #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+   --groups=$input.groups
+  #end if
+  #if $method.__str__ != "None" and len($method.__str__) > 0:
+   --method=$method
+  #end if
+  #if int($norm.__str__) > 0:
+   --norm=$norm
+  #end if
+ </command>
+ <inputs>
+  <conditional name="input">
+   <param name="source" type="select" label="Generate Heatmap for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group=) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+     <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="norm" type="integer" value="0" label="norm - Number to normalize to (Uses default if &lt; 1)"
+         help="By default this is set to the number of sequences in your smallest group."/>
+  <param name="method" type="select" optional="true" label="method - Normalization method">
+   <option value="">Use Default</option>
+   <option value="totalgroup">Total Group</option>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="shared" name="shared" label="${tool.name} on ${on_string}: norm.shared" />
+ </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 normalize.shared_ command normalizes the number of sequences per group to a specified level.
+
+.. _normalize.shared: http://www.mothur.org/wiki/Normalize.shared
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/pairwise.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,84 @@
+<tool id="mothur_pairwise_seqs" name="Pairwise.seqs" version="1.15.0">
+ <description>calculate uncorrected pairwise distances between sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='pairwise.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.dist$:'$out_dist
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --align=$align
+  #if len($calc.__str__) > 0:
+   --calc=$calc
+  #end if
+  $countends
+  #if float($cutoff.__str__) > 0.0:
+   --cutoff=$cutoff
+  #end if
+  --match=$scoring.match
+  --mismatch=$scoring.mismatch
+  --gapopen=$scoring.gapopen
+  --gapextend=$scoring.gapextend
+  #if len($output.__str__) > 0:
+   --output=$output
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Fasta"/>
+  <param name="align" type="select" label="align - Select a pairwise alignment method" help="">
+   <option value="needleman">needleman (default)</option>
+   <option value="gotoh">gotoh</option>
+   <option value="blast">blast</option>
+  </param>
+  <param name="calc" type="select" label="calc - Calc Method - Gap Penality" help="">
+   <option value="">use default</option>
+   <option value="onegap">onegap - counts a string of gaps as a single gap</option>
+   <option value="nogaps">nogaps - ignores gaps</option>
+   <option value="eachgap ">eachgap - penalize each gap</option>
+  </param>
+  <param name="countends" type="boolean" checked="true" truevalue="" falsevalue="--countends=false" label="countends - Countends" 
+                 help="Penalize terminal gaps"/>
+  <param name="cutoff" type="float" value="0.0" label="cutoff - Distance Cutoff threshold - ignored if not > 0" 
+                 help="Do not save any distances larger than this, a common value would be 0.10"/>
+  <param name="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/>
+  <param name="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/>
+  <param name="gapopen" type="integer" value="-2" label="gapopen - Pairwise alignment penalty for opening a gap"/>
+  <param name="gapextend" type="integer" value="-1" label="gapextend - Pairwise alignment penalty for extending a gap"/>
+
+  <param name="output" type="select" label="output - Distance Matrix Output Format" help="">
+   <option value="">Default Column-Formatted Matrix</option>
+   <option value="lt">Phylip formatted Lower Triangle Matrix</option>
+   <option value="square">Phylip formatted Square Matrix</option>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="pair.dist" name="out_dist" label="${tool.name} on ${on_string}: dist">
+   <change_format>
+    <when input="output" value="lt" format="lower.dist" />
+    <when input="output" value="square" format="square.dist" />
+   </change_format>
+  </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 pairwise.seqs_ command will calculate uncorrected pairwise distances between sequences.
+
+.. _pairwise.seqs: http://www.mothur.org/wiki/Pairwise.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/parse.list.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,50 @@
+<tool id="mothur_parse_list" name="Parse.list" version="1.15.0" force_history_refresh="True">
+ <description>Order Sequences by OTU</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='parse.list'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__' 
+  --new_datasets='^\S+?\.(\S+\.list)$:list'
+  --list=$otu
+  --group=$group
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+ </command>
+ <inputs>
+  <param name="otu" type="data" format="list" label="list - OTU List"/>
+  <param name="group" type="data" format="groups" label="group - Sequences Name reference"/>
+  <param name="label" type="select" optional="true" label="label - Select OTU Labels to filter out all but selected labels" multiple="true">
+   <options from_dataset="otu">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 parse.list_ command prints out a fasta-formatted file where sequences are ordered according to the OTU that they belong to. Such an output may be helpful for generating primers specific to an OTU or for classification of sequences.
+
+.. _parse.list: http://www.mothur.org/wiki/Parse.list
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/parsimony.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,71 @@
+<tool id="mothur_parsimony" name="Parsimony" version="1.15.0">
+ <description>Describes whether two or more communities have the same structure</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='parsimony'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.psummary$:'$psummary,'^\S+\.parsimony$:'$parsimony
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.tree'
+  --READ_tree=$tree
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --READ_group='$group'
+  #end if
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups='$groups'
+  #end if
+  #if int($iters.__str__) > 0:
+   --iters=$iters
+  #end if
+ </command>
+ <inputs>
+  <param name="tree" type="data" format="tre" label="read.tree(tree=) - Phylogenetic Tree"/>
+  <param name="group" type="data" format="groups" label="read.tree(group=) - Group file for the tree"/>
+  <!--
+  <param name="name" type="data" format="names" optional="true" label="read.tree(name=) - Sequences Name reference file for the tree"/>
+  -->
+  <param name="groups" type="select" label="groups - Groups to display" multiple="true">
+   <options from_dataset="group">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="iters" type="integer" value="1000" label="iters - Number of bootstrap iterations to try (default 1000)"/>
+  <!-- random uses input prompts, not sure how to model that
+  <param name="random" type="text" value="" label="random - The root name for random tests"/>
+  -->
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="psummary" label="${tool.name} on ${on_string}: psummary">
+  </data>
+  <data format="tabular" name="parsimony" label="${tool.name} on ${on_string}: parsimony">
+  </data>
+  <!-- random uses input prompts, not sure how to model that
+  <data format="tabular" name="random" label="${tool.name} on ${on_string}: random">
+  </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 parsimony_ command implements the parsimony method (aka P-test), which was previously implemented in TreeClimber and is also available in MacClade and on the UniFrac website. The parsimony method is a generic test that describes whether two or more communities have the same structure. The significance of the test statistic can only indicate the probability that the communities have the same structure by chance. The value does not indicate a level of similarity. 
+
+.. _parsimony: http://www.mothur.org/wiki/Parsimony
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/pcoa.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,39 @@
+<tool id="mothur_pcoa" name="Pcoa" version="1.15.0" >
+ <description>Principal Coordinate Analysis</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='pcoa'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.pcoa$:'$pca,'^\S+\.pcoa.loadings$:'$loadings
+  --outputdir='$logfile.extra_files_path'
+  --phylip=$phylip
+ </command>
+ <inputs>
+  <param name="phylip" type="data" format="lower.dist,square.dist" label="phylip - Phylip Distance Matrix"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="pca" label="${tool.name} on ${on_string}: PCA" />
+  <data format="tabular" name="loadings" label="${tool.name} on ${on_string}: loadings" />
+ </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 pcoa_ command performs principal coordinate analysis.
+
+.. _pcoa: http://www.mothur.org/wiki/Pcoa
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/phylo.diversity.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,85 @@
+<tool id="mothur_phylo_diversity" name="Phylo.diversity" version="1.15.0">
+ <description>Alpha Diversity calculate unique branch length</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='phylo.diversity'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.phylodiv\.summary$:'$summary_out,'^\S+\.phylodiv$:'$collectors_out,'^\S+\.rarefaction$:'$rarefaction_out
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.tree'
+  --READ_tree=$tree
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --READ_group='$group'
+  #end if
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups='$groups'
+  #end if
+  #if int($iters.__str__) > 0:
+   --iters=$iters
+  #end if
+  #if float($freq.__str__) > 0:
+   --freq=$freq
+  #end if
+  $scale
+  $summary
+  $collect
+  $rarefy
+ </command>
+ <inputs>
+  <!-- list,group  or shared -->
+  <param name="tree" type="data" format="tre" label="read.tree(tree=) - Phylogenetic Tree"/>
+  <param name="group" type="data" format="groups" label="read.tree(group=) - Group file for the tree"/>
+  <param name="groups" type="select" label="groups - Groups to display" multiple="true">
+   <options from_dataset="group">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="iters" type="integer" value="1000" label="iters - Number of iterations to try (default 1000)"/>
+  <param name="freq" type="float" value="0.0" label="freq - Reporting frequency" 
+         help="if between 0 and 1 the fraction of sequences to sample, if greater than one - report every n iterations"/>
+
+  <param name="scale" type="boolean" truevalue="--scale=true" falsevalue="" checked="false" label="scale - Scale output to the number of sequences sampled" />
+  <param name="rarefy" type="boolean" truevalue="--rarefy=true" falsevalue="" checked="false" label="rarefy - Calculate the rarefaction data" />
+  <param name="summary" type="boolean" truevalue="" falsevalue="--summary=false" checked="true" label="summary - Generate a summary file" />
+  <param name="collect" type="boolean" truevalue="--collect=true" falsevalue="" checked="false" label="collect - Create a collectors curve" />
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="summary_out" label="${tool.name} on ${on_string}: summary">
+   <filter>summary == True</filter>
+  </data>
+  <data format="tabular" name="rarefaction_out" label="${tool.name} on ${on_string}: rarefaction">
+   <filter>rarefy == True</filter>
+  </data>
+  <data format="tabular" name="collectors_out" label="${tool.name} on ${on_string}: collectors">
+   <filter>collect == True</filter>
+  </data>
+  <!-- random uses input prompts, not sure how to model that
+  <data format="tabular" name="random" label="${tool.name} on ${on_string}: random">
+  </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 phylo.diversity_ command calculates alpha diversity as the total of the unique branch length. 
+
+.. _phylo.diversity: http://www.mothur.org/wiki/Phylo.diversity
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/phylotype.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,65 @@
+<tool id="mothur_phylotype" name="Phylotype" version="1.15.0">
+ <description>Assign sequences to OTUs based on taxonomy</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='phylotype'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.[fna]n\.sabund$:'$sabund,'^\S+\.[fna]n\.rabund$:'$rabund,'^\S+\.[fna]n\.list$:'$otulist
+  --outputdir='$logfile.extra_files_path'
+  --taxonomy=$taxonomy
+  #if 50 >= int($cutoff.__str__) > 0:
+   --cutoff=$cutoff
+  #end if
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --name='$name'
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+ </command>
+ <inputs>
+  <param name="taxonomy" type="data" format="taxonomy" label="taxonomy - Taxonomy"/>
+  <param name="name" type="data" format="names" optional="true" label="name - Names reference file for the taxonomy"/>
+  <param name="label" type="select" label="label - Taxonomy Levels to report (All when none are selected)" multiple="true">
+   <option value="0">0</option>
+   <option value="1">1</option>
+   <option value="2">2</option>
+   <option value="3">3</option>
+   <option value="4">4</option>
+   <option value="5">5</option>
+   <option value="6">6</option>
+   <option value="7">7</option>
+   <option value="8">8</option>
+   <option value="9">9</option>
+   <option value="10">10</option>
+  </param>
+  <param name="cutoff" type="integer" value="-1" label="cutoff - Truncate the taxomony at depth (Ignored if &lt; 0)"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="rabund" name="rabund" label="${tool.name} on ${on_string}: rabund (Rank)"/>
+  <data format="sabund" name="sabund" label="${tool.name} on ${on_string}: sabund (Species)"/>
+  <data format="list" name="otulist" label="${tool.name} on ${on_string}: list (OTU List)"/>
+ </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 phylotype_ command assign sequences to OTUs based on their taxonomy and outputs a .list, .rabund and .sabund files.
+
+.. _phylotype: http://www.mothur.org/wiki/Phylotype
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/pre.cluster.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,47 @@
+<tool id="mothur_pre_cluster" name="Pre.cluster" version="1.15.0">
+ <description>Remove sequences due to pyrosequencing errors</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='pre.cluster'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.precluster\.fasta$:'$fasta_out,'^\S+\.precluster\.names$:'$names_out
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  #if $matrix.name.__str__ != "None" and len($matrix.name.__str__) > 0:
+   --name=$name
+  #if 20 >= int($diffs.__str__) >= 0:
+   --diffs=$diffs
+  #end if
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequence Fasta"/>
+  <param name="name" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+  <param name="diffs" type="integer" value="1" label="diffs - Number of mismatched bases to allow between sequences in a group (default 1)"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="fasta_out" label="${tool.name} on ${on_string}: precluster.fasta" />
+  <data format="names" name="names_out" label="${tool.name} on ${on_string}: precluster.names" />
+ </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 pre.cluster_ command implements a pseudo-single linkage algorithm with the goal of removing sequences that are likely due to pyrosequencing errors. The basic idea is that abundant sequences are more likely to generate erroneous sequences than rare sequences. With that in mind, the algorithm proceeds by ranking sequences in order of their abundance. Then we walk through the list of sequences looking for rarer sequences that are within some threshold of the original sequence. Those that are within the threshold are merged with the larger sequence. The original Huse method performs this task on a distance matrix, whereas we do it based on the original sequences. The advantage of our approach is that the algorithm works on aligned sequences instead of a distance matrix. This is advantageous because by pre-clustering you remove a large number of sequences making the distance calculation much faster.
+
+.. _pre.cluster: http://www.mothur.org/wiki/Pre.cluster
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/rarefaction.shared.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,110 @@
+<tool id="mothur_rarefaction_shared" name="Rarefaction.shared" version="1.15.0">
+ <description>Generate inter-sample rarefaction curves for OTUs</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='rarefaction.shared'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.rarefaction$:'$rarefaction
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #end if
+  #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+   --groups=$input.groups
+  #end if
+  #if int($iters.__str__) > 0:
+   --iters=$iters
+  #end if
+  $jumble
+  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+    --calc='$calc'
+  #end if
+ </command>
+ <inputs>
+  <conditional name="input">
+   <param name="source" type="select" label="Generate Heatmap for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group=) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+     <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="iters" type="integer" value="0" label="iters - Number of randomizations"/>
+  <param name="jumble" type="boolean" truevalue="" falsevalue="--jumble=false" checked="true" label="jumble"/>
+  <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+   <options from_file="mothur_calulators.loc">
+     <column name="mult2" index="2"/>
+     <column name="name" index="0"/>
+     <column name="value" index="0"/>
+     <filter type="static_value" name="mult2" column="2" value="rare" />
+   </options>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="rarefaction" label="${tool.name} on ${on_string}: shared.rarefaction" />
+ </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 rarefaction.shared_ command generates inter-sample rarefaction curves using a re-sampling without replacement approach. The traditional way that ecologists use rarefaction is not to randomize the sampling order within a sample, rather between samples. For instance, if we wanted to know the number of OTUs in the human colon, we might sample from various sites within the colon, and sequence a bunch of 16S rRNA genes. By determining the number of OTUs in each sample and comparing the composition of those samples it is possible to determine how well you have sampled the biodiversity within the individual.
+
+.. _rarefaction.shared: http://www.mothur.org/wiki/Rarefaction.shared
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/rarefaction.single.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,77 @@
+<tool id="mothur_rarefaction_single" name="Rarefaction.single" version="1.15.0" force_history_refresh="True">
+ <description>Generate intra-sample rarefaction curves for OTUs</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='rarefaction.single'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.(((\S+)\.)?rarefaction)$:tabular'
+  --READ_cmd='read.otu'
+  --READ_list=$otu
+  #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+   --READ_group='$otu_group'
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+    --calc='$calc'
+  #end if
+  #if int($abund.__str__) > 0:
+   --abund=$abund
+  #end if
+  #if int($iters.__str__) > 0:
+   --iters=$iters
+  #end if
+ </command>
+  #if float($freq.__str__) > 0:
+   --freq=$freq
+  #end if
+ <inputs>
+  <param name="otu" type="data" format="list,shared" label="read.otu(list=) - OTU List"/>
+  <param name="otu_group" type="data" format="groups" optional="true" label="read.otu(lis =) - Group file for the OTU List"/>
+  <param name="label" type="select" label="label - OTU Labels" multiple="true">
+   <options from_dataset="otu">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+  <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+   <options from_file="mothur_calulators.loc">
+     <column name="mult2" index="2"/>
+     <column name="name" index="0"/>
+     <column name="value" index="0"/>
+     <filter type="static_value" name="mult2" column="2" value="sing" />
+   </options>
+  </param>
+  <param name="abund" type="integer" value="10" label="abund - ACE Estimator threshold for abundant versus rare OTUs"/>
+  <param name="iters" type="integer" value="0" label="iters - Number of randomizations"/>
+  <param name="freq" type="float" value="0.0" label="freq - Reporting frequency" 
+         help="if between 0 and 1 the fraction of sequences to sample, if greater than one - report every n iterations"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 rarefaction.single_ command generates intra-sample rarefaction curves using a re-sampling without replacement approach. Rarefaction curves provide a way of comparing the richness observed in different samples.
+
+.. _rarefaction.single: http://www.mothur.org/wiki/Rarefaction.single
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/read.otu.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,55 @@
+<tool id="mothur_read_otu" name="Read.otu" version="1.15.0" force_history_refresh="True">
+ <description>Read OTU list and group to create a shared file</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='read.otu'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.shared:'$shared
+  --outputdir='$logfile.extra_files_path'
+  #if $show_rabund.value == True:
+   --datasetid='$logfile.id' --new_file_path='$__new_file_path__' 
+   --new_datasets='^\S+?\.((\S+)\.rabund)$:rabund'
+  #end if
+  --cmd='read.otu'
+  --list=$otu
+  --group=$otu_group
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+ </command>
+ <inputs>
+  <param name="otu" type="data" format="list" label="list - OTU List"/>
+  <param name="otu_group" type="data" format="groups" label="group - Group file for the OTU List"/>
+  <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
+   <options from_dataset="otu">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+  <param name="show_rabund" type="boolean" truevalue="yes" falsevalue="no" checked="true" label="Put Group rabund files in your history"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="shared" name="shared" label="${tool.name} on ${on_string}: shared" />
+ </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 read.otu_ command is called before most of the OTU based mothur commands.  It is included here explicitly to allow the creatation of a shared file from OTU list and group files.  
+
+.. _read.otu: http://www.mothur.org/wiki/Read.otu
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/remove.groups.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,91 @@
+<tool id="mothur_remove_groups" name="Remove.groups" version="1.15.0">
+ <description>Remove groups</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 $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups=$groups
+  #end if
+  #if $accnos.__str__ != "None" and len($accnos.__str__) > 0:
+   --accnos=$accnos
+  #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 $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
+  --result=#echo ','.join($results)
+
+ </command>
+ <inputs>
+  <param name="group_in" type="data" format="groups" label="group - Groups"/>
+  <param name="groups" type="select" optional="true" label="groups - Pick groups to remove" multiple="true">
+   <options from_dataset="group_in">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="accnos" type="data" format="accnos" optional="true" label="accnos - Accession Names"/>
+  <param name="fasta_in" type="data" format="fasta" 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="taxonomy_in" type="data" format="taxonomy" optional="true" label="taxonomy - Taxonomy"/>
+ </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="fasta" 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="taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy">
+   <filter>taxonomy_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.
+
+.. _remove.groups: http://www.mothur.org/wiki/Remove.groups
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/remove.lineage.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,95 @@
+<tool id="mothur_remove_lineage" name="Remove.lineage" version="1.15.0">
+ <description>Picks by taxon</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($taxonomy.__str__)) + ":'" + $taxonomy_out.__str__]
+  --cmd='remove.lineage'
+  --outputdir='$logfile.extra_files_path'
+  --taxonomy=$taxonomy
+  --taxon="'$re.sub('\(\d+\)','',$taxon.value.__str__)'"
+  #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 $group_in.__str__ != "None" and len($group_in.__str__) > 0:
+   --group=$group_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($group_in.__str__)) + ":'" + $group_out.__str__]
+  #end if
+  #if $alignreport_in.__str__ != "None" and len($alignreport_in.__str__) > 0:
+   --alignreport=$alignreport_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($alignreport_in.__str__)) + ":'" + $alignreport_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 $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__]
+   $dups
+  #end if
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="taxonomy" type="data" format="taxonomy" label="taxonomy - Taxonomy"/>
+  <param name="taxons" type="select" size="120" label="Browse Taxons from Taxonomy">
+   <options from_dataset="taxonomy">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unique_taxon" column="1" />
+   </options>
+  </param>
+  <param name="taxon" type="text" size="120" label="taxon - Select Taxon"/>
+  <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - Fasta Sequences"/>
+  <param name="group_in" type="data" format="groups" optional="true" label="group - Groups"/>
+  <param name="alignreport_in" type="data" format="align.report" optional="true" label="alignreport - Align Report"/>
+  <param name="list_in" type="data" format="list" optional="true" label="list - OTU List"/>
+  <param name="name_in" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+  <param name="dups" type="boolean" truevalue="" falsevalue="--dups=false" checked="true" label="dups - Apply to duplicate names"/>
+ </inputs>
+ <outputs>
+  <!-- fix format -->
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy"/>
+  <data format="fasta" name="fasta_out" label="${tool.name} on ${on_string}: pick.fasta">
+   <filter>fasta_in != None</filter>
+  </data>
+  <data format="groups" name="group_out" label="${tool.name} on ${on_string}: pick.group">
+   <filter>group_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="names" name="name_out" label="${tool.name} on ${on_string}: pick.name">
+   <filter>name_in != None</filter>
+  </data>
+  <data format="align.report" name="alignreport_out" label="${tool.name} on ${on_string}: pick.align.report">
+   <filter>alignreport_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.lineage_ command reads a taxonomy file and a taxon and generates a new file that contains only the sequences in the that are not from that taxon. You may also include either a fasta, name, group, list, or align.report file to this command and mothur will generate new files for each of those containing only the selected sequences.
+
+.. _remove.lineage: http://www.mothur.org/wiki/Remove.lineage
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/remove.otus.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,68 @@
+<tool id="mothur_remove_otus" name="Remove.otus" version="1.15.0">
+ <description>Remove otus containing sequences from specified groups</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  ## output {group_file_name}.pick.{label}.groups   {list_file_name}.pick.{label}.list 
+  #import re, os.path
+  --cmd='remove.otus'
+  --outputdir='$logfile.extra_files_path'
+  --group=$group_in
+  --list=$list_in
+  --label=$label
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups=$groups
+  #end if
+  #if $accnos.__str__ != "None" and len($accnos.__str__) > 0:
+   --accnos=$accnos
+  #end if
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.' + $label.__str__ + '.\2',$os.path.basename($group_in.__str__)) + ":'" + $group_out.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.'+ $label.__str__ + '.\2',$os.path.basename($list_in.__str__)) + ":'" + $list_out.__str__]
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="group_in" type="data" format="groups" label="group - Groups"/>
+  <param name="list_in" type="data" format="list" label="list - OTU List"/>
+  <param name="label" type="select" label="label - OTU Labels" >
+   <options from_dataset="list_in">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+  <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true">
+   <options from_dataset="group_in">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="accnos" type="data" format="accnos" optional="true" label="accnos - Group Names from your history"/>
+ </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"/>
+  <data format="list" name="list_out" label="${tool.name} on ${on_string}: pick.list"/>
+ </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.otus_ command removes otus containing sequences from a specific group or set of groups.
+
+.. _remove.otus: http://www.mothur.org/wiki/Remove.otus
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/remove.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,100 @@
+<tool id="mothur_remove_seqs" name="Remove.seqs" version="1.15.0">
+ <description>Remove sequences by name</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 (except align.report)
+  --cmd='remove.seqs'
+  --outputdir='$logfile.extra_files_path'
+  --accnos=$accnos
+  #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 $qfile_in.__str__ != "None" and len($qfile_in.__str__) > 0:
+   --qfile=$qfile_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($qfile_in.__str__)) + ":'" + $qfile_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__]
+   $dups
+  #end if
+  #if $group_in.__str__ != "None" and len($group_in.__str__) > 0:
+   --group=$group_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($group_in.__str__)) + ":'" + $group_out.__str__]
+  #end if
+  #if $alignreport_in.__str__ != "None" and len($alignreport_in.__str__) > 0:
+   --alignreport=$alignreport_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.pick.align.report',$os.path.basename($alignreport_in.__str__)) + ":'" + $alignreport_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 $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
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="accnos" type="data" format="accnos" label="accnos - Accession Names"/>
+  <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - Fasta Sequences"/>
+  <param name="qfile_in" type="data" format="qual" optional="true" label="qfile - Fasta Quality"/>
+  <param name="name_in" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+  <param name="group_in" type="data" format="groups" optional="true" label="group - Sequences Groups"/>
+  <param name="alignreport_in" type="data" format="align.report" optional="true" label="alignreport - Align Report"/>
+  <param name="list_in" type="data" format="list" optional="true" label="list - OTU List"/>
+  <param name="taxonomy_in" type="data" format="taxonomy" optional="true" label="taxonomy - Taxonomy"/>
+  <param name="dups" type="boolean" truevalue="" falsevalue="--dups=false" checked="true" label="dups - Apply to duplicates"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <!-- format should be set to match input -->
+  <data format="fasta" name="fasta_out" label="${tool.name} on ${on_string}: pick.fasta">
+   <filter>fasta_in != None</filter>
+  </data>
+  <!-- format should be set to match input -->
+  <data format="qual" name="qfile_out" label="${tool.name} on ${on_string}: pick.qfile">
+   <filter>qfile_in != None</filter>
+  </data>
+  <data format="names" name="name_out" label="${tool.name} on ${on_string}: pick.names">
+   <filter>name_in != None</filter>
+  </data>
+  <data format="groups" name="group_out" label="${tool.name} on ${on_string}: pick.groups">
+   <filter>group_in != None</filter>
+  </data>
+  <data format="align.report" name="alignreport_out" label="${tool.name} on ${on_string}: pick.align.report">
+   <filter>alignreport_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="taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy">
+   <filter>taxonomy_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.seqs_ command takes a list of sequence names and either a fasta, name, group, list, or align.report file to generate a new file that does not contain the sequences in the list. This command may be used in conjunction with the list.seqs command to help screen a sequence collection.
+
+.. _remove.seqs: http://www.mothur.org/wiki/Remove.seqs
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/reverse.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,38 @@
+<tool id="mothur_reverse_seqs" name="Reverse.seqs" version="1.15.0">
+ <description>Reverse complement the sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='reverse.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.rc\.\w+$:'$out_fasta
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequences to reverse complement"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_fasta" label="${tool.name} on ${on_string}: rc.fasta" />
+ </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 reverse.seqs_ command will generate a fasta containing the reverse complement of each sequence in the input fasta.
+
+.. _reverse.seqs: http://www.mothur.org/wiki/Reverse.seqs
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/screen.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,121 @@
+<tool id="mothur_screen_seqs" name="Screen.seqs" version="1.15.0">
+ <description>Screen sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  --cmd='screen.seqs'
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.good.\2',$os.path.basename($input.__str__)) + ":'" + $out_file.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.bad.accnos',$os.path.basename($input.__str__)) + ":'" + $bad_accnos.__str__]
+  --outputdir='$logfile.extra_files_path'
+  --tmpdir='${logfile.extra_files_path}/input'
+  --fasta=$input
+  #if int($start) >= 0:
+   --start=$start
+  #end if
+  #if int($end) >= 0:
+   --end=$end
+  #end if
+  #if int($minlength) >= 0:
+   --minlength=$minlength
+  #end if
+  #if int($maxlength) >= 0:
+   --maxlength=$maxlength
+  #end if
+  #if int($maxambig) >= 0:
+   --maxambig=$maxambig
+  #end if
+  #if int($maxhomop) >= 0:
+   --maxhomop=$maxhomop
+  #end if
+  #if int($criteria) >= 0:
+   --criteria=$criteria
+  #end if
+  #if $optimize != None and $optimize.__str__ != "None":
+   --optimize=$optimize
+  #end if
+  #if $input_names != None and $input_names.__str__ != "None":
+   --name=$input_names
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.good.\2',$os.path.basename($input_names.__str__)) + ":'" + $output_names.__str__]
+  #end if
+  #if $input_groups != None and $input_groups.__str__ != "None":
+   --group=$input_groups
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.good.\2',$os.path.basename($input_groups.__str__)) + ":'" + $output_groups.__str__]
+  #end if
+  #if $input_alignreport != None and $input_alignreport.__str__ != "None":
+   --alignreport=$input_alignreport
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.good.\2',$os.path.basename($input_alignreport.__str__)) + ":'" + $output_alignreport.__str__]
+  #end if
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="input" type="data" format="fasta,align" label="fasta - Fasta to screen"/>
+  <param name="start" type="integer" value="-1" label="start - Remove sequences that start after position (ignored when negative)"/>
+  <param name="end" type="integer" value="-1" label="end - Remove sequences that end before position (ignored when negative)"/>
+  <param name="minlength" type="integer" value="-1" label="minlength - Remove sequences shorter than (ignored when negative)"/>
+  <param name="maxlength" type="integer" value="-1" label="maxlength - Remove sequences longer than (ignored when negative)"/>
+  <param name="maxambig" type="integer" value="-1" label="maxambig - Remove sequences with ambiguous bases greater than (ignored when negative)"/>
+  <param name="maxhomop" type="integer" value="-1" label="maxhomop - Remove sequences with homopolymers greater than (ignored when negative)"/>
+  <param name="criteria" type="integer" value="-1" label="criteria - Percent of sequences that an optimize value must match to be retained(ignored when negative)"/>
+  <param name="optimize" type="select" multiple="true" display="checkboxes" label="optimize - Optimize selected paramenters">
+   <option value="start">start</option>
+   <option value="end">end</option>
+   <option value="minlength">minlength</option>
+   <option value="maxlength">maxlength</option>
+   <option value="maxambig">maxambig</option>
+   <option value="maxhomop">maxhomop</option>
+  </param>
+  <param name="input_names" type="data" format="names" optional="true" label="name - Sequece Names to screen"/>
+  <param name="input_groups" type="data" format="groups" optional="true" label="group - Groups to screen"/>
+  <param name="input_alignreport" type="data" format="align.report" optional="true" label="alignreport - Align Report to screen"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_file" label="${tool.name} on ${on_string}: good.fasta" >
+   <change_format>
+    <when input_dataset="input" attribute="ext" value="align" format="align"/>
+   </change_format>
+   <!--
+   <actions>
+    <conditional name="input">
+     <when datatype_isinstance="align">
+      <action type="format" default="align"/>
+     </when>
+    </conditional>
+   </actions>
+   -->
+  </data>
+  <data format="accnos" name="bad_accnos" label="${tool.name} on ${on_string}: bad.accnos" />
+  <data format="names" name="output_names" label="${tool.name} on ${on_string}: names" >
+   <filter>input_names != None</filter>
+  </data>
+  <data format="groups" name="output_groups" label="${tool.name} on ${on_string}: groups" >
+   <filter>input_groups != None</filter>
+  </data>
+  <data format="align.report" name="output_alignreport" label="${tool.name} on ${on_string}: align.report" >
+   <filter>input_alignreport != 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 screen.seqs_ command enables you to keep sequences that fulfill certain user defined criteria. Furthermore, it enables you to cull those sequences not meeting the criteria from a names, group, or align.report file. 
+
+.. _screen.seqs: http://www.mothur.org/wiki/Screen.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/sffinfo.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,77 @@
+<tool id="mothur_sffinfo" name="Sffinfo" version="1.15.0">
+ <description>Summarize the quality of sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='sffinfo'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.fasta$:'$out_fasta,'^\S+\.qual$:'$out_qfile,'^\S+\.sff\.txt$:'$out_sfftxt,'^\S+\.flow$:'$out_flow
+  --outputdir='$logfile.extra_files_path'
+  --sff=$sff
+  $fasta
+  $qfile
+  $sfftxt
+  $flow
+  $trim
+  #if $accnos.__str__ != 'None' and len($accnos.__str__) > 0:
+   --accnos=$accnos
+  #end if
+ </command>
+ <inputs>
+  <param name="sff" type="data" format="sff" label="sff - Sff data"/>
+  <!--
+  <repeat name="more" title="Additional ">
+   <param name="sff" type="data" format="sff" label="sff - Sff data"/>
+  </repeat>
+  -->
+  <!--
+  <param name="datasets" type="select" display="checkboxes" multiple="True" label="datasets - Choose output files for your history" help="Selected outputs will be listed as datasets in your history">
+   <option value="fasta">fasta</option>
+   <option value="qfile">qfile</option>
+   <option value="sfftxt">sfftxt</option>
+   <option value="flow">flow</option>
+  </param>
+  -->
+  <param name="fasta" type="boolean" truevalue="" falsevalue="--fasta=false" checked="true" label="fasta - Add fasta to your history" />
+  <param name="qfile" type="boolean" truevalue="" falsevalue="--qfile=false" checked="true" label="qfile - Add qfile to your history" />
+  <param name="sfftxt" type="boolean" truevalue="--sfftxt=true" falsevalue="" checked="false" label="sfftxt - Add sfftxt to your history" />
+  <param name="flow" type="boolean" truevalue="--flow=true" falsevalue="" checked="false" label="flow - Add flow to your history" />
+  <param name="trim" type="boolean" truevalue="" falsevalue="--trim=false" checked="true" label="trim - Trim sequences and quality scores" />
+  <param name="accnos" type="data" format="accnos" optional="true" label="accnos - Limit output to named Accessions"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_fasta" label="${tool.name} on ${on_string}: fasta">
+   <filter>fasta == True</filter>
+  </data>
+  <data format="qual454" name="out_qfile" label="${tool.name} on ${on_string}: qual">
+   <filter>qfile == True</filter>
+  </data>
+  <data format="txt" name="out_sfftxt" label="${tool.name} on ${on_string}: sff.txt">
+   <filter>sfftxt == True</filter>
+  </data>
+  <data format="txt" name="out_flow" label="${tool.name} on ${on_string}: flowgram">
+   <filter>flow == True</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 sffinfo_ command will summarize the quality of sequences in an unaligned or aligned fasta-formatted sequence file.
+
+
+.. _sffinfo: http://www.mothur.org/wiki/Sffinfo
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/split.abund.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,91 @@
+<tool id="mothur_split_abund" name="Split.abund" version="1.15.0" force_history_refresh="True">
+ <description>Separate sequences into rare and abundant groups</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='split.abund'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.abund\.list$:'$abund_list,'^\S+\.rare\.list$:'$rare_list,'^\S+\.rare\.accnos$:'$rare_accnos,'^\S+\.abund\.accnos$:'$abund_accnos
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.((unique|[0-9.]+)\.(rare|abund)\.fasta)$:fasta','^\S+?\.((unique|[0-9.]+)\.(rare|abund)\.groups)$:groups','^\S+?\.((unique|[0-9.]+)\.(rare|abund)\.accnos)$:accnos'
+  --fasta=$fasta
+  #if $search.type == "list":
+   --list=$search.input
+   #if $search.label.__str__ != "None" and len($search.label.__str__) > 0:
+    --label=$search.label
+   #end if
+  #elif $search.type == "name":
+   --name=$search.input
+  #end if
+  --cutoff=$cutoff
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --group=$group
+  #end if
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups=$groups
+  #end if
+  $accnos
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Fasta"/>
+  <conditional name="search">
+   <param name="type" type="select" label="Type to screen" help="">
+    <option value="list">OTU List</option>
+    <option value="name">Name reference</option>
+   </param>
+   <when value="name">
+    <param name="input" type="data" format="names" label="name - Name reference"/>
+   </when>
+   <when value="list">
+    <param name="input" type="data" format="list" label="list - OTU List"/>
+    <param name="label" type="select" label="label - OTU Labels" multiple="true">
+     <options from_dataset="input">
+      <column name="name" index="0"/>
+      <column name="value" index="0"/>
+     </options>
+    </param>
+   </when>
+  </conditional>
+  <param name="cutoff" type="integer" value="10" label="cutoff - Cutoff parameter is used to qualify what is abundant and rare."/>
+  <param name="group" type="data" format="groups" optional="true" label="group - Group dataset"/>
+  <param name="groups" type="select" label="groups - Group Selection (all used if none are selected)" multiple="true">
+   <options from_dataset="group">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="accnos" type="boolean" truevalue="--accnos=true" falsevalue="" checked="false" label="accnos - Produce rare and abundant Accession outputs"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="list" name="abund_list" label="${tool.name} on ${on_string}: abund.list" />
+  <data format="list" name="rare_list" label="${tool.name} on ${on_string}: rare.list" />
+  <data format="accnos" name="rare_accnos" label="${tool.name} on ${on_string}: rare.accnos">
+   <filter>accnos == True</filter>
+  </data>
+  <data format="accnos" name="abund_accnos" label="${tool.name} on ${on_string}: abund.accnos">
+   <filter>accnos == True</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 split.abund_ command reads a fasta file and a list or a names file and splits the sequences into rare and abundant groups.
+
+.. _split.abund: http://www.mothur.org/wiki/Split.abund
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/split.groups.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,41 @@
+<tool id="mothur_split_groups" name="Split.groups" version="1.15.0" force_history_refresh="True">
+ <description>Generates a fasta file for each group</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='split.groups'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.(\S+\.fasta)$:fasta'
+  --fasta=$fasta
+  --group=$group
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Fasta"/>
+  <param name="group" type="data" format="groups" label="group - Groups"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 split.groups_ command reads a fasta file group file and generates a fasta file for each group in the groupfile. 
+
+.. _split.groups: http://www.mothur.org/wiki/Split.groups
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/sub.sample.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,203 @@
+<tool id="mothur_sub_sample" name="Sub.sample" version="1.15.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.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
+   #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.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
+   #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)
+ </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 from_dataset="group_in">
+        <column name="name" index="1"/>
+        <column name="value" index="1"/>
+        <filter type="unique_value" name="unq_grp" column="1" />
+       </options>
+      </param>
+     </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 from_dataset="group_in">
+        <column name="name" index="1"/>
+        <column name="value" index="1"/>
+        <filter type="unique_value" name="unq_grp" column="1" />
+       </options>
+      </param>
+     </when> <!-- yes -->
+    </conditional> <!-- use_group -->
+    <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
+     <options from_dataset="otu_in">
+      <column name="name" index="0"/>
+      <column name="value" index="0"/>
+     </options>
+    </param>
+   </when> <!-- list -->
+   <when value="shared">
+    <param name="otu_in" type="data" format="shared" label="shared - OTU List"/>
+    <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true">
+     <options from_dataset="otu_in">
+      <column name="name" index="1"/>
+      <column name="value" index="1"/>
+      <filter type="unique_value" name="unq_grp" column="1" />
+     </options>
+    </param>
+    <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
+     <options from_dataset="otu_in">
+      <column name="name" index="0"/>
+      <column name="value" index="0"/>
+     </options>
+    </param>
+   </when> <!-- shared -->
+   <when value="sabund">
+    <param name="otu_in" type="data" format="sabund" label="sabund - OTU List"/>
+    <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
+     <options from_dataset="otu_in">
+      <column name="name" index="0"/>
+      <column name="value" index="0"/>
+     </options>
+    </param>
+   </when> <!-- sabund -->
+   <when value="rabund">
+    <param name="otu_in" type="data" format="rabund" label="rabund - OTU List"/>
+    <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
+     <options from_dataset="otu_in">
+      <column name="name" index="0"/>
+      <column name="value" index="0"/>
+     </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"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" 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>
+  <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['use_group']['group_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 sub.sample_ command selects otus containing sequences from a specific group or set of groups.
+
+.. _sub.sample: http://www.mothur.org/wiki/Sub.sample
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/summary.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,39 @@
+<tool id="mothur_summary_seqs" name="Summary.seqs" version="1.15.0">
+ <description>Summarize the quality of sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='summary.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.summary$:'$out_summary
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta,align" label="fasta - Dataset"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="summary" name="out_summary" label="${tool.name} on ${on_string}: summary" />
+ </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 summary.seqs_ command will summarize the quality of sequences in an unaligned or aligned fasta-formatted sequence file.
+
+
+.. _summary.seqs: http://www.mothur.org/wiki/Summary.seqs
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/summary.shared.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,121 @@
+<tool id="mothur_summary_shared" name="Summary.shared" version="1.15.0"  force_history_refresh="True">
+ <description>Summary of calculator values for OTUs</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='summary.shared'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.summary$:'$summary
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.((\S+)\.(unique|[0-9.]*)\.dist)$:lower.dist'
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #end if
+  #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+   --groups=$input.groups
+  #end if
+  #*
+  --READ_list=$otu
+  #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+   --READ_group='$otu_group'
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+  *#
+  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+   --calc='$calc'
+  #end if
+  $all
+ </command>
+ <inputs>
+  <!-- list,group  or shared -->
+  <conditional name="input">
+   <param name="source" type="select" label="Generate Collector Curvers for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group=) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+       <filter type="unique_value" name="unq_lbl" column="0" />
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+     <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+       <filter type="unique_value" name="unq_lbl" column="0" />
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Pairwise comparision groups" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+   <options from_file="mothur_calulators.loc">
+     <column name="mult" index="1"/>
+     <column name="name" index="0"/>
+     <column name="value" index="0"/>
+     <filter type="static_value" name="mult" column="1" value="shared" />
+   </options>
+  </param>
+  <param name="all" type="boolean" truevalue="--all=true" falsevalue="" checked="false" label="all - Include RAM intensive sharedsobs and sharedchao calculations"/>
+  <param name="distance" type="boolean" truevalue="--distance=true" falsevalue="" checked="false" label="distance - Output a distance file for each calculator at each label"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="summary" label="${tool.name} on ${on_string}: shared.summary" />
+ </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 summary.shared_ command produce a summary file that has the calculator value for each line in the OTU data and for all possible comparisons between the different groups in the group file.
+
+.. _summary.shared: http://www.mothur.org/wiki/Summary.shared
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/summary.single.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,74 @@
+<tool id="mothur_summary_single" name="Summary.single" version="1.15.0" force_history_refresh="True">
+ <description>Summary of calculator values for OTUs</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='summary.single'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+\.((\S+?)\.summary)$:tabular'
+  --READ_cmd='read.otu'
+  --READ_list=$otu
+  #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+   --READ_group='$otu_group'
+  #end if
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+    --calc='$calc'
+  #end if
+  #if int($abund.__str__) > 0:
+   --abund=$abund
+  #end if
+  #if int($size.__str__) > 0:
+   --size=$size
+  #end if
+  $groupmode
+ </command>
+ <inputs>
+  <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+  <param name="otu_group" type="data" format="groups" optional="true" label="read.otu(group=) - Group file for the OTU List"/>
+  <param name="label" type="select" label="label - OTU Labels" multiple="true">
+   <options from_dataset="otu">
+    <column name="name" index="0"/>
+    <column name="value" index="0"/>
+   </options>
+  </param>
+  <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+   <options from_file="mothur_calulators.loc">
+     <column name="mult" index="1"/>
+     <column name="name" index="0"/>
+     <column name="value" index="0"/>
+     <filter type="static_value" name="mult" column="1" value="single" />
+   </options>
+  </param>
+  <param name="abund" type="integer" value="10" label="abund - ACE Estimator threshold for abundant versus rare OTUs"/>
+  <param name="size" type="integer" value="0" label="size - "/>
+  <param name="groupmode" type="boolean" truevalue="--groupmode=true" falsevalue="--groupmode=false" checked="true" label="groupmode - Collate shared summary results in one file"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 summary.single_ command produce a summary file that has the calculator value for each line in the OTU data and for all possible comparisons between the different groups in the group file.
+
+.. _summary.single: http://www.mothur.org/wiki/Summary.single
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/tree.shared.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,107 @@
+<tool id="mothur_tree_shared" name="Tree.shared" version="1.15.0" force_history_refresh="True">
+ <description>Generate a newick tree for dissimilarity among groups</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='tree.shared'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?([a-z]+\.(unique|[0-9.]*)\.tre)$:tre'
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --READ_label='$input.label'
+   #end if
+  #end if
+  #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+   --groups=$input.groups
+  #end if
+  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+   --calc=$calc
+  #end if
+ </command>
+ <inputs>
+  <!-- list,group  or shared -->
+  <conditional name="input">
+   <param name="source" type="select" label="Generate Heatmap for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group=) - Group file for the OTU List"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+     <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
+   <options from_file="mothur_calulators.loc">
+     <column name="mult2" index="2"/>
+     <column name="name" index="0"/>
+     <column name="value" index="0"/>
+     <filter type="static_value" name="mult2" column="2" value="shar" />
+   </options>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 tree.shared_ command will generate a newick-formatted tree file that describes the dissimilarity (1-similarity) among multiple groups.
+
+.. _tree.shared: http://www.mothur.org/wiki/Tree.shared
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/trim.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,113 @@
+<tool id="mothur_trim_seqs" name="Trim.seqs" version="1.15.0">
+ <description>Trim sequences - primers, barcodes, quality</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='trim.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.trim\.fasta$:'$trim_fasta,'^\S+\.trim\.qual$:'$trim_qual,'^\S+\.scrap\.fasta$:'$scrap_fasta,'^\S+\.scrap\.qual$:'$scrap_qual,'^\S+\.groups$:'$groups_file
+  --outputdir='$logfile.extra_files_path'
+  #if $minlength > 0:
+   --minlength=$minlength 
+  #end if
+  #if $maxlength > 0:
+   --maxlength=$maxlength 
+  #end if
+  #if $maxambig >= 0:
+   --maxambig=$maxambig 
+  #end if
+  #if $maxhomop > 0:
+   --maxhomop=$maxhomop 
+  #end if
+  #if $oligo.add == "yes":
+   --oligos=$oligo.oligos
+   #if $oligo.bdiffs > 0:
+    --bdiffs=$oligo.bdiffs
+   #end if
+   #if $oligo.pdiffs > 0:
+    --pdiffs=$oligo.pdiffs
+   #end if
+   #if $oligo.tdiffs > 0:
+    --tdiffs=$oligo.tdiffs
+   #end if
+  #end if
+  #if $qual.add == "yes":
+   --qfile=$qual.qfile
+   #if $qual.qaverage > 0:
+    --qaverage=$qual.qaverage
+   #end if
+   #if $qual.qthreshold > 0:
+    --qthreshold=$qual.qthreshold
+   #end if
+   $qual.qtrim
+  #end if
+  $flip 
+  --fasta=$fasta
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequences"/>
+  <param name="minlength" type="integer" value="0" label="minlength - Minimum Sequence Length (default 0, ignored if &#060; 1 )"/>
+  <param name="maxlength" type="integer" value="0" label="maxlength - Maximum Sequence Length (default 0, ignored if &#060; 1)"/>
+  <param name="maxambig" type="integer" value="-1" label="maxambig - Maximum ambiguous bases (default -1, ignored if &#060; 0)"/>
+  <param name="maxhomop" type="integer" value="0" label="maxhomop - Maximum homopolymers (default 0, ignored if &#060; 1)"/>
+  <conditional name="oligo">
+   <param name="add" type="select" label="add - Trim with an oligos file" help="">
+    <option value="no">no</option>
+    <option value="yes">yes</option>
+   </param>
+   <when value="no"/>
+   <when value="yes">
+    <param name="oligos" type="data" format="oligos" label="oligos - Oligos - barcodes and primers"/>
+    <param name="bdiffs" type="integer" value="0" label="bdiffs - Number of differences to allow in the barcode (default 0)"/>
+    <param name="pdiffs" type="integer" value="0" label="pdiffs - Number of differences to allow in the primer (default 0)"/>
+    <param name="tdiffs" type="integer" value="0" label="tdiffs - Total number of differences to allow in primer and barcode (ignored if &#060; 1)"/>
+   </when>
+  </conditional>
+  <conditional name="qual">
+   <param name="add" type="select" label="add - Trim based on a quality file" help="">
+    <option value="no">no</option>
+    <option value="yes">yes</option>
+   </param>
+   <when value="no"/>
+   <when value="yes">
+    <param name="qfile" type="data" format="qual454" label="qfile - 454 Quality File"/>
+    <param name="qaverage" type="integer" value="0" label="qaverage - Remove sequences that have an average base quality below this value (ignored if &#060; 1)"/>
+    <param name="qthreshold" type="integer" value="0" label="qthreshold - Remove sequences that have any base quality below this value (ignored if &#060; 1)"/>
+    <param name="qtrim" type="boolean" truevalue="--qtrim=true" falsevalue="" checked="false" label="qtrim - Trim sequences below qthreshold and put in trim output, else put in scrap "/>
+   </when>
+  </conditional>
+  <param name="flip" type="boolean" truevalue="--flip=true" falsevalue="" checked="false" label="flip - Reverse Complement the trimmed sequences"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="trim_fasta" label="${tool.name} on ${on_string}: trim.fasta"/>
+  <data format="qual" name="trim_qual" label="${tool.name} on ${on_string}: trim.qual">
+   <filter>qfile != None and len(qfile) > 0</filter>
+  </data>
+  <data format="fasta" name="scrap_fasta" label="${tool.name} on ${on_string}: scrap.fasta"/>
+  <data format="qual454" name="scrap_qual" label="${tool.name} on ${on_string}: scrap.qual">
+   <filter>qfile != None and len(qfile) > 0</filter>
+  </data>
+  <data format="groups" name="groups_file" label="${tool.name} on ${on_string}: groups"/>
+ </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 trim.seqs_ command provides the preprocessing features needed to screen and sort pyrosequences.  The command will enable you to trim off primer sequences and barcodes, use the barcode information to generate a group file and split a fasta file into sub-files, screen sequences based on the qual file that comes from 454 sequencers, cull sequences based on sequence length and the presence of ambiguous bases and get the reverse complement of your sequences. While this analysis is clearly geared towards pyrosequencing collections, it can also be used with traditional Sanger sequences. 
+
+.. _trim.seqs: http://www.mothur.org/wiki/Trim.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/unifrac.unweighted.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,89 @@
+<tool id="mothur_unifrac_unweighted" name="unifrac.unweighted" version="1.15.0">
+ <description>Describes whether two or more communities have the same structure</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='unifrac.unweighted'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.uwsummary$:'$summary,'^\S+\.unweighted\.(column\.|philip\.)?dist$:'$dist
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.tree'
+  --READ_tree=$tree
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --READ_group='$group'
+  #end if
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups='$groups'
+  #end if
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --READ_name='$name'
+  #end if
+  #if int($iters.__str__) > 0:
+   --iters=$iters
+  #end if
+  $random
+  #if $distance.__str__ != "false":
+   --distance=$distance
+  #end if
+ </command>
+ <inputs>
+  <!-- list,group  or shared -->
+  <param name="tree" type="data" format="tre" label="read.tree(tree=) - Tree"/>
+  <param name="group" type="data" format="groups" label="read.tree(group=) - Group file for the tree"/>
+  <param name="groups" type="select" label="groups - Groups to display" multiple="true">
+   <options from_dataset="group">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="name" type="data" format="names" optional="true" label="name - Names file for the tree"/>
+  <param name="iters" type="integer" value="1000" label="iters - Number of iterations to try (default 1000)"/>
+  <param name="random" type="boolean" truevalue="--random=true" falsevalue="" checked="false" label="random - Compare your trees with randomly generated trees" />
+  <param name="distance" type="select" label="distance - Select a distance matrix for your history">
+   <option value="false">None</option>
+   <option value="lt">Philip Lower Triangle Matrix</option>
+   <option value="square">Philip Square Matrix</option>
+   <option value="column">Pairwise Distance Matrix</option>
+  </param>
+  <!-- random uses input prompts, not sure how to model that
+  <param name="random" type="text" value="" label="random - The root name for random tests"/>
+  -->
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="summary" label="${tool.name} on ${on_string}: summary">
+  </data>
+  <data format="lower.dist" name="dist" label="${tool.name} on ${on_string}: dist">
+   <filter>distance != 'false'</filter>
+   <change_format>
+    <when input="distance" value="square" format="square.dist" />
+    <when input="distance" value="column" format="pair.dist" />
+   </change_format>
+  </data>
+  <!-- random uses input prompts, not sure how to model that
+  <data format="tabular" name="random" label="${tool.name} on ${on_string}: random">
+  </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 unifrac.unweighted_ command the unweighted UniFrac algorithm. The unifrac.weighted command implements the weighted version of the command. Both of these methods are available through the UniFrac website. The UniFrac methods are generic tests that describes whether two or more communities have the same structure. The significance of the test statistic can only indicate the probability that the communities have the same structure by chance. The value does not indicate a level of similarity.
+
+.. _unifrac.unweighted: http://www.mothur.org/wiki/Unifrac.unweighted
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/unifrac.weighted.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,90 @@
+<tool id="mothur_unifrac_weighted" name="unifrac.weighted" version="1.15.0">
+ <description>Describes whether two or more communities have the same structure</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='unifrac.weighted'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.wsummary$:'$summary,'^\S+\.weighted\.(column\.|philip\.)?dist$:'$dist
+  --outputdir='$logfile.extra_files_path'
+  --READ_cmd='read.tree'
+  --READ_tree=$tree
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --READ_group='$group'
+  #end if
+  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
+   --groups='$groups'
+  #end if
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --READ_name='$name'
+  #end if
+  #if int($iters.__str__) > 0:
+   --iters=$iters
+  #end if
+  $random
+  #if $distance.__str__ != "false":
+   --distance=$distance
+  #end if
+ </command>
+ <inputs>
+  <!-- list,group  or shared -->
+  <param name="tree" type="data" format="tre" label="read.tree(tree=) - Tree"/>
+  <param name="group" type="data" format="groups" label="read.tree(group=) - Group file for the tree"/>
+  <param name="groups" type="select" label="groups - Groups to display" multiple="true">
+   <options from_dataset="group">
+    <column name="name" index="1"/>
+    <column name="value" index="1"/>
+    <filter type="unique_value" name="unq_grp" column="1" />
+   </options>
+  </param>
+  <param name="name" type="data" format="names" optional="true" label="name - Names file for the tree"/>
+  <param name="iters" type="integer" value="1000" label="iters - Number of iterations to try (default 1000)"/>
+  <param name="random" type="boolean" truevalue="--random=true" falsevalue="" checked="false" label="random - Compare your trees with randomly generated trees" />
+  <param name="distance" type="boolean" truevalue="--distance=true" falsevalue="" checked="false" label="distance - Add the distance matrix to your history" />
+  <param name="distance" type="select" label="distance - Select a distance matrix for your history">
+   <option value="false">None</option>
+   <option value="lt">Philip Lower Triangle Matrix</option>
+   <option value="square">Philip Square Matrix</option>
+   <option value="column">Pairwise Distance Matrix</option>
+  </param>
+  <!-- random uses input prompts, not sure how to model that
+  <param name="random" type="text" value="" label="random - The root name for random tests"/>
+  -->
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="summary" label="${tool.name} on ${on_string}: summary">
+  </data>
+  <data format="lower.dist" name="dist" label="${tool.name} on ${on_string}: dist">
+   <filter>distance != 'false'</filter>
+   <change_format>
+    <when input="distance" value="square" format="square.dist" />
+    <when input="distance" value="column" format="pair.dist" />
+   </change_format>
+  </data>
+  <!-- random uses input prompts, not sure how to model that
+  <data format="tabular" name="random" label="${tool.name} on ${on_string}: random">
+  </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 unifrac.weighted_ command implements the weighted UniFrac algorithm. The unifrac.unweighted command implements the unweighted version of the command. Both of these methods are available through the UniFrac website. The UniFrac methods are generic tests that describes whether two or more communities have the same structure. The significance of the test statistic can only indicate the probability that the communities have the same structure by chance. The value does not indicate a level of similarity.
+
+.. _unifrac.weighted: http://www.mothur.org/wiki/Unifrac.weighted
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/unique.seqs.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,42 @@
+<tool id="mothur_unique_seqs" name="Unique.seqs" version="1.15.0">
+ <description>Return unique sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='unique.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.unique\.\w+$:'$out_fasta,'^\S+\.names$:'$out_names
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --name=$names
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequences to filter"/>
+  <param name="names" type="data" format="names" optional="true" label="names - Sequences Names"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="fasta" name="out_fasta" label="${tool.name} on ${on_string}: fasta" />
+  <data format="names" name="out_names" label="${tool.name} on ${on_string}: names" />
+ </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 unique.seqs_ command returns only the unique sequences found in a fasta-formatted sequence file and a file that indicates those sequences that are identical to the reference sequence. 
+
+.. _unique.seqs: http://www.mothur.org/wiki/Unique.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/venn.xml	Tue Jun 07 17:32:23 2011 -0400
@@ -0,0 +1,115 @@
+<tool id="mothur_venn" name="Venn" version="1.15.0"  force_history_refresh="True">
+ <description>Generate Venn diagrams gor groups </description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='venn'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.(\S+\.svg)$:svg'
+  --READ_cmd='read.otu'
+  #if $input.source == 'similarity':
+   --READ_list=$input.otu
+   #if $otu_group.__str__ != "None" and len($otu_group.__str__) > 0:
+    --READ_group='$otu_group'
+   #end if
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --label='$input.label'
+   #end if
+   #if $input.calc.__str__ != "None" and len($input.calc.__str__) > 0:
+     --calc='$input.calc'
+   #end if
+  #elif $input.source == 'shared':
+   --READ_shared=$input.otu
+   #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
+    --label='$input.label'
+   #end if
+   #if $calc.__str__ != "None" and len($calc.__str__) > 0:
+     --calc='$calc'
+   #end if
+   $nseqs
+   $permute
+  #end if
+  #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
+   --groups=$input.groups
+  #end if
+ </command>
+ <inputs>
+  <!-- get.relabund  relabund type should also work -->
+  <conditional name="input">
+   <param name="source" type="select" label="Generate Heatmap for">
+    <option value="similarity">OTU list</option>
+    <option value="shared">OTU Shared</option>
+   </param>
+   <when value="similarity">
+     <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="read.otu(group=) - Group file for the OTU List"/>
+     <param name="calc" type="select" multiple="true" label="calc - Calculators (Uses defaults if none selected)">
+      <option value="sob">Chao</option>
+      <option value="chao">Chao</option>
+      <option value="ace">Ace</option>
+     </param>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu_group">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+   <when value="shared">
+     <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+     <param name="calc" type="select" multiple="true" label="calc - Calculators (Uses defaults if none selected)">
+      <option value="sharedsobs">Shared Chao</option>
+      <option value="sharedchao">Shared Chao</option>
+      <option value="sharedace">Shared Ace</option>
+     </param>
+     <param name="label" type="select" label="label - OTU Labels" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="0"/>
+       <column name="value" index="0"/>
+      </options>
+     </param>
+     <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
+      <options from_dataset="otu">
+       <column name="name" index="1"/>
+       <column name="value" index="1"/>
+       <filter type="unique_value" name="unq_grp" column="1" />
+      </options>
+     </param>
+   </when>
+  </conditional>
+  <param name="nseqs" type="boolean" truevalue="--nseqs=true" falsevalue="" checked="false" label="nseqs - Output the number of sequences represented by the otus in the picture"/>
+  <param name="permute" type="boolean" truevalue="--permute=true" falsevalue="" checked="false" label="permute - Create pictures with all possible 4-way permutations of groups"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+ </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 venn_ command generates Venn diagrams to compare the richness shared among 2, 3, or 4 groups. 
+
+.. _venn: http://www.mothur.org/wiki/Venn
+
+ </help>
+</tool>