changeset 3:6b358d0f17b4 draft

Update to Mothur version 1.24
author Jim Johnson <jj@umn.edu>
date Wed, 05 Sep 2012 19:49:43 -0500
parents e076d95dbdb5
children a9d51d14f9e9
files mothur/README mothur/lib/galaxy/datatypes/converters/ref_to_seq_taxonomy_converter.py mothur/lib/galaxy/datatypes/converters/ref_to_seq_taxonomy_converter.xml mothur/lib/galaxy/datatypes/metagenomics.py mothur/tool-data/datatypes.conf.xml mothur/tool-data/mothur_aligndb.loc.sample mothur/tool-data/mothur_lookup.loc.sample mothur/tool-data/mothur_map.loc.sample mothur/tool-data/mothur_taxonomy.loc.sample 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.perseus.xml mothur/tools/mothur/chimera.pintail.xml mothur/tools/mothur/chimera.slayer.xml mothur/tools/mothur/chimera.uchime.xml mothur/tools/mothur/classify.otu.xml mothur/tools/mothur/classify.seqs.xml mothur/tools/mothur/classify.tree.xml mothur/tools/mothur/cluster.fragments.xml mothur/tools/mothur/cluster.split.xml mothur/tools/mothur/collect.shared.xml mothur/tools/mothur/collect.single.xml mothur/tools/mothur/consensus.seqs.xml mothur/tools/mothur/cooccurrence.xml mothur/tools/mothur/corr.axes.xml mothur/tools/mothur/count.groups.xml mothur/tools/mothur/count.seqs.xml mothur/tools/mothur/create.database.xml mothur/tools/mothur/degap.seqs.xml mothur/tools/mothur/deunique.seqs.xml mothur/tools/mothur/deunique.tree.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.otulist.xml mothur/tools/mothur/get.oturep.xml mothur/tools/mothur/get.otus.xml mothur/tools/mothur/get.rabund.xml mothur/tools/mothur/get.relabund.xml mothur/tools/mothur/get.sabund.xml mothur/tools/mothur/get.seqs.xml mothur/tools/mothur/get.sharedseqs.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/make.biom.xml mothur/tools/mothur/make.design.xml mothur/tools/mothur/make.fastq.xml mothur/tools/mothur/make.shared.xml mothur/tools/mothur/make.shared_from_biom.xml mothur/tools/mothur/merge.groups.xml mothur/tools/mothur/metastats.xml mothur/tools/mothur/mothur_wrapper.py mothur/tools/mothur/normalize.shared.xml mothur/tools/mothur/otu.association.xml mothur/tools/mothur/otu.hierarchy.xml mothur/tools/mothur/pairwise.seqs.xml mothur/tools/mothur/parse.list.xml mothur/tools/mothur/parsimony.xml mothur/tools/mothur/pca.xml mothur/tools/mothur/pcr.seqs.xml mothur/tools/mothur/phylo.diversity.xml mothur/tools/mothur/pre.cluster.xml mothur/tools/mothur/rarefaction.shared.xml mothur/tools/mothur/rarefaction.single.xml mothur/tools/mothur/remove.groups.xml mothur/tools/mothur/remove.lineage.xml mothur/tools/mothur/remove.otus.xml mothur/tools/mothur/remove.rare.xml mothur/tools/mothur/remove.seqs.xml mothur/tools/mothur/screen.seqs.xml mothur/tools/mothur/sens.spec.xml mothur/tools/mothur/seq.error.xml mothur/tools/mothur/sffinfo.xml mothur/tools/mothur/shhh.flows.xml mothur/tools/mothur/shhh.seqs.xml mothur/tools/mothur/sort.seqs.xml mothur/tools/mothur/split.abund.xml mothur/tools/mothur/split.groups.xml mothur/tools/mothur/sub.sample.xml mothur/tools/mothur/summary.qual.xml mothur/tools/mothur/summary.seqs.xml mothur/tools/mothur/summary.shared.xml mothur/tools/mothur/summary.single.xml mothur/tools/mothur/summary.tax.xml mothur/tools/mothur/tree.shared.xml mothur/tools/mothur/trim.flows.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 99 files changed, 3449 insertions(+), 864 deletions(-) [+]
line wrap: on
line diff
--- a/mothur/README	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/README	Wed Sep 05 19:49:43 2012 -0500
@@ -1,7 +1,9 @@
 Provides galaxy tools for the Mothur metagenomics package -  http://www.mothur.org/wiki/Main_Page 
 
-Install mothur v.1.19.0 on your galaxy system so galaxy can execute the mothur command
-  ( This version of wrappers is designed for Mothur version 1.19 - it may work on later versions )
+(The environment variable MOTHUR_MAX_PROCESSORS can be used to limit the number of cpu processors used be mothur commands)
+
+Install mothur v.1.25.0 on your galaxy system so galaxy can execute the mothur command
+  ( This version of wrappers is designed for Mothur version 1.24 - it may work on later versions )
   http://www.mothur.org/wiki/Download_mothur
   http://www.mothur.org/wiki/Installation
   ( This Galaxy Mothur wrapper will invoke Mothur in command line mode: http://www.mothur.org/wiki/Command_line_mode )
@@ -13,6 +15,14 @@
   Install in galaxy:  tool-data/shared/jars/TreeVector.jar
 
 Install reference data from silva and greengenes
+ RDP reference file (modified for mothur):
+  http://www.mothur.org/wiki/RDP_reference_files
+   - 16S rRNA reference (RDP): A collection of 9,662 bacterial and 384 archaeal 16S rRNA gene sequences with an improved taxonomy compared to version 6.
+     http://www.mothur.org/w/images/2/29/Trainset7_112011.rdp.zip
+   - 16S rRNA reference (PDS): The RDP reference with three sequences reversed and 119 mitochondrial 16S rRNA gene sequences added as members of the Rickettsiales
+     http://www.mothur.org/w/images/4/4a/Trainset7_112011.pds.zip
+   - 28S rRNA reference (RDP): A collection of 8506 reference 28S rRNA gene sequences from the Fungi that were curated by the Kuske lab
+     http://www.mothur.org/w/images/3/36/FungiLSU_train_v7.zip
  Silva reference:
   http://www.mothur.org/wiki/Silva_reference_files
   - Bacterial references (14,956 sequences)
@@ -45,6 +55,8 @@
   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
+ Lookup Files for sff flow analysis using shhh.flows:
+  http://www.mothur.org/wiki/Alignment_database
 
  Example from UMN installation: (We also made these available in a Galaxy public data library)
     /project/db/galaxy/mothur/Silva.bacteria.zip
@@ -75,16 +87,28 @@
     /project/db/galaxy/mothur/Silva.eukarya.zip
     /project/db/galaxy/mothur/Gg_ss_map.zip
     /project/db/galaxy/mothur/core_set_aligned.imputed.fasta
+    /project/db/galaxy/mothur/RDP/FungiLSU_train_1400bp_8506_mod.fasta
+    /project/db/galaxy/mothur/RDP/FungiLSU_train_1400bp_8506_mod.tax
+    /project/db/galaxy/mothur/RDP/trainset6_032010.rdp.fasta
+    /project/db/galaxy/mothur/RDP/trainset6_032010.rdp.tax
+    /project/db/galaxy/mothur/RDP/trainset7_112011.pds.fasta
+    /project/db/galaxy/mothur/RDP/trainset7_112011.pds.tax
+    /project/db/galaxy/mothur/RDP/trainset7_112011.rdp.fasta
+    /project/db/galaxy/mothur/RDP/trainset7_112011.rdp.tax
 
 
-Add tool-data:  (contains  pointers to silva and greengenes reference data)
+
+Add tool-data:  (contains  pointers to silva, greengenes, and RDP 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
 
 
+################################################################
+#### If you are manually adding this to your local galaxy:  ####
+################################################################
+
 add config files (*.xml) and wrapper code (*.py) from tools/mothur/*  to your galaxy installation 
 
 
@@ -94,6 +118,7 @@
 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"/>
@@ -117,6 +142,9 @@
         <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="ref.taxonomy" type="galaxy.datatypes.metagenomics:RefTaxonomy" display_in_upload="true">
+            <converter file="ref_to_seq_taxonomy_converter.xml" target_datatype="seq.taxonomy"/>
+        </datatype>
         <datatype extension="seq.taxonomy" type="galaxy.datatypes.metagenomics:SequenceTaxonomy" display_in_upload="true"/>
         <datatype extension="rdp.taxonomy" type="galaxy.datatypes.metagenomics:RDPSequenceTaxonomy" display_in_upload="true"/>
         <datatype extension="cons.taxonomy" type="galaxy.datatypes.metagenomics:ConsensusTaxonomy" display_in_upload="true"/>
@@ -127,6 +155,7 @@
         <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="axes" type="galaxy.datatypes.metagenomics:Axes" display_in_upload="true"/>
+        <datatype extension="sff.flow" type="galaxy.datatypes.metagenomics:SffFlow" display_in_upload="true"/>
         <datatype extension="tre" type="galaxy.datatypes.data:Newick" display_in_upload="true"/>
         <!-- End Mothur Datatypes -->
 
@@ -138,18 +167,27 @@
       <tool file="mothur/get.groups.xml"/>
       <tool file="mothur/remove.groups.xml"/>
       <tool file="mothur/merge.groups.xml"/>
+      <tool file="mothur/count.groups.xml"/>
       <tool file="mothur/make.design.xml"/>
       <tool file="mothur/sub.sample.xml"/>
+      <tool file="mothur/sort.seqs.xml"/>
+      <tool file="mothur/create.database.xml"/>
     <label text="Mothur Sequence Analysis" id="mothur_sequence_analysis"/>
       <tool file="mothur/sffinfo.xml"/>
+      <tool file="mothur/trim.flows.xml"/>
+      <tool file="mothur/shhh.flows.xml"/>
+      <tool file="mothur/shhh.seqs.xml"/>
       <tool file="mothur/make.fastq.xml"/>
       <tool file="mothur/fastq.info.xml"/>
       <tool file="mothur/summary.seqs.xml"/>
+      <tool file="mothur/summary.qual.xml"/>
+      <tool file="mothur/count.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/pcr.seqs.xml"/>
       <tool file="mothur/unique.seqs.xml"/>
       <tool file="mothur/deunique.seqs.xml"/>
       <tool file="mothur/chop.seqs.xml"/>
@@ -168,12 +206,15 @@
       <tool file="mothur/nmds.xml"/>
       <tool file="mothur/corr.axes.xml"/>
       <tool file="mothur/classify.seqs.xml"/>
+      <tool file="mothur/seq.error.xml"/>
     <label text="Mothur Sequence Chimera Detection" id="mothur_sequence_chimera"/>
       <tool file="mothur/chimera.bellerophon.xml"/>
       <tool file="mothur/chimera.ccode.xml"/>
       <tool file="mothur/chimera.check.xml"/>
+      <tool file="mothur/chimera.perseus.xml"/>
       <tool file="mothur/chimera.pintail.xml"/>
       <tool file="mothur/chimera.slayer.xml"/>
+      <tool file="mothur/chimera.uchime.xml"/>
     <label text="Mothur Operational Taxonomy Unit" id="mothur_taxonomy_unit"/>
       <tool file="mothur/pre.cluster.xml"/>
       <tool file="mothur/cluster.fragments.xml"/>
@@ -195,9 +236,12 @@
       <tool file="mothur/get.sabund.xml"/>
       <tool file="mothur/get.relabund.xml"/>
       <tool file="mothur/make.shared.xml"/>
+      <tool file="mothur/make.shared_from_biom.xml"/>
+      <tool file="mothur/make.biom.xml"/>
       <tool file="mothur/get.group.xml"/>
       <tool file="mothur/bin.seqs.xml"/>
       <tool file="mothur/get.sharedseqs.xml"/>
+      <tool file="mothur/summary.tax.xml"/>
     <label text="Mothur Single Sample Analysis" id="mothur_single_sample_analysis"/>
       <tool file="mothur/collect.single.xml"/>
       <tool file="mothur/rarefaction.single.xml"/>
@@ -208,8 +252,8 @@
       <tool file="mothur/rarefaction.shared.xml"/>
       <tool file="mothur/normalize.shared.xml"/>
       <tool file="mothur/summary.shared.xml"/>
+      <tool file="mothur/otu.association.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"/>
@@ -222,6 +266,7 @@
       <tool file="mothur/homova.xml"/>
       <tool file="mothur/mantel.xml"/>
       <tool file="mothur/anosim.xml"/>
+      <tool file="mothur/cooccurrence.xml"/>
     <label text="Mothur Phylotype Analysis" id="mothur_phylotype_analysis"/>
       <tool file="mothur/get.lineage.xml"/>
       <tool file="mothur/remove.lineage.xml"/>
@@ -229,16 +274,17 @@
       <tool file="mothur/phylo.diversity.xml"/>
       <tool file="mothur/clearcut.xml"/>
       <tool file="mothur/indicator.xml"/>
+      <tool file="mothur/deunique.tree.xml"/>
+      <tool file="mothur/classify.tree.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
 
+  (The environment variable MOTHUR_MAX_PROCESSORS can be used to limit the number of cpu processors used be mothur commands)
+
 * 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 
@@ -264,10 +310,7 @@
  # 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'
 
+ ## 
+ ## NOTE:   The "read" commands were eliminated with Mothur version 1.18
+ ##
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/lib/galaxy/datatypes/converters/ref_to_seq_taxonomy_converter.py	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+"""
+convert a ref.taxonommy file to a seq.taxonomy file
+Usage:
+%python ref_to_seq_taxonomy_converter.py <ref.taxonommy_filename> <seq.taxonomy_filename> 
+"""
+
+import sys, os, re
+from math import *
+
+assert sys.version_info[:2] >= ( 2, 4 )
+
+def stop_err( msg ):
+    sys.stderr.write( "%s" % msg )
+    sys.exit()
+
+def __main__():
+    infile_name = sys.argv[1]
+    outfile = open( sys.argv[2], 'w' )
+    pat = '^([^ \t\n\r\x0c\x0b;]+([(]\\d+[)])?(;[^ \t\n\r\x0c\x0b;]+([(]\\d+[)]))*(;)?)$'
+    for i, line in enumerate( file( infile_name ) ):
+        line = line.rstrip() # eliminate trailing space and new line characters
+        if not line or line.startswith( '#' ):
+            continue
+        fields = line.split('\t')
+        # make sure the 2nd field (taxonomy) ends with a ;
+        outfile.write('%s\t%s;\n' % (fields[0], re.sub(';$','',fields[1])))
+
+    outfile.close()
+
+if __name__ == "__main__": __main__() 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/lib/galaxy/datatypes/converters/ref_to_seq_taxonomy_converter.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,12 @@
+<tool id="CONVERTER_ref_to_seq_taxomony" name="Convert Ref taxonomy to Seq Taxonomy" version="1.0.0">
+  <description>converts 2 or 3 column sequence taxonomy file to a 2 column mothur taxonomy_outline format</description>
+  <command interpreter="python">ref_to_seq_taxonomy_converter.py $input $output</command>
+  <inputs>
+    <param name="input" type="data" format="ref.taxonomy" label="a Sequence Taxomony file"/>
+  </inputs>
+  <outputs>
+    <data name="output" format="seq.taxonomy"/>
+  </outputs>
+  <help>
+  </help>
+</tool>
--- a/mothur/lib/galaxy/datatypes/metagenomics.py	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/lib/galaxy/datatypes/metagenomics.py	Wed Sep 05 19:49:43 2012 -0500
@@ -4,26 +4,59 @@
 for Mothur
 """
 
-import data
-import logging, os, sys, time, tempfile, shutil, string, glob, re
+import logging, os, os.path, sys, time, tempfile, shutil, string, glob, re
 import galaxy.model
+from galaxy.datatypes import data
+from galaxy.datatypes.sniff import *
 from galaxy.datatypes import metadata
 from galaxy.datatypes import tabular
 from galaxy.datatypes import sequence
 from galaxy.datatypes.metadata import MetadataElement
+from galaxy.datatypes.data import Text
 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 *
+import pkg_resources
+pkg_resources.require("simplejson")
+import simplejson
+
 
 log = logging.getLogger(__name__)
 
 
 ## Mothur Classes 
 
-class Otu( data.Text ):
+class Otu( Text ):
     file_ext = 'otu'
+    MetadataElement( name="columns", default=0, desc="Number of columns", readonly=True, visible=True, no_value=0 )
+    MetadataElement( name="labels", default=[], desc="Label Names", readonly=True, visible=True, no_value=[] )
+    def __init__(self, **kwd):
+        Text.__init__( self, **kwd )
+    def set_meta( self, dataset, overwrite = True, **kwd ):
+        if dataset.has_data():
+            label_names = set()
+            ncols = 0
+            data_lines = 0
+            comment_lines = 0
+            try:
+                fh = open( dataset.file_name )
+                for line in fh:
+                    fields = line.strip().split('\t')
+                    if len(fields) >= 2: 
+                        data_lines += 1
+                        ncols = max(ncols,len(fields))
+                        label_names.add(fields[0])
+                    else:
+                        comment_lines += 1
+                # Set the discovered metadata values for the dataset
+                dataset.metadata.data_lines = data_lines
+                dataset.metadata.columns = ncols
+                dataset.metadata.labels = []
+                dataset.metadata.labels += label_names
+                dataset.metadata.labels.sort()
+            finally:
+                fh.close()
 
     def sniff( self, filename ):
         """
@@ -62,14 +95,30 @@
 
 class OtuList( Otu ):
     file_ext = 'list'
+    def __init__(self, **kwd):
+        Otu.__init__( self, **kwd )
+    def init_meta( self, dataset, copy_from=None ):
+        Otu.init_meta( self, dataset, copy_from=copy_from )
+    def set_meta( self, dataset, overwrite = True, **kwd ):
+        Otu.set_meta(self,dataset, overwrite = True, **kwd )
+        """
+        # too many columns to be stored in metadata
+        if dataset != None and dataset.metadata.columns > 2:
+            for i in range(2,dataset.metadata.columns):
+               dataset.metadata.column_types[i] = 'str'
+        """
 
 class Sabund( Otu ):
     file_ext = 'sabund'
-
+    def __init__(self, **kwd):
+        Otu.__init__( self, **kwd )
+    def init_meta( self, dataset, copy_from=None ):
+        Otu.init_meta( self, dataset, copy_from=copy_from )
     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 )
@@ -106,15 +155,70 @@
 
 class Rabund( Sabund ):
     file_ext = 'rabund'
-
+    def __init__(self, **kwd):
+        Sabund.__init__( self, **kwd )
+    def init_meta( self, dataset, copy_from=None ):
+        Sabund.init_meta( self, dataset, copy_from=copy_from )
 
-class SharedRabund( Rabund ):
-    file_ext = 'shared'
+class GroupAbund( Otu ):
+    file_ext = 'grpabund'
+    MetadataElement( name="groups", default=[], desc="Group Names", readonly=True, visible=True, no_value=[] )
+    def __init__(self, **kwd):
+        Otu.__init__( self, **kwd )
+        # self.column_names[0] = ['label']
+        # self.column_names[1] = ['group']
+        # self.column_names[2] = ['count']
+    """
+    def init_meta( self, dataset, copy_from=None ):
+        Otu.init_meta( self, dataset, copy_from=copy_from )
+    """
+    def init_meta( self, dataset, copy_from=None ):
+        Otu.init_meta( self, dataset, copy_from=copy_from )
+    def set_meta( self, dataset, overwrite = True, skip=1, max_data_lines = 100000, **kwd ):
+        # See if file starts with header line
+        if dataset.has_data():
+            label_names = set()
+            group_names = set()
+            data_lines = 0
+            comment_lines = 0
+            ncols = 0
+            try:
+                fh = open( dataset.file_name )
+                line = fh.readline()
+                fields = line.strip().split('\t')
+                ncols = max(ncols,len(fields))
+                if fields[0] == 'label' and fields[1] == 'Group':
+                    skip=1
+                    comment_lines += 1
+                else:
+                    skip=0
+                    data_lines += 1
+                    label_names.add(fields[0])
+                    group_names.add(fields[1])
+                for line in fh:
+                    data_lines += 1
+                    fields = line.strip().split('\t')
+                    ncols = max(ncols,len(fields))
+                    label_names.add(fields[0])
+                    group_names.add(fields[1])
+                # Set the discovered metadata values for the dataset
+                dataset.metadata.data_lines = data_lines
+                dataset.metadata.columns = ncols
+                dataset.metadata.labels = []
+                dataset.metadata.labels += label_names
+                dataset.metadata.labels.sort()
+                dataset.metadata.groups = []
+                dataset.metadata.groups += group_names
+                dataset.metadata.groups.sort()
+                dataset.metadata.skip = skip
+            finally:
+                fh.close()
 
-    def sniff( self, filename ):
+    def sniff( self, filename, vals_are_int=False):
         """
         Determines whether the file is a otu (operational taxonomic unit) Shared format
         label<TAB>group<TAB>count[<TAB>value(1..n)]
+        The first line is column headings as of Mothur v 1.20
         """
         try:
             fh = open( filename )
@@ -129,14 +233,18 @@
                         linePieces = line.split('\t')
                         if len(linePieces) < 3:
                             return False
-                        try:
-                            check = int(linePieces[2])
-                            if check + 3 != len(linePieces):
+                        if count > 0 or linePieces[0] != 'label':
+                            try:
+                                check = int(linePieces[2])
+                                if check + 3 != len(linePieces):
+                                    return False
+                                for i in range( 3, len(linePieces)):
+                                    if vals_are_int:
+                                        ival = int(linePieces[i])
+                                    else:
+                                        fval = float(linePieces[i])
+                            except ValueError:
                                 return False
-                            for i in range( 3, len(linePieces)):
-                                ival = int(linePieces[i])
-                        except ValueError:
-                            return False
                         count += 1
                         if count >= 5:
                             return True
@@ -149,46 +257,38 @@
             fh.close()
         return False
 
-class RelAbund( Rabund ):
+class SharedRabund( GroupAbund ):
+    file_ext = 'shared'
+    def __init__(self, **kwd):
+        GroupAbund.__init__( self, **kwd )
+    def init_meta( self, dataset, copy_from=None ):
+        GroupAbund.init_meta( self, dataset, copy_from=copy_from )
+    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)]
+        The first line is column headings as of Mothur v 1.20
+        """
+        # return GroupAbund.sniff(self,filename,True)
+        isme = GroupAbund.sniff(self,filename,True)
+        return isme
+        
+
+class RelAbund( GroupAbund ):
     file_ext = 'relabund'
-
+    def __init__(self, **kwd):
+        GroupAbund.__init__( self, **kwd )
+    def init_meta( self, dataset, copy_from=None ):
+        GroupAbund.init_meta( self, dataset, copy_from=copy_from )
     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)]
+        The first line is column headings as of Mothur v 1.20
         """
-        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
+        # return GroupAbund.sniff(self,filename,False)
+        isme = GroupAbund.sniff(self,filename,False)
+        return isme
 
 class SecondaryStructureMap(Tabular):
     file_ext = 'map'
@@ -331,11 +431,24 @@
         Tabular.__init__( self, **kwd )
         self.column_names = ['name','pound','dash','plus','equal','loop','tilde','total']
 
-class DistanceMatrix(data.Text):
+class DistanceMatrix( Text ):
     file_ext = 'dist'
     """Add metadata elements"""
-    MetadataElement( name="sequence_count", default=0, desc="Number of sequences", readonly=False, optional=True, no_value=0 )
+    MetadataElement( name="sequence_count", default=0, desc="Number of sequences", readonly=True, visible=True, optional=True, no_value='?' )
+
+    def init_meta( self, dataset, copy_from=None ):
+        Text.init_meta( self, dataset, copy_from=copy_from )
 
+    def set_meta( self, dataset, overwrite = True, skip = 0, **kwd ):
+        Text.set_meta(self, dataset,overwrite = overwrite, skip = skip, **kwd )
+        try:
+            fh = open( dataset.file_name )
+            line = fh.readline().strip().strip()
+            dataset.metadata.sequence_count = int(line) 
+        except Exception, e:
+            log.warn("DistanceMatrix set_meta %s" % e)
+        finally:
+            fh.close()
 
 class LowerTriangleDistanceMatrix(DistanceMatrix):
     file_ext = 'lower.dist'
@@ -343,6 +456,9 @@
         """Initialize secondary structure map datatype"""
         DistanceMatrix.__init__( self, **kwd )
 
+    def init_meta( self, dataset, copy_from=None ):
+        DistanceMatrix.init_meta( self, dataset, copy_from=copy_from )
+
     def sniff( self, filename ):
         """
         Determines whether the file is a lower-triangle distance matrix (phylip) format
@@ -384,17 +500,13 @@
             fh.close()
         return False
 
-class SquareDistanceMatrix(DistanceMatrix,Tabular):
+class SquareDistanceMatrix(DistanceMatrix):
     file_ext = 'square.dist'
-    sequence_count = -1
 
     def __init__(self, **kwd):
-        """Initialize secondary structure map datatype"""
-        Tabular.__init__( self, **kwd )
+        DistanceMatrix.__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 
+        DistanceMatrix.init_meta( self, dataset, copy_from=copy_from )
 
     def sniff( self, filename ):
         """
@@ -448,7 +560,8 @@
         Tabular.__init__( self, **kwd )
         self.column_names = ['Sequence','Sequence','Distance']
         self.column_types = ['str','str','float']
-        self.comment_lines = 1
+    def set_meta( self, dataset, overwrite = True, skip = None, **kwd ):
+        Tabular.set_meta(self, dataset,overwrite = overwrite, skip = skip, **kwd )
 
     def sniff( self, filename ):
         """
@@ -510,19 +623,30 @@
 
 class Group(Tabular):
     file_ext = 'groups'
+    MetadataElement( name="groups", default=[], desc="Group Names", readonly=True, visible=True, no_value=[] )
     def __init__(self, **kwd):
-        """Name file shows the relationship between a representative sequence(col 1)  and the sequences it represents(col 2)"""
+        """Group file assigns sequence (col 1)  to a group (col 2)"""
         Tabular.__init__( self, **kwd )
         self.column_names = ['name','group']
         self.columns = 2
+    def set_meta( self, dataset, overwrite = True, skip = None, max_data_lines = None, **kwd ):
+        Tabular.set_meta(self, dataset, overwrite, skip, max_data_lines)
+        group_names = set() 
+        try:
+            fh = open( dataset.file_name )
+            for line in fh:
+                fields = line.strip().split('\t')
+                group_names.add(fields[1])
+            dataset.metadata.groups = []
+            dataset.metadata.groups += group_names
+        finally:
+            fh.close()
 
-class Design(Tabular):
+class Design(Group):
     file_ext = 'design'
     def __init__(self, **kwd):
-        """Name file shows the relationship between a group(col 1) and a grouping (col 2), providing a way to merge groups."""
-        Tabular.__init__( self, **kwd )
-        self.column_names = ['group','grouping']
-        self.columns = 2
+        """Design file shows the relationship between a group(col 1) and a grouping (col 2), providing a way to merge groups."""
+        Group.__init__( self, **kwd )
 
 class AccNos(Tabular):
     file_ext = 'accnos'
@@ -532,7 +656,7 @@
         self.column_names = ['name']
         self.columns = 1
 
-class Oligos( data.Text ):
+class Oligos( Text ):
     file_ext = 'oligos'
 
     def sniff( self, filename ):
@@ -622,8 +746,6 @@
         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
@@ -688,7 +810,7 @@
         self.masked = True
         self.filtered = True
 
-class LaneMask(data.Text):
+class LaneMask(Text):
     file_ext = 'filter'
 
     def sniff( self, filename ):
@@ -711,7 +833,57 @@
             close(fh)
         return False
 
-class SequenceTaxonomy(Tabular):
+class RefTaxonomy(Tabular):
+    file_ext = 'ref.taxonomy'
+    """
+        A table with 2 or 3 columns:
+        - SequenceName
+        - Taxonomy (semicolon-separated taxonomy in descending order)
+        - integer ?
+        Example: 2-column ( http://www.mothur.org/wiki/Taxonomy_outline )
+          X56533.1        Eukaryota;Alveolata;Ciliophora;Intramacronucleata;Oligohymenophorea;Hymenostomatida;Tetrahymenina;Glaucomidae;Glaucoma;
+          X97975.1        Eukaryota;Parabasalidea;Trichomonada;Trichomonadida;unclassified_Trichomonadida;
+          AF052717.1      Eukaryota;Parabasalidea;
+        Example: 3-column ( http://vamps.mbl.edu/resources/databases.php )
+          v3_AA008	Bacteria;Firmicutes;Bacilli;Lactobacillales;Streptococcaceae;Streptococcus	5
+          v3_AA016	Bacteria	120
+          v3_AA019	Archaea;Crenarchaeota;Marine_Group_I	1
+    """
+    def __init__(self, **kwd):
+        Tabular.__init__( self, **kwd )
+        self.column_names = ['name','taxonomy']
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is a SequenceTaxonomy
+        """
+        try:
+            pat = '^([^ \t\n\r\x0c\x0b;]+([(]\\d+[)])?(;[^ \t\n\r\x0c\x0b;]+([(]\\d+[)])?)*(;)?)$'
+            fh = open( filename )
+            count = 0
+            while True:
+                line = fh.readline()
+                if not line:
+                    break #EOF
+                line = line.strip()
+                if line:
+                    fields = line.split('\t')
+                    if 2 <= len(fields) <= 3:
+                        return False
+                    if not re.match(pat,fields[1]):
+                        return False
+                    count += 1
+                    if count > 10:
+                        break
+            if count > 0:
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+class SequenceTaxonomy(RefTaxonomy):
     file_ext = 'seq.taxonomy'
     """
         A table with 2 columns:
@@ -811,7 +983,7 @@
         Tabular.__init__( self, **kwd )
         self.column_names = ['taxlevel','rankID','taxon','daughterlevels','total']
 
-class Phylip(data.Text):
+class Phylip(Text):
     file_ext = 'phy'
 
     def sniff( self, filename ):
@@ -922,6 +1094,225 @@
             fh.close()
         return False
 
+class SffFlow(Tabular):
+    MetadataElement( name="flow_values", default="", no_value="", optional=True , desc="Total number of flow values", readonly=True)
+    MetadataElement( name="flow_order", default="TACG", no_value="TACG", desc="Total number of flow values", readonly=False)
+    file_ext = 'sff.flow'
+    """
+        The first line is the total number of flow values - 800 for Titanium data. For GS FLX it would be 400. 
+        Following lines contain:
+        - SequenceName
+        - the number of useable flows as defined by 454's software
+        - the flow intensity for each base going in the order of TACG.
+        Example:
+          800
+          GQY1XT001CQL4K 85 1.04 0.00 1.00 0.02 0.03 1.02 0.05 ...
+          GQY1XT001CQIRF 84 1.02 0.06 0.98 0.06 0.09 1.05 0.07 ... 
+          GQY1XT001CF5YW 88 1.02 0.02 1.01 0.04 0.06 1.02 0.03 ...
+    """
+    def __init__(self, **kwd):
+        Tabular.__init__( self, **kwd )
+
+    def set_meta( self, dataset, overwrite = True, skip = 1, max_data_lines = None, **kwd ):
+        Tabular.set_meta(self, dataset, overwrite, 1, max_data_lines)
+        try:
+            fh = open( dataset.file_name )
+            line = fh.readline()
+            line = line.strip()
+            flow_values = int(line)
+            dataset.metadata.flow_values = flow_values
+        finally:
+            fh.close()
+
+    def make_html_table( self, dataset, skipchars=[] ):
+        """Create HTML table, used for displaying peek"""
+        out = ['<table cellspacing="0" cellpadding="3">']
+        comments = []
+        try:
+            # Generate column header
+            out.append('<tr>')
+            out.append( '<th>%d. Name</th>' % 1 )
+            out.append( '<th>%d. Flows</th>' % 2 )
+            for i in range( 3, dataset.metadata.columns+1 ):
+                base = dataset.metadata.flow_order[(i+1)%4]
+                out.append( '<th>%d. %d %s</th>' % (i-2,base) )
+            out.append('</tr>')
+            out.append( self.make_html_peek_rows( dataset, skipchars=skipchars ) )
+            out.append( '</table>' )
+            out = "".join( out )
+        except Exception, exc:
+            out = "Can't create peek %s" % str( exc )
+        return out
+
+class Newick( Text ):
+    """
+    The Newick Standard for representing trees in computer-readable form makes use of the correspondence between trees and nested parentheses.
+    http://evolution.genetics.washington.edu/phylip/newicktree.html
+    http://en.wikipedia.org/wiki/Newick_format
+    Example:
+    (B,(A,C,E),D);
+    or example with branch lengths:
+    (B:6.0,(A:5.0,C:3.0,E:4.0):5.0,D:11.0);
+    or an example with embedded comments but no branch lengths:
+    ((a [&&PRIME S=x], b [&&PRIME S=y]), c [&&PRIME S=z]); 
+    Example with named interior noe:
+    (B:6.0,(A:5.0,C:3.0,E:4.0)Ancestor1:5.0,D:11.0);
+    """
+    file_ext = 'tre'
+
+    def __init__(self, **kwd):
+        Text.__init__( self, **kwd )
+
+    def sniff( self, filename ):   ## TODO
+        """
+        Determine whether the file is in Newick format
+        Note: Last non-space char of a tree should be a semicolon: ';'
+        Usually the first char will be a open parenthesis: '('
+        (,,(,));                               no nodes are named
+        (A,B,(C,D));                           leaf nodes are named
+        (A,B,(C,D)E)F;                         all nodes are named
+        (:0.1,:0.2,(:0.3,:0.4):0.5);           all but root node have a distance to parent
+        (:0.1,:0.2,(:0.3,:0.4):0.5):0.0;       all have a distance to parent
+        (A:0.1,B:0.2,(C:0.3,D:0.4):0.5);       distances and leaf names (popular)
+        (A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F;     distances and all names
+        ((B:0.2,(C:0.3,D:0.4)E:0.5)F:0.1)A;    a tree rooted on a leaf node (rare)
+        """
+        if not os.path.exists(filename):
+            return False
+        try:
+            ## For now, guess this is a Newick file if it starts with a '(' and ends with a ';'
+            flen = os.path.getsize(filename)
+            fh = open( filename )
+            len = min(flen,2000)
+            # check end of the file for a semicolon
+            fh.seek(-len,os.SEEK_END)
+            buf = fh.read(len).strip()
+            buf = buf.strip()
+            if not buf.endswith(';'):
+                return False
+            # See if this starts with a open parenthesis
+            if len < flen:
+                fh.seek(0)
+                buf = fh.read(len).strip()
+            if buf.startswith('('):
+                return True
+        except:
+            pass
+        finally:
+            close(fh)
+        return False
+
+class Nhx( Newick ):
+    """
+    New Hampshire eXtended  Newick with embedded 
+    The Newick Standard for representing trees in computer-readable form makes use of the correspondence between trees and nested parentheses.
+    http://evolution.genetics.washington.edu/phylip/newicktree.html
+    http://en.wikipedia.org/wiki/Newick_format
+    Example:
+    (gene1_Hu[&&NHX:S=Hu_Homo_sapiens], (gene2_Hu[&&NHX:S=Hu_Homo_sapiens], gene2_Mu[&&NHX:S=Mu_Mus_musculus]));
+    """
+    file_ext = 'nhx'
+
+class Nexus( Text ):
+    """
+    http://en.wikipedia.org/wiki/Nexus_file
+    Example:
+    #NEXUS
+    BEGIN TAXA;
+          Dimensions NTax=4;
+          TaxLabels fish frog snake mouse;
+    END;
+    
+    BEGIN CHARACTERS;
+          Dimensions NChar=20;
+          Format DataType=DNA;
+          Matrix
+            fish   ACATA GAGGG TACCT CTAAG
+            frog   ACATA GAGGG TACCT CTAAG
+            snake  ACATA GAGGG TACCT CTAAG
+            mouse  ACATA GAGGG TACCT CTAAG
+    END;
+    
+    BEGIN TREES;
+          Tree best=(fish, (frog, (snake, mouse)));
+    END;
+    """
+    file_ext = 'nex'
+
+    def __init__(self, **kwd):
+        Text.__init__( self, **kwd )
+
+    def sniff( self, filename ):
+        """
+        Determines whether the file is in nexus format
+        First line should be:
+        #NEXUS
+        """
+        try:
+            fh = open( filename )
+            count = 0
+            line = fh.readline()
+            line = line.strip()
+            if line and line == '#NEXUS':
+                fh.close()
+                return True
+        except:
+            pass
+        finally:
+            fh.close()
+        return False
+
+
+## Biom 
+
+class BiologicalObservationMatrix( Text ):
+    file_ext = 'biom'
+    """
+    http://biom-format.org/documentation/biom_format.html
+    The format of the file is JSON:
+    {
+    "id":null,
+    "format": "Biological Observation Matrix 0.9.1-dev",
+    "format_url": "http://biom-format.org",
+    "type": "OTU table",
+    "generated_by": "QIIME revision 1.4.0-dev",
+    "date": "2011-12-19T19:00:00",
+    "rows":[
+            {"id":"GG_OTU_1", "metadata":null},
+            {"id":"GG_OTU_2", "metadata":null},
+            {"id":"GG_OTU_3", "metadata":null},
+        ],
+    "columns": [
+            {"id":"Sample1", "metadata":null},
+            {"id":"Sample2", "metadata":null}
+        ],
+    "matrix_type": "sparse",
+    "matrix_element_type": "int",
+    "shape": [3, 2],
+    "data":[[0,1,1],
+            [1,0,5],
+            [2,1,4]
+           ]
+    }
+
+    """
+
+    def __init__(self, **kwd):
+        Text.__init__( self, **kwd )
+
+    def sniff( self, filename ):
+        if os.path.getsize(filename) < 50000:
+            try:
+                data = simplejson.load(open(filename))
+                if data['format'].find('Biological Observation Matrix'):
+                    return True
+            except:
+                pass
+        return False
+
+
+
+
 ## Qiime Classes
 
 class QiimeMetadataMapping(Tabular):
@@ -1053,7 +1444,7 @@
     """
     file_ext = 'qiimeparams'
 
-class QiimePrefs(data.Text):
+class QiimePrefs(Text):
     """
     A text file, containing coloring preferences to be used by make_distance_histograms.py, make_2d_plots.py and make_3d_plots.py.
     Example:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tool-data/datatypes.conf.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<datatypes>
+    <datatype_files>
+        <datatype_file name="metagenomics.py"/>
+    </datatype_files>
+    <registration>
+        <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="design" type="galaxy.datatypes.metagenomics:Design" 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="map" type="galaxy.datatypes.metagenomics:SecondaryStructureMap" 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="ref.taxonomy" type="galaxy.datatypes.metagenomics:RefTaxonomy" display_in_upload="true">
+            <converter file="ref_to_seq_taxonomy_converter.xml" target_datatype="seq.taxonomy"/>
+        </datatype>
+        <datatype extension="seq.taxonomy" type="galaxy.datatypes.metagenomics:SequenceTaxonomy" display_in_upload="true"/>
+        <datatype extension="rdp.taxonomy" type="galaxy.datatypes.metagenomics:RDPSequenceTaxonomy" 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="axes" type="galaxy.datatypes.metagenomics:Axes" display_in_upload="true"/>
+        <datatype extension="sff.flow" type="galaxy.datatypes.metagenomics:SffFlow" display_in_upload="true"/>
+        <datatype extension="tre" type="galaxy.datatypes.metagenomics:Newick" display_in_upload="true"/>
+        <datatype extension="biom" type="galaxy.datatypes.metagenomics:BiologicalObservationMatrix" display_in_upload="true"/>
+        <datatype extension="nhx" type="galaxy.datatypes.metagenomics:Nhx" display_in_upload="true"/>
+        <datatype extension="nex" type="galaxy.datatypes.metagenomics:Nexus" display_in_upload="true"/>
+    </registration>
+</datatypes>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tool-data/mothur_aligndb.loc.sample	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,19 @@
+#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):
+#
+# Reference Alignments:  http://www.mothur.org/wiki/Alignment_database
+#
+#<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
+#FungiLSU_train_1400bp_8506_mod.fasta	/project/db/galaxy/mothur/RDP/FungiLSU_train_1400bp_8506_mod.fasta
+#trainset6_032010.rdp.fasta	/project/db/galaxy/mothur/RDP/trainset6_032010.rdp.fasta
+#trainset7_112011.pds.fasta	/project/db/galaxy/mothur/RDP/trainset7_112011.pds.fasta
+#trainset7_112011.rdp.fasta	/project/db/galaxy/mothur/RDP/trainset7_112011.rdp.fasta
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tool-data/mothur_lookup.loc.sample	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,11 @@
+#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):
+#
+# lookup files from:   http://www.mothur.org/wiki/Lookup_files
+#
+#<name>	<file_base>
+#
+#GS20	/project/db/galaxy/mothur/lookup/LookUp_GS20.pat
+#GSFLX	/project/db/galaxy/mothur/lookup/LookUp_GSFLX.pat
+#Titanium	/project/db/galaxy/mothur/lookup/LookUp_Titanium.pat
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tool-data/mothur_map.loc.sample	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,10 @@
+#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):
+#
+# Secondary structure maps:    http://www.mothur.org/wiki/Secondary_structure_map
+#
+#<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.sample	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,24 @@
+#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):
+#
+# Silva reference files:    http://www.mothur.org/wiki/Silva_reference_files
+#
+#<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
+#trainset6_032010.rdp.tax	/project/db/galaxy/mothur/RDP/trainset6_032010.rdp.tax
+#trainset7_112011.pds.tax	/project/db/galaxy/mothur/RDP/trainset7_112011.pds.tax
+#trainset7_112011.rdp.tax	/project/db/galaxy/mothur/RDP/trainset7_112011.rdp.tax
+#FungiLSU_train_1400bp_8506_mod.tax	/project/db/galaxy/mothur/RDP/FungiLSU_train_1400bp_8506_mod.tax
+#
--- a/mothur/tools/mothur/align.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/align.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -23,7 +23,7 @@
    --flip=true
    --threshold=$reverse.threshold
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="candidate" type="data" format="fasta" label="fasta - Candiate Sequences"/>
--- a/mothur/tools/mothur/bin.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/bin.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_bin_seqs" name="Bin.seqs" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_bin_seqs" name="Bin.seqs" version="1.20.0" force_history_refresh="True">
  <description>Order Sequences by OTU</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -6,7 +6,7 @@
   --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'
+  --new_datasets='^\S+?\.(unique|[0-9.]*)\.fasta$:${fasta.ext}'
   --fasta=$fasta
   --list=$otu
   #if $name.__str__ != "None" and len($name.__str__) > 0:
@@ -24,9 +24,8 @@
   <param name="otu" type="data" format="list" label="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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="group" type="data" format="group" optional="true" label="group - Sequences Name reference"/>
--- a/mothur/tools/mothur/chimera.bellerophon.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/chimera.bellerophon.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,9 +1,9 @@
-<tool id="mothur_chimera_bellerophon" name="Chimera.bellerophon" version="1.19.0">
+<tool id="mothur_chimera_bellerophon" name="Chimera.bellerophon" version="1.20.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
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.bellerophon\.chimeras?$:'$out_file,'^\S+\.bellerophon\.accnos$:'$out_accnos
   --outputdir='$logfile.extra_files_path'
   --fasta=$fasta
   $filter
@@ -14,7 +14,7 @@
   #if int($increment.__str__) > 0:
    --increment=$increment
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
--- a/mothur/tools/mothur/chimera.ccode.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/chimera.ccode.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,9 +1,9 @@
-<tool id="mothur_chimera_ccode" name="Chimera.ccode" version="1.19.0">
+<tool id="mothur_chimera_ccode" name="Chimera.ccode" version="1.20.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
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.ccode\.chimeras?$:'$out_file,'^\S+\.ccode\.accnos$:'$out_accnos
   --outputdir='$logfile.extra_files_path'
   --fasta=$fasta
   --reference=$alignment.template
@@ -19,7 +19,7 @@
   #if int($numwanted.__str__) > 0:
    --numwanted=$numwanted
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="align" label="fasta - Candiate Aligned Sequences"/>
--- a/mothur/tools/mothur/chimera.check.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/chimera.check.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,9 +1,9 @@
-<tool id="mothur_chimera_check" name="Chimera.check" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_chimera_check" name="Chimera.check" version="1.20.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
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.chimeracheck\.chimeras?$:'$out_file
   --outputdir='$logfile.extra_files_path'
   --fasta=$fasta
   --reference=$alignment.template
@@ -23,7 +23,7 @@
     --new_datasets='^(\S+)\.chimeracheck\.svg$:svg'
    #end if
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="align" label="fasta - Candiate Aligned Sequences"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/chimera.perseus.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,58 @@
+<tool id="mothur_chimera_perseus" name="Chimera.perseus" version="1.23.0" >
+ <description>Find putative chimeras using chimeraCheck</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='chimera.perseus'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.perseus\.chimeras?$:'$out_file
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --name=$name
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --group='$group'
+  #end if
+  #if $alpha.__str__ != '':
+   --alpha=$alpha
+  #end if
+  #if $beta.__str__ != '':
+   --beta=$beta
+  #end if
+  #if $cutoff.__str__ != '':
+   --cutoff=$cutoff
+  #end if
+  --processors=8
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="align" label="fasta - Candiate Aligned Sequences"/>
+  <param name="name" type="data" format="names" label="name - Names "/>
+  <param name="group" type="data" format="group" optional="true" label="group - Sequences Name reference"/>
+  <param name="alpha" type="float" value="-5.54" optional="true" label="alpha" help="The default is -5.54"/>
+  <param name="beta" type="float" value="0.33" optional="true" label="beta" help="The default is 0.33"/>
+  <param name="cutoff" type="float" value="0.50" optional="true" label="cutoff" help="The default is 0.50"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="out_file" label="${tool.name} on ${on_string}: perseus.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.perseus_ command reads a fasta and name file, and outputs potentially chimeric sequences.
+
+.. _chimera.perseus: http://www.mothur.org/wiki/Chimera.perseus
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/chimera.pintail.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/chimera.pintail.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,9 +1,9 @@
-<tool id="mothur_chimera_pintail" name="Chimera.pintail" version="1.19.0">
+<tool id="mothur_chimera_pintail" name="Chimera.pintail" version="1.20.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
+  ## --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__]
@@ -33,7 +33,7 @@
    --increment=$increment
   #end if
   --result=#echo ','.join($results)
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
--- a/mothur/tools/mothur/chimera.slayer.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/chimera.slayer.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,9 +1,9 @@
-<tool id="mothur_chimera_slayer" name="Chimera.slayer" version="1.19.0">
+<tool id="mothur_chimera_slayer" name="Chimera.slayer" version="1.22.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
+  --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
@@ -12,6 +12,9 @@
    #if $alignment.name.__str__ != "None" and len($alignment.name.__str__) > 0:
     --name=$alignment.name
    #end if
+   #if $alignment.group.__str__ != '':
+    --group=$alignment.group
+   #end if
   #else:
    --reference=$alignment.template
   #end if
@@ -32,7 +35,8 @@
    $options.trim
    $options.split
   #end if
-  --processors=2
+  ## --blastlocation=path_to_blast
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
@@ -55,6 +59,8 @@
    </when>
    <when value="self">
     <param name="name" type="data" format="names" optional="true" label="names - Sequences Names"/>
+    <param name="group" type="data" format="groups" optional="true" label="group - Sequences Name reference"
+           help="use the more abundant sequences from the same sample to check the query sequence"/>
    </when>
   </conditional>
   <conditional name="options">
@@ -115,7 +121,7 @@
 
  (A) the ends of a query sequence are searched against an included database of reference chimera-free 16S sequences to identify potential parents of a chimera; 
  (B) candidate parents of a chimera are selected as those that form a branched best scoring alignment to the NAST-formatted query sequence; 
- (C) the NAST alignment of the query sequence is improved in a `chimera-aware' profile-based NAST realignment to the selected reference parent sequences; and 
+ (C) the NAST alignment of the query sequence is improved in a 'chimera-aware' profile-based NAST realignment to the selected reference parent sequences; and 
  (D) an evolutionary framework is used to flag query sequences found to exhibit greater sequence homology to an in silico chimera formed between any two of the selected reference parent sequences.
 
 Note: 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/chimera.uchime.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,173 @@
+<tool id="mothur_chimera_uchime" name="Chimera.uchime" version="1.22.0">
+ <description>Find putative chimeras using uchime</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='chimera.uchime'
+  ##  stool.trim.unique.good.fasta
+  ##  stool.trim.unique.good.uchime.chimera
+  ##  stool.trim.unique.good.uchime.accnos
+  ##  stool.trim.unique.good.uchime.alns
+  #if $chimealns:
+   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.uchime\.chimeras?$:'$out_file,'^\S+\.uchime\.accnos$:'$out_accnos,'^\S+\.uchime\.alns$:'$out_alns
+  #else:
+   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.uchime\.chimeras?$:'$out_file,'^\S+\.uchime\.accnos$:'$out_accnos
+  #end if
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  #if $template.source == 'ref':
+   --reference=$template.reference
+  #elif $template.source == 'hist':
+   --reference=$template.reference
+  #elif $template.source == 'self':
+   --reference='self'
+   #if float($template.abskew.__str__) > 0:
+    --abskew=$template.abskew
+   #end if
+   #if $template.group.__str__ != '':
+    --group=$template.group
+   #end if
+  #elif $template.source == 'names':
+   --name=$template.name
+  #end if
+  #if float($minh.__str__) > 0:
+   --minh=$minh
+  #end if
+  #if float($mindiv.__str__) > 0:
+   --mindiv=$mindiv
+  #end if
+  #if float($xn.__str__) > 0:
+   --xn=$xn
+  #end if
+  #if float($dn.__str__) > 0:
+   --dn=$dn
+  #end if
+  #if float($xa.__str__) > 0:
+   --xa=$xa
+  #end if
+  #if int($chunks.__str__) > 0:
+   --chunks=$chunks
+  #end if
+  #if int($minchunk.__str__) > 0:
+   --minchunk=$minchunk
+  #end if
+  #if len($idsmoothwindow.__str__) > 0 and int($idsmoothwindow.__str__) > 0:
+   --idsmoothwindow=$idsmoothwindow
+  #end if
+  ## #if len($minsmoothid.__str__) > 0 and float($minsmoothid.__str__) > 0:
+  ##  --minsmoothid=$minsmoothid
+  ## #end if
+  #if int($maxp.__str__) > 0:
+   --maxp=$maxp
+  #end if
+  #if int($minlen.__str__) > 0:
+   --minlen=$minlen
+  #end if
+  #if int($maxlen.__str__) > 0:
+   --maxlen=$maxlen
+  #end if
+  $skipgaps
+  $skipgaps2
+  #if $alignment.ucl:
+    --ucl=true
+   #if $alignment.queryfract != None and len($alignment.queryfract) > 0 and 1.0 >= float($alignment.queryfract) > 0: 
+    --queryfract=$alignment.queryfract
+   #end if
+  #end if
+  $chimealns
+  --processors=8
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="align" label="fasta - Candiate Aligned Sequences"/>
+  <conditional name="template">
+   <param name="source" type="select" label="Select Reference Template from" help="">
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+    <option value="self">Self</option>
+    <option value="names">Use a names file</option>
+   </param>
+   <when value="ref">
+    <param name="reference" type="select" label="reference - 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="reference" type="data" format="fasta" label="reference - Reference to align with" help=""/>
+   </when>
+   <when value="self">
+    <param name="abskew" type="float" value="1.9" label="abskew - Abundance skew (default 1.9)" help="Abundance skew is: min [ abund(parent1), abund(parent2) ] / abund(query)"/>
+    <param name="group" type="data" format="groups" optional="true" label="group - Sequences Name reference"
+           help="use the more abundant sequences from the same sample to check the query sequence"/>
+
+   </when>
+   <when value="names">
+    <param name="name" type="data" format="names" label="name - Sequence names"/>
+   </when>
+  </conditional>
+
+  <param name="minh" type="float" value="0.3" label="minh - mininum score to report chimera. Default 0.3" help="Values from 0.1 to 5 might be reasonable. Lower values increase sensitivity but may report more false positives."/>
+  <param name="mindiv" type="float" value="0.5" label="mindiv - minimum divergence ratio, default 0.5" help="to ignore very close chimeras, increase mindiv to 1.0 or 2.0, to increase sensitivity decrease minh to 0.1"/>
+
+  <param name="xn" type="float" value="8.0" label="xn - weight of a no vote. Default 8.0" help="Decreasing this weight to around 3 or 4 may give better performance on denoised data"/>
+  <param name="dn" type="float" value="1.4" label="dn - pseudo-count prior on number of no votes. Default 1.4" help="Reasonable values are probably in the range from 0.2 to 2.0"/>
+  <param name="xa" type="float" value="1.0" label="xa - eight of an abstain vote. Default 1.0" help="Reasonable values might range from 0.1 to 2.0"/>
+
+
+  <param name="chunks" type="integer" value="4" label="chunks - number of chunks. Default 4." help="number of chunks to extract from the query sequence when searching for parents."/>
+  <param name="minchunk" type="integer" value="64" label="minchunk - minimum length of a chunk. Default 64." help=""/>
+  <param name="idsmoothwindow" type="integer" value="32" optional="True" label="idsmoothwindow - the length of id smoothing window. Default 32" help=""/>
+  <!-- not supported in uchime 
+  <param name="minsmoothid" type="float" value="0.95" optional="True" label="minsmoothid - minimum factional identity over smoothed window of candidate parent. Default 0.95" help=""/>
+  -->
+  <param name="maxp" type="integer" value="2" label="maxp - maximum number of candidate parents to consider. Default 2" help="increasing maxp gives only a very small improvement in sensivity but tends to increase the error rate quite a bit"/>
+  <param name="minlen" type="integer" value="0" label="minlen - minimum unaligned sequence length. Default 10" help="Applies to both query and reference sequences."/>
+  <param name="maxlen" type="integer" value="0" label="maxlen - maximum unaligned sequence length. Defaults 10000" help="Applies to both query and reference sequences."/>
+
+   <param name="skipgaps" type="boolean" falsevalue="--skipgaps=false" truevalue="" checked="true" label="skipgaps - columns containing gaps do not count as diffs. Default=T" help="controls how gapped columns affect counting of diffs"/>
+   <param name="skipgaps2" type="boolean" falsevalue="--skipgaps2=false" truevalue="" checked="true" label="skipgaps2 - column is immediately adjacent to a column containing a gap, it is not counted as a diff. Default=T" help="controls how gapped columns affect counting of diffs"/>
+
+  <param name="chimealns" type="boolean" falsevalue="" truevalue="--chimealns=true" checked="false" label="chimealns - Produce a file containing multiple alignments of query sequences to parents in human readable format. " help="Alignments show columns with differences that support or contradict a chimeric model."/>
+
+
+  <conditional name="alignment">
+   <param name="ucl" type="boolean" falsevalue="global" truevalue="local" checked="false" label="ucl - Use local-X alignments." help="global-X is the default"/>
+   <when value="global"/>
+   <when value="local">
+    <param name="queryfract" type="float" value="0.5" label="queryfract - minimum fraction of the query sequence that must be covered by a local-X alignment. Default 0.5." help=""/>
+   </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}: uchime.chimeras" />
+  <data format="accnos" name="out_accnos" label="${tool.name} on ${on_string}: uchime.accnos" />
+  <data format="txt" name="out_alns" label="${tool.name} on ${on_string}: uchime.alns" >
+   <filter>chimealns == 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 chimera.uchime_ command reads a fasta file and reference file and outputs potentially chimeric sequences. The original uchime program was written by Robert C. Edgar and donated to the public domain, http://drive5.com/uchime
+
+.. _chimera.uchime: http://www.mothur.org/wiki/Chimera.uchime
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/classify.otu.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/classify.otu.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_classify_otu" name="Classify.otu" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_classify_otu" name="Classify.otu" version="1.20.0" force_history_refresh="True">
  <description>Assign sequences to taxonomy</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -9,6 +9,9 @@
   --new_datasets='^\S+?\.(unique|[0-9.]*\.cons\.taxonomy)$:cons.taxonomy','^\S+?\.(unique|[0-9.]*\.cons\.tax\.summary)$:tax.summary'
   --list=$otu
   --taxonomy=$tax.taxonomy
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --name='$name'
+  #end if
   #if $reftax.source != 'none' and len($reftax.taxonomy.__str__) > 0:
    --reftaxonomy=$reftax.taxonomy
   #end if
@@ -25,7 +28,8 @@
   $probs
  </command>
  <inputs>
-  <param name="otu" type="data" format="list" label="read.otu(list=) - OTU List "/>
+  <param name="otu" type="data" format="list" label="list - OTU List "/>
+  <param name="name" type="data" format="names" optional="true" label="name - taxonomy sequence names"/>
   <conditional name="tax">
    <param name="source" type="select" label="Select Taxonomy from" help="">
     <option value="hist">History</option>
@@ -44,8 +48,8 @@
    </when>
   </conditional>
   <conditional name="reftax">
-   <param name="source" type="select" label="Select Taxonomy from" help="">
-    <option value="none">None</option>
+   <param name="source" type="select" label="Select Reference Taxonomy used in Classify.seqs from" help="Including the reference taxonomy file used when you classified your sequences keep the rankIDs in the summary file static.">
+    <option value="none">Selection is Optional</option>
     <option value="hist">History</option>
     <option value="ref">Cached Reference</option>
    </param>
@@ -63,9 +67,8 @@
    </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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="cutoff" type="integer" value="60" label="cutoff - Confindence percentage cutoff between 1 and 100">
--- a/mothur/tools/mothur/classify.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/classify.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_classify_seqs" name="Classify.seqs" version="1.19.0">
+<tool id="mothur_classify_seqs" name="Classify.seqs" version="1.21.0">
  <description>Assign sequences to taxonomy</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -38,7 +38,7 @@
     --search=$classify.search.algorithm
    #end if
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
@@ -97,6 +97,8 @@
      <param name="algorithm" type="select" label="algorithm - " help="">
       <option value="kmer">Kmer (default)</option>
       <option value="blast">BLAST</option>
+      <option value="suffix">Suffix Tree</option>
+      <option value="distance">Distance</option>
      </param>
      <when value="kmer">
       <param name="ksize" type="integer" value="8" label="ksize - kmer length between 5 and 12"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/classify.tree.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,70 @@
+<tool id="mothur_classify_tree" name="Classify.tree" version="1.24.0">
+ <description>Get a consensus taxonomy for each node on a tree</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='classify.tree'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.taxonomy\.tre$:'$out_tree,'^\S+\.taxonomy\.summary$:'$summary
+  --outputdir='$logfile.extra_files_path'
+  --taxonomy=$taxonomy
+  --tree=$tree
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --name='$name'
+  #end if
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --group=$group
+  #end if
+
+  --name=$names
+ </command>
+ <inputs>
+  <param name="taxonomy" type="data" format="taxonomy" optional="true" label="taxonomy - Taxonomy to screen"/>
+  <param name="tree" type="data" format="tre" label="tree - Sequences to filter"/>
+  <param name="name" type="data" format="names" optional="true" label="name - Sequences Name reference file"/>
+  <param name="group" type="data" format="group" optional="true" label="group - Sequences Group reference"/>
+  <param name="cutoff" type="integer" value="51" optional="true" label="cutoff - consensus confidence threshold" 
+         help="The default is 51, meaning 51%. Cutoff cannot be below 51">
+    <validator type="in_range" message="The percentage cutoff must be between 51 and 100" min="51" max="100"/>
+  </param>
+
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format_source="tree" name="out_tree" label="${tool.name} on ${on_string}: taxonomy.tre" />
+  <data format_source="tabular" name="summary" label="${tool.name} on ${on_string}: taxonomy.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.tree_ command is used to get a consensus taxonomy for each node on a tree.
+Input is a taxonomy_ and a tree_ with optional name_ or group_ reference.
+The output is a tree_ and a summary..
+
+  TreeNode	NumRep	Taxonomy
+  243	2	Bacteria(100);"Firmicutes"(100);"Clostridia"(100);Clostridiales(100);"Ruminococcaceae"(100);Faecalibacterium(100);
+  244	3	Bacteria(100);"Firmicutes"(100);"Clostridia"(100);Clostridiales(100);"Ruminococcaceae"(100);Faecalibacterium(100);
+  245	4	Bacteria(100);"Firmicutes"(100);"Clostridia"(100);Clostridiales(100);"Ruminococcaceae"(100);Faecalibacterium(100);
+  ...
+
+
+.. _taxonomy: http://www.mothur.org/wiki/Taxonomy_outline
+.. _tree: http://evolution.genetics.washington.edu/phylip/newicktree.html
+.. _name: http://www.mothur.org/wiki/Name_file
+.. _group: http://www.mothur.org/wiki/Group_file
+.. _classify.tree: http://www.mothur.org/wiki/Classify.tree
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/cluster.fragments.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/cluster.fragments.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_cluster_fragments" name="Cluster.fragments" version="1.19.0">
+<tool id="mothur_cluster_fragments" name="Cluster.fragments" version="1.20.0">
  <description> Group sequences that are part of a larger sequence</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -25,7 +25,7 @@
  </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_source="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>
--- a/mothur/tools/mothur/cluster.split.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/cluster.split.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_cluster_split" name="Cluster.split" version="1.19.0">
+<tool id="mothur_cluster_split" name="Cluster.split" version="1.22.0">
  <description>Assign sequences to OTUs (Operational Taxonomic Unit) splits large matrices</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -44,7 +44,7 @@
    --precision=$precision
   #end if
   $large
-  --processors=1
+  --processors=8
  </command>
  <inputs>
   <conditional name="splitby">
@@ -80,7 +80,7 @@
     <param name="fasta" type="data" format="fasta" label="fasta - Sequences"/>
     <param name="name" type="data" format="names" label="name - Sequences Name reference"/>
     <param name="taxonomy" type="data" format="seq.taxonomy" label="taxonomy - Taxonomy (from Classify.seqs)"/>
-    <param name="taxlevel" type="integer" value="1" label="taxlevel - taxonomy level for split (default=1)" 
+    <param name="taxlevel" type="integer" value="3" label="taxlevel - taxonomy level for split (default=3)" 
            help="taxonomy level you want to use to split the distance file, default=1, meaning use the first taxon in each list"/>
    </when>
   </conditional> <!-- splitby -->
@@ -90,7 +90,7 @@
    <option value="average" selected="true">Average neighbor</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"/>
+                 help="Ignore pairwise distances larger than this, a common value would be 0.25"/>
   <param name="hard" type="boolean" checked="true" truevalue="--hard=true" falsevalue="--hard=true" label="hard - Use hard cutoff instead of rounding" 
                  help=""/>
   <param name="precision" type="select" optional="true" label="precision - Precision for rounding distance values"
--- a/mothur/tools/mothur/collect.shared.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/collect.shared.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_collect_shared" name="Collect.shared" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_collect_shared" name="Collect.shared" version="1.23.0" force_history_refresh="True">
  <description>Generate collector's curves for calculators on OTUs</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -26,30 +26,59 @@
   <param name="otu" type="data" format="shared" label="shared - OTU Shared"/>
   <param name="label" type="select" label="label - OTU Label filter" multiple="true">
    <help>To filter: select labels to include</help>
-   <options from_dataset="otu">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
-    <filter type="unique_value" name="unq_lbl" column="0" />
+   <options>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="groups" type="select" label="groups - Groups filter (uses all groups if none are selected)" multiple="true">
    <help>To filter: select select at least 2 groups</help>
-   <options from_dataset="otu">
-    <column name="name" index="1"/>
-    <column name="value" index="1"/>
-    <filter type="unique_value" name="unq_grp" column="1" />
+   <options>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
   <param name="calc" type="select" label="calc - Calculators (Uses defaults if none are selected)" multiple="true">
-   <options from_file="mothur_calculators.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>
+   <option value="sharedsobs" selected="true">sharedsobs - Shared community richness the observed richness shared between two or more samples</option>
+   <option value="sharedchao" selected="true">sharedchao - Shared community richness the two or more sample shared Chao1 richness estimator</option>
+   <option value="sharedace" selected="true">sharedace - Shared community richness the two sample shared ACE richness estimator</option>
+   <option value="anderberg">anderberg - Community Membership Similarity the Anderberg similarity coefficient</option>
+   <option value="jclass" selected="true">jclass - Community Membership Similarity the traditional Jaccard similarity coefficient based on the observed richness</option>
+   <option value="jest" selected="true">jest - Community Membership Similarity the Jaccard similarity coefficient based on the Chao1 estimated richnesses</option>
+   <option value="kulczynski">kulczynski - Community Membership Similarity the Kulczynski similarity coefficient</option>
+   <option value="kulczynskicody">kulczynskicody - Community Membership Similarity the Kulczynski-Cody similarity coefficient</option>
+   <option value="kstest">kstest - Community Membership Similarity Kolmogorov-Smirnov test</option>
+   <option value="lennon">lennon - Community Membership Similarity the Lennon similarity coefficient</option>
+   <option value="ochiai">ochiai - Community Membership Similarity the Ochiai similarity coefficient</option>
+   <option value="sorclass" selected="true">sorclass - Community Membership Similarity the Sorenson similarity coefficient based on the observed richness</option>
+   <option value="sorest" selected="true">sorest - Community Membership Similarity the Sorenson similarity coefficient based on the Chao1 estimated richnesses</option>
+   <option value="whittaker">whittaker - Community Membership Similarity the Whittaker similarity coefficient</option>
+   <option value="hamming">hamming - Community Membership Similarity -</option>
+   <option value="memchi2">memchi2 - Community Membership Similarity -</option>
+   <option value="memchord">memchord - Community Membership Similarity -</option>
+   <option value="memeuclidean">memeuclidean - Community Membership Similarity -</option>
+   <option value="mempearson">mempearson - Community Membership Similarity -</option>
+   <option value="braycurtis">braycurtis - Community Structure Similarity the Bray-Curtis similarity coefficient</option>
+   <option value="jabund" selected="true">jabund - Community Structure Similarity the abundance-based Jaccard similarity coefficient</option>
+   <option value="morisitahorn">morisitahorn - Community Structure Similarity the Morisita-Horn similarity coefficient</option>
+   <option value="sorabund" selected="true">sorabund - Community Structure Similarity the abundance-based Sorenson similarity coefficient</option>
+   <option value="thetan" selected="true">thetan - Community Structure Similarity the Smith theta similarity coefficient</option>
+   <option value="thetayc" selected="true">thetayc - Community Structure Similarity the Yue &amp; Clayton theta similarity coefficient</option>
+   <option value="canberra">canberra - Community Structure Similarity -</option>
+   <option value="gower">gower - Community Structure Similarity -</option>
+   <option value="hellinger">hellinger - Community Structure Similarity -</option>
+   <option value="manhattan">manhattan - Community Structure Similarity -</option>
+   <option value="odum">odum - Community Structure Similarity -</option>
+   <option value="soergel">soergel - Community Structure Similarity -</option>
+   <option value="spearman">spearman - Community Structure Similarity -</option>
+   <option value="speciesprofile">speciesprofile - Community Structure Similarity -</option>
+   <option value="structchi2">structchi2 - Community Structure Similarity -</option>
+   <option value="structchord">structchord - Community Structure Similarity -</option>
+   <option value="structeuclidean">structeuclidean - Community Structure Similarity -</option>
+   <option value="structkulczynski">structkulczynski - Community Structure Similarity -</option>
+   <option value="structpearson">structpearson - Community Structure Similarity -</option>
+   <option value="sharednseqs">sharednseqs - Utility the number of sequences in two samples</option>
+   <option value="sharedobserved">sharedobserved - Utility the number of sequences in two samples</option>
   </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>
--- a/mothur/tools/mothur/collect.single.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/collect.single.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,12 +1,14 @@
-<tool id="mothur_collect_single" name="Collect.single" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_collect_single" name="Collect.single" version="1.20.0" force_history_refresh="True">
  <description>Generate collector's curves 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'
+  #if $as_datasets.__str__ == 'yes':
+   --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+   --new_datasets='^\S+?\.(\S+)$:tabular'
+  #end if
   #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('rabund').__class__):
@@ -35,25 +37,43 @@
  <inputs>
   <param name="otu" type="data" format="list,rabund,sabund,shared" label="list,rabund,sabund,shared - 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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
-   <options from_file="mothur_calculators.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>
+   <option value="ace" selected="true">ace - Community richness the ACE estimator</option>
+   <option value="bootstrap">bootstrap - Community richness the bootstrap estimator</option>
+   <option value="chao" selected="true">chao - Community richness the Chao1 estimator</option>
+   <option value="jack" selected="true">jack - Community richness the jackknife estimator</option>
+   <option value="sobs" selected="true">sobs - Community richness the observed richness</option>
+   <option value="simpsoneven">simpsoneven - Community evenness a Simpson index-based measure of evenness</option>
+   <option value="shannoneven">shannoneven - Community evenness a Shannon index-based measure of evenness</option>
+   <option value="heip">heip - Community evenness Heip's metric of community evenness</option>
+   <option value="smithwilson">smithwilson - Community evenness Smith and Wilson's metric of community evenness</option>
+   <option value="bergerparker">bergerparker - Community diversity the Berger-Parker index</option>
+   <option value="coverage">coverage - Community diversity the sampling coverage </option>
+   <option value="goodscoverage">goodscoverage - Community diversity the Good's estimate of sampling coverage </option>
+   <option value="simpson" selected="true">simpson - Community diversity the Simpson index</option>
+   <option value="invsimpson">invsimpson - Community diversity the Simpson index</option>
+   <option value="qstat">qstat - Community diversity the Q statistic</option>
+   <option value="shannon" selected="true">shannon - Community diversity the Shannon index</option>
+   <option value="npshannon" selected="true">npshannon - Community diversity the non-parametric Shannon index</option>
+   <option value="boneh">boneh - Estimator Boneh's estimator</option>
+   <option value="efron">efron - Estimator Efron's estimator</option>
+   <option value="shen">shen - Estimator Shen's estimator</option>
+   <option value="solow">solow - Estimator Solow's estimator</option>
+   <option value="logseries">logseries - Statistical distribution tests whether observed data follow the log series distribution</option>
+   <option value="geometric">geometric - Statistical distribution tests whether observed data follow the geometric series distribution</option>
+   <option value="bstick">bstick - Statistical distribution tests whether observed data follow the broken stick distribution</option>
+   <option value="nseqs">nseqs - Utility the number of sequences in a sample</option>
   </param>
   <param name="abund" type="integer" value="10" label="abund - ACE Estimator threshold for abundant versus rare OTUs (default 10)"/>
   <param name="size" type="integer" value="0" label="size - sample size for OTU prediction (ignored if &lt; 1)" 
     help="By default these calculators will base the prediction on a sample that is the same size as the initial sampling"/>
   <param name="freq" type="float" value="0.0" label="freq - frequency for output (default is every 100 sequences)" 
     help="Use a decimal between 0 and 1 to set the frequency as a percentage of the number of sequences"/>
+  <param name="as_datasets" type="boolean" truevalue="yes" falsevalue="no" checked="true" label="Create a new history dataset for each label and calculator"/>
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
--- a/mothur/tools/mothur/consensus.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/consensus.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_consensus_seqs" name="Consensus.seqs" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_consensus_seqs" name="Consensus.seqs" version="1.20.0" force_history_refresh="True">
  <description>Find a consensus sequence for each OTU or phylotype</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -8,6 +8,9 @@
   #if $name.__str__ != "None" and len($name.__str__) > 0:
    --name=$name
   #end if
+  #if $cutoff != None and len($cutoff.__str__) > 0 and 100 > int($cutoff.__str__) > 0:
+   --cutoff=$cutoff
+  #end if
   #if $otu.use == 'yes':
    --list=$otu.list
    #if $otu.label.__str__ != "None" and len($otu.label.__str__) > 0:
@@ -15,13 +18,13 @@
    #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'
+   --new_datasets='^\S+?\.(((unique|[0-9.]*)\.)?cons\.fasta)$:${fasta.ext}','^\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="fasta" type="data" format="align" 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">
@@ -32,20 +35,23 @@
    <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>
+      <filter type="data_meta" ref="list" key="labels" />
      </options>
     </param>
    </when>
   </conditional> <!-- -->
+  <param name="cutoff" type="integer" value="100" optional="True" label="cutoff - set a percentage of sequences that support the base">
+   <help>For example: cutoff=95 would return the base that was supported by at least 95% of sequences.</help>
+   <validator type="in_range" message="The percentage cutoff must be between 1 and 100" min="1" max="100"/>
+  </param>
  </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">
+  <data format_source="fasta" name="cons_fasta" label="${tool.name} on ${on_string}: cons.fasta">
    <filter>otu['use'] == 'no'</filter>
   </data>
  </outputs>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/cooccurrence.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,144 @@
+<tool id="mothur_cooccurrence" name="Cooccurrence" version="1.25.0" >
+ <description>tests whether presence-absence patterns differ from chance</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  --cmd='cooccurrence'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.cooccurence\.summary$:'$out_summary
+  --outputdir='$logfile.extra_files_path'
+  --shared=$shared
+  --metric=$metric
+  --matrixmodel=$matrixmodel
+  #if len($iters.__str__) > 0 and int($iters.__str__) > 0:
+   --iters=$iters
+  #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
+ </command>
+ <inputs>
+  <param name="shared" type="data" format="shared" label="shared - OTU Shared file"/>
+  <param name="iters" type="integer" value="1000" optional="true" label="iters - Number of iterations to try (default 1000)">
+    <validator type="in_range" message="Number of iterations must be positive" min="1"/>
+  </param>
+  <param name="metric" type="select" label="metric - test metric for scoring">
+    <option value="cscore" selected="true">cscore - species segregation</option>
+    <option value="checker">checker - species segregation</option>
+    <option value="combo">combo - unique species pairs</option>
+    <option value="vratio">vratio - variance</option>
+  </param>
+  <param name="matrixmodel" type="select" label="matrixmodel - the scoring matrix" 
+         help="See the notes below on choosing a metric/matrixmodel combination">
+    <option value="sim1">sim1</option>
+    <option value="sim2" selected="true">sim2</option>
+    <option value="sim3">sim3</option>
+    <option value="sim4">sim4</option>
+    <option value="sim5">sim5</option>
+    <option value="sim6">sim6</option>
+    <option value="sim7">sim7</option>
+    <option value="sim8">sim8</option>
+    <option value="sim9">sim9</option>
+  </param>
+
+  <param name="groups" type="select" optional="true" label="groups - Groups to include" multiple="true"
+     help="By default all are included if no selection is made.">
+   <options>
+    <filter type="data_meta" ref="shared" key="groups" />
+   </options>
+  </param>
+  <param name="label" type="select" optional="true" label="label - Select OTU Labels to include" multiple="true" 
+     help="By default all are included if no selection is made.">
+   <options>
+    <filter type="data_meta" ref="shared" key="labels" />
+   </options>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="out_summary" label="${tool.name} on ${on_string}: cooccurence.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 cooccurrence_ command variance calculates four metrics and tests their significance to assess whether presence-absence patterns are different than what one would expect by chance.   The input is a shared_ file.  The output can be filtered by groups and labels.
+
+
+
+**metric**
+
+The metric parameter options are **cscore**, **checker**, **combo** and **vratio**. Default=cscore. The cscore or checkerboard score [1] is a metric that measures species segregation. It is the mean number of checkerboard units per species pair. The checker metric [2] counts the number of species pairs forming a perfect checkerboard. The combo metric [3] is the number of unique species pairs. The vratio or variance ratio [4] is a measure of the species association calculated by the ratio of the variance in total species number to the sum of the variances of the species.  ::
+
+	[1] Stone, L., and A. Roberts. 1990. The checkerboard score and species distributions. Ocelogia. 85:74-79.
+	[2] Diamond, J. M. 1975. Assembly of species communities. Pages 342-444 in M. L. Cody and J. M. Diamond, editors. Ecology and evolution of communities. Harvard University Press, Cambridge, Massachusetts, USA.
+	[3] Pielou, D. P., and E. C. Pielou. 1968 Association among species of infrequent occurrence: the insect and spider fauna of Polypours betulinus (Bulliard) Fries. Journal of Theoretical Biology 21:202-216.
+	[4] Schluter, D. 1984. A variance test for detecting species associations, with some example applications. Ecology 65:998-1005.
+	[5] Gotelli, Nicholas J. 2000. NULL MODEL ANALYSIS OF SPECIES CO-OCCURRENCE PATTERNS. Ecology 81:2606-2621.
+
+
+
+**matrixmodel**
+
+The matrixmodel parameter allows you to select the model you would like to use. Options are sim1, sim2, sim3, sim4, sim5, sim6, sim7, sim8 and sim9. Default=sim2.
+
+Each sim implements a different algorithm for generating null matrices with constraints on the rows (species) and columns (sites).::
+ ===================== ====================== ======================= ====================== 
+  Rows                  Columns equiprobable   Columns proportional    Column totals fixed   
+ ===================== ====================== ======================= ====================== 
+  Rows equiprobable     sim1                   sim6                    sim3                  
+  Rows proportional     sim7                   sim8                    sim5                  
+  Row totals fixed      sim2                   sim4                    sim9                  
+ ===================== ====================== ======================= ====================== 
+
+Equiprobable rows or columns means that each row, column or both is not dependent on the original co-occurrence matrix. Each species or site has an equal change of occurring in the null matrix.
+Proportional rows or columns means that the proportion of occurrences in rows, columns or both in the original co-occurrence matrix are preserved but the totals may differ. Each species or site's chances of occurring are proportional to their occurrence in the original co-occurrence matrix.
+Fixed row or column totals preserves the total number of occurrences in rows, columns or both in the original co-occurrence matrix. Sim9 is a special case that is not probabilistic. Since both the row and column totals are preserved the only way to randomize the matrix is with a checkerboard swap. When a checkerboard appears in the matrix the 1s and 0s are swapped to their mirror image to preserve the species and site totals.
+
+Checkerboard::
+
+  10
+  01
+
+Swap::
+
+  01
+  10
+
+
+suggested metric/matrixmodel combinations::
+    ========  ========  ======== ========
+     cscore    checker   combo    vratio
+    ========  ========  ======== ========
+     sim9      sim9      sim9     sim2
+     sim2      sim2      sim2     sim4
+     -         -         sim4     sim8
+     -         -         sim8     -
+    ========  ========  ======== ========
+
+
+Careful readers will note that none of the suggested matrixmodels have equiprobable rows (species). This is because tests of co-occurrence are quite sensitive to the frequency of species occurrence. As such, rowtotals should be maintained or at least kept proportional in the null models. Sim9 is well suited to co-occurrence matrices that have an "island list" structure. Island lists are often found in classical ecology datasets that contain species with well defined habitat patches and are rarely degenerate (matrices that contain empty rows or columns). Sim2 is well suited for co-occurrence matrices that have a "sample list" structure. Sample list structured data are found where species have relatively homogeneous habitats and degenerate matrices are not uncommon. In these matrices species will often occur in only one site.
+The default values of cscore and sim2 have been selected because the c-score is not very sensitive to noise in the data and when used with sim9 or sim2 is not particularly prone to false positives. Sim2 has been chosen because of the prevalence of degenerate matrices. These are just guidelines, however, be sure to select a metric and matrix model that is best suited to the type of data you are analyzing.
+It should be noted that sim9 cannot be used with vratio because in sim9 both the column and row totals are maintained, hence there will be no variance.
+Please see [5] for more details on metric/null model selection.
+
+
+.. _shared: http://www.mothur.org/wiki/Shared_file
+.. _cooccurrence: http://www.mothur.org/wiki/Cooccurrence
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/corr.axes.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/corr.axes.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_corr_axes" name="Corr.axes" version="1.19.0">
+<tool id="mothur_corr_axes" name="Corr.axes" version="1.20.0">
  <description>correlation of data to axes</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -38,17 +38,13 @@
    <when value="shared">
      <param name="otu" type="data" format="shared,relabund" label="shared or relabund - OTU Shared or Relabund"/>
      <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>
+       <filter type="data_meta" ref="otu" key="labels" />
       </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>
+       <filter type="data_meta" ref="otu" key="groups" />
       </options>
      </param>
    </when>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/count.groups.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,72 @@
+<tool id="mothur_count_groups" name="Count.groups" version="1.22.0" >
+ <description>counts the number of sequences represented by a specific group or set of groups</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='count.groups'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.groups.count$:'$grp_count
+  --outputdir='$logfile.extra_files_path'
+  #if isinstance($group.datatype, $__app__.datatypes_registry.get_datatype_by_extension('shared').__class__):
+   --shared=$group
+  #else:
+   --group=$group
+  #end if
+  #if $groupnames.source == 'groups':
+   #if $groupnames.groups.__str__ != "None" and len($groupnames.groups.__str__) > 0:
+    --groups=$groupnames.groups
+   #end if
+  #elif $groupnames.source == 'accnos':
+   #if $groupnames.accnos.__str__ != "None" and len($groupnames.accnos.__str__) > 0:
+    --accnos=$groupnames.accnos
+   #end if
+  #end if
+ </command>
+ <inputs>
+  <param name="group" type="data" format="groups,shared" label="group or shared - Group file for sequence count"/>
+  <conditional name="groupnames">
+   <param name="source" type="select" label="Filter group names">
+    <option value="none">Report on All Groups</option>
+    <option value="groups">A List of Group Names</option>
+    <option value="accnos">A History Group Name Accnos Dataset</option>
+   </param>
+   <when value="none"/>
+   <when value="groups">
+    <param name="groups" type="select" label="groups - Pick groups to include" multiple="true">
+     <help>All groups displayed if none are selected.</help>
+     <options>
+      <filter type="data_meta" ref="group" key="groups" />
+     </options>
+    </param>
+   </when>
+   <when value="accnos">
+    <param name="accnos" type="data" format="accnos" optional="true" label="accnos - Group Names from your history"/>
+   </when>
+  </conditional>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="grp_count" label="${tool.name} on ${on_string}: group.count" />
+ </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 count.groups_ command counts sequences from a specific group or set of groups from a group_ or shared_ file.
+
+.. _shared: http://www.mothur.org/wiki/Shared_file
+.. _group: http://www.mothur.org/wiki/Group_file
+.. _count.groups: http://www.mothur.org/wiki/Count.groups
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/count.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,61 @@
+<tool id="mothur_count_seqs" name="Count.seqs" version="1.20.0" >
+ <description>counts the number of sequences represented by the representative</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='count.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.seq.count$:'$seq_count
+  --outputdir='$logfile.extra_files_path'
+  --name=$name
+  #if $grouping.use:
+   #if $grouping.group.__str__ != "None" and len($grouping.group.__str__) > 0:
+    --group='$grouping.group'
+   #end if
+   #if $grouping.groups.__str__ != "None" and len($grouping.groups.__str__) > 0:
+    --groups='$grouping.groups'
+   #end if
+  #end if
+ </command>
+ <inputs>
+  <param name="name" type="data" format="names" label="name - Sequences Name reference"/>
+  <conditional name="grouping">
+   <param name="use" type="boolean" truevalue="yes" falsevalue="no" checked="False" label="Use a Group file to include counts for groups"/>
+   <when value="yes">
+   <param name="group" type="data" format="groups" label="group - Group file for the tree"/>
+   <param name="groups" type="select" label="groups - Groups to display" multiple="true">
+    <help>All groups displayed if none are selected.</help>
+    <options>
+     <filter type="data_meta" ref="group" key="groups" />
+    </options>
+   </param>
+   </when>
+   <when value="no"/>
+  </conditional> <!-- use_groups -->
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="seq_count" label="${tool.name} on ${on_string}: seq.count" />
+ </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 count.seqs_ command counts the number of sequences represented by the representative sequence in a name_ file. If a group_ file is given, it will also provide the group count breakdown.
+
+.. _name: http://www.mothur.org/wiki/Name_file
+.. _group: http://www.mothur.org/wiki/Group_file
+.. _count.seqs: http://www.mothur.org/wiki/Count.seqs
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/create.database.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,63 @@
+<tool id="mothur_create_database" name="Create.database" version="1.25.0" >
+ <description>creates a database file from a list, repnames, repfasta and contaxonomy file</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='create.database'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+?\.database$:'$database
+  --outputdir='$logfile.extra_files_path'
+  ## --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  ## --new_datasets='^\S+?\.(unique|[0-9.]*\.cons\.taxonomy)$:cons.taxonomy','^\S+?\.(unique|[0-9.]*\.cons\.tax\.summary)$:tax.summary'
+  --list=$otu
+  --repfasta=$repfasta
+  --repname=$repname
+  --contaxonomy=$contaxonomy
+  #if $label.__str__ != "None" and len($label.__str__) > 0:
+   --label='$label'
+  #end if
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --group='$group'
+  #end if
+ </command>
+ <inputs>
+  <param name="otu" type="data" format="list" label="list - OTU List "/>
+  <param name="repfasta" type="data" format="fasta" label="repfasta - rep.fasta"
+         help="fasta file output by get.oturep"/>
+  <param name="repname" type="data" format="names" label="repname - rep.names"
+         help="names file output by get.oturep"/>
+  <param name="contaxonomy" type="select" format="cons.taxonomy" label="contaxonomy - Consensus Taxonomy"
+         help="consensus taxonomy file output by classify.otu"/>
+  <param name="group" type="data" format="groups" optional="true" label="group - Groups for summary file"/>
+  <param name="label" type="select" label="label - OTU Labels" multiple="true">
+   <options>
+    <filter type="data_meta" ref="otu" key="labels" />
+   </options>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="tabular" name="database" label="${tool.name} on ${on_string}: database" />
+ </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 create.database_ command reads a list_ file, .cons.taxonomy, .rep.fasta, .rep.names and optional group file, and creates a database file. 
+
+.. _list: http://www.mothur.org/wiki/List_file
+.. _create.database: http://www.mothur.org/wiki/Create.database
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/degap.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/degap.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_degap_seqs" name="Degap.seqs" version="1.19.0">
+<tool id="mothur_degap_seqs" name="Degap.seqs" version="1.20.0">
  <description>Remove gap characters from sequences</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -12,7 +12,7 @@
  </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_source="fasta" name="out_fasta" label="${tool.name} on ${on_string}: fasta" />
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/deunique.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/deunique.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_deunique_seqs" name="Deunique.seqs" version="1.19.0">
+<tool id="mothur_deunique_seqs" name="Deunique.seqs" version="1.20.0">
  <description>Return all sequences</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -14,7 +14,7 @@
  </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_source="fasta" name="out_fasta" label="${tool.name} on ${on_string}: fasta" />
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/deunique.tree.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,42 @@
+<tool id="mothur_deunique_tree" name="Deunique.tree" version="1.20.0">
+ <description>Reinsert the redundant sequence identiers back into a unique tree.</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='deunique.tree'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.deunique\.tre$:'$out_tree
+  --outputdir='$logfile.extra_files_path'
+  --tree=$tree
+  --name=$names
+ </command>
+ <inputs>
+  <param name="tree" type="data" format="tre" label="tree - Sequences to filter"/>
+  <param name="names" type="data" format="names" label="names - Sequences Name reference"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format_source="tree" name="out_tree" label="${tool.name} on ${on_string}: deunique.tre" />
+ </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.tree_ command is the reinserts the redundant sequence identiers back into a unique tree using a name_ file. 
+
+.. _name: http://www.mothur.org/wiki/Name_file
+.. _deunique.tree: http://www.mothur.org/wiki/Deunique.tree
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/dist.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/dist.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -16,7 +16,7 @@
   #if len($output.__str__) > 0:
    --output=$output
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="align" label="fasta - Alignment Fasta"/>
--- a/mothur/tools/mothur/dist.shared.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/dist.shared.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_dist_shared" name="Dist.shared" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_dist_shared" name="Dist.shared" version="1.25.0" force_history_refresh="True">
  <description>Generate a phylip-formatted dissimilarity distance matrix among multiple groups</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -9,12 +9,12 @@
    --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'
+     --new_datasets='^\S+?\.([a-z]+\.(unique|[0-9.]*)\.(square|lt)(\.(ave|std))?)\.dist$:square.dist'
     #elif $output.__str__ == 'lt':
-     --new_datasets='^\S+?\.([a-z]+\.(unique|[0-9.]*)\.(square|lt))\.dist$:lower.dist'
+     --new_datasets='^\S+?\.([a-z]+\.(unique|[0-9.]*)\.(square|lt)(\.(ave|std))?)\.dist$:lower.dist'
     #end if
    #else:
-    --new_datasets='^\S+?\.([a-z]+\.(unique|[0-9.]*)\.(square|lt))\.dist$:lower.dist'
+    --new_datasets='^\S+?\.([a-z]+\.(unique|[0-9.]*)\.(square|lt)(\.(ave|std))?)\.dist$:lower.dist'
    #end if
   #end if
   --shared=$otu
@@ -27,35 +27,87 @@
   #if $calc.__str__ != "None" and len($calc.__str__) > 0:
    --calc=$calc
   #end if
+  #if $subsampling.use:
+   #if len($subsampling.subsample.__str__) > 0 and int($subsampling.subsample.__str__) > 0:
+    --subsample=$subsampling.subsample
+   #else
+    --subsample=T
+   #end if
+   #if len($subsampling.iters.__str__) > 0 and int($subsampling.iters.__str__) > 0:
+    --iters=$subsampling.iters
+   #end if
+  #end if
   #if $output.__str__ != "None" and len($output.__str__) > 0:
    --output=$output
   #end if
+  --processors=8
  </command>
  <inputs>
   <!-- list,group  or shared -->
   <param name="otu" type="data" format="shared" label="shared - OTU Shared"/>
   <param name="label" type="select" label="label - OTU Labels to calculate" 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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="groups" type="select" label="groups - Groups to analyze" 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>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
   <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
-   <options from_file="mothur_calculators.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>
+   <option value="sharedsobs">sharedsobs - Shared community richness the observed richness shared between two or more samples</option>
+   <option value="sharedchao">sharedchao - Shared community richness the two or more sample shared Chao1 richness estimator</option>
+   <option value="sharedace">sharedace - Shared community richness the two sample shared ACE richness estimator</option>
+   <option value="anderberg">anderberg - Community Membership Similarity the Anderberg similarity coefficient</option>
+   <option value="jclass" selected="true">jclass - Community Membership Similarity the traditional Jaccard similarity coefficient based on the observed richness</option>
+   <option value="jest">jest - Community Membership Similarity the Jaccard similarity coefficient based on the Chao1 estimated richnesses</option>
+   <option value="kulczynski">kulczynski - Community Membership Similarity the Kulczynski similarity coefficient</option>
+   <option value="kulczynskicody">kulczynskicody - Community Membership Similarity the Kulczynski-Cody similarity coefficient</option>
+   <option value="kstest">kstest - Community Membership Similarity Kolmogorov-Smirnov test</option>
+   <option value="lennon">lennon - Community Membership Similarity the Lennon similarity coefficient</option>
+   <option value="ochiai">ochiai - Community Membership Similarity the Ochiai similarity coefficient</option>
+   <option value="sorclass">sorclass - Community Membership Similarity the Sorenson similarity coefficient based on the observed richness</option>
+   <option value="sorest">sorest - Community Membership Similarity the Sorenson similarity coefficient based on the Chao1 estimated richnesses</option>
+   <option value="whittaker">whittaker - Community Membership Similarity the Whittaker similarity coefficient</option>
+   <option value="hamming">hamming - Community Membership Similarity -</option>
+   <option value="memchi2">memchi2 - Community Membership Similarity -</option>
+   <option value="memchord">memchord - Community Membership Similarity -</option>
+   <option value="memeuclidean">memeuclidean - Community Membership Similarity -</option>
+   <option value="mempearson">mempearson - Community Membership Similarity -</option>
+   <option value="braycurtis">braycurtis - Community Structure Similarity the Bray-Curtis similarity coefficient</option>
+   <option value="jabund">jabund - Community Structure Similarity the abundance-based Jaccard similarity coefficient</option>
+   <option value="morisitahorn">morisitahorn - Community Structure Similarity the Morisita-Horn similarity coefficient</option>
+   <option value="sorabund">sorabund - Community Structure Similarity the abundance-based Sorenson similarity coefficient</option>
+   <option value="thetan">thetan - Community Structure Similarity the Smith theta similarity coefficient</option>
+   <option value="thetayc" selected="true">thetayc - Community Structure Similarity the Yue &amp; Clayton theta similarity coefficient</option>
+   <option value="canberra">canberra - Community Structure Similarity -</option>
+   <option value="gower">gower - Community Structure Similarity -</option>
+   <option value="hellinger">hellinger - Community Structure Similarity -</option>
+   <option value="manhattan">manhattan - Community Structure Similarity -</option>
+   <option value="odum">odum - Community Structure Similarity -</option>
+   <option value="soergel">soergel - Community Structure Similarity -</option>
+   <option value="spearman">spearman - Community Structure Similarity -</option>
+   <option value="speciesprofile">speciesprofile - Community Structure Similarity -</option>
+   <option value="structchi2">structchi2 - Community Structure Similarity -</option>
+   <option value="structchord">structchord - Community Structure Similarity -</option>
+   <option value="structeuclidean">structeuclidean - Community Structure Similarity -</option>
+   <option value="structkulczynski">structkulczynski - Community Structure Similarity -</option>
+   <option value="structpearson">structpearson - Community Structure Similarity -</option>
+   <option value="sharednseqs">sharednseqs - Utility the number of sequences in two samples</option>
+   <option value="sharedobserved">sharedobserved - Utility the number of sequences in two samples</option>
   </param>
+  <conditional name="subsampling">
+   <param name="use" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="subsample"/>
+   <when value="yes">
+    <param name="subsample" type="integer" value="" optional="true" label="subsample (defaults to the size of the smallest group)"
+           help="Should not exceed the number of sequences in any group"/>
+    <param name="iters" type="integer" value="" optional="true" label="iters - Number of iterations to try (default 1000)">
+      <validator type="in_range" message="Number of iterations must be positive" min="1"/>
+    </param>
+   </when>
+   <when value="no"/>
+  </conditional> <!-- subsampling -->
   <param name="output" type="select" label="output - Distance Matrix Output Format" help="A Distance Matrix will be generated for each calculator label pair">
    <option value="lt">Phylip formatted Lower Triangle Matrix</option>
    <option value="square">Phylip formatted Square Matrix</option>
--- a/mothur/tools/mothur/fastq.info.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/fastq.info.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_fastq_info" name="Fastq.info" version="1.19.0">
+<tool id="mothur_fastq_info" name="Fastq.info" version="1.24.0">
  <description>Convert fastq to fasta and quality</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -9,11 +9,17 @@
  </command>
  <inputs>
   <param name="fastq" type="data" format="fastq" label="fastq - Fastq Sequence file"/>
+  <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" />
  </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"/>
+  <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>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/filter.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/filter.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -30,7 +30,7 @@
   #if $hard.__str__ != "None" and len($hard.__str__) > 0:
    --hard=$hard
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="align" label="fasta - Alignment Fasta"/>
--- a/mothur/tools/mothur/get.groups.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.groups.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_get_groups" name="Get.groups" version="1.19.0">
+<tool id="mothur_get_groups" name="Get.groups" version="1.24.0">
  <description>Select groups</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -9,50 +9,72 @@
   --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
+  #if $groupnames.source == 'groups':
+   #if $groupnames.groups.__str__ != "None" and len($groupnames.groups.__str__) > 0:
+    --groups=$groupnames.groups
+   #end if
+  #else
+   #if $groupnames.accnos.__str__ != "None" and len($groupnames.accnos.__str__) > 0:
+    --accnos=$groupnames.accnos
+   #end if
   #end if
   #if $fasta_in.__str__ != "None" and len($fasta_in.__str__) > 0:
    --fasta=$fasta_in
-   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($fasta_in.__str__)) + ":'" + $fasta_out.__str__]
+   #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__]
+   #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__]
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.pick\\.\2',$os.path.basename($list_in.__str__)) + ":'" + $list_out.__str__]
+  #end if
+  #if $shared_in.__str__ != "None" and len($shared_in.__str__) > 0:
+   --shared=$shared_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.*\\.pick\\.\2',$os.path.basename($shared_in.__str__)) + ":'" + $shared_out.__str__]
   #end if
   #if $taxonomy_in.__str__ != "None" and len($taxonomy_in.__str__) > 0:
    --taxonomy=$taxonomy_in
-   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($taxonomy_in.__str__)) + ":'" + $taxonomy_out.__str__]
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.pick\\.\2',$os.path.basename($taxonomy_in.__str__)) + ":'" + $taxonomy_out.__str__]
+  #end if
+  #if $design_in.__str__ != "None" and len($design_in.__str__) > 0:
+   --design=$design_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.*\\.pick\\.\2',$os.path.basename($design_in.__str__)) + ":'" + $design_out.__str__]
   #end if
   --result=#echo ','.join($results)
  </command>
  <inputs>
   <param name="group_in" type="data" format="groups" label="group - Groups"/>
-  <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"/>
+  <conditional name="groupnames">
+   <param name="source" type="select" label="Select Group Names from">
+    <option value="groups">A List of Group Names</option>
+    <option value="accnos">A History Group Name Accnos Dataset</option>
+   </param>
+   <when value="groups">
+    <param name="groups" type="select" label="groups - Pick groups to include" multiple="true">
+     <options>
+      <filter type="data_meta" ref="group_in" key="groups" />
+     </options>
+    </param>
+   </when>
+   <when value="accnos">
+    <param name="accnos" type="data" format="accnos" label="accnos - Group Names from your history"/>
+   </when>
+  </conditional>
+  <param name="fasta_in" type="data" format="fasta,align" optional="true" label="fasta - Fasta Sequences"/>
   <param name="name_in" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
   <param name="list_in" type="data" format="list" optional="true" label="list - OTU List"/>
+  <param name="shared_in" type="data" format="shared" optional="true" label="shared - OTU Shared"/>
   <param name="taxonomy_in" type="data" format="seq.taxonomy" optional="true" label="taxonomy - Taxonomy"/>
+  <param name="design_in" type="data" format="tabular" optional="true" label="design - assign groups to new grouping"
+         help="design has 2 columns: group(col 1) and grouping(col 2) (separated by a TAB character) use make.design"/>
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
   <data format="groups" name="group_out" label="${tool.name} on ${on_string}: pick.groups"/>
   <!-- fix format -->
-  <data format="fasta" name="fasta_out" label="${tool.name} on ${on_string}: pick.fasta">
+  <data format_source="fasta_in" name="fasta_out" label="${tool.name} on ${on_string}: pick.fasta">
    <filter>fasta_in != None</filter>
   </data>
   <data format="names" name="name_out" label="${tool.name} on ${on_string}: pick.name">
@@ -61,9 +83,15 @@
   <data format="list" name="list_out" label="${tool.name} on ${on_string}: pick.list">
    <filter>list_in != None</filter>
   </data>
+  <data format="shared" name="shared_out" label="${tool.name} on ${on_string}: pick.shared">
+   <filter>shared_in != None</filter>
+  </data>
   <data format="seq.taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy">
    <filter>taxonomy_in != None</filter>
   </data>
+  <data format="design" name="design_out" label="${tool.name} on ${on_string}: pick.design">
+   <filter>design_in != None</filter>
+  </data>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
@@ -81,8 +109,12 @@
 
 **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. 
+The get.groups_ command selects sequences from a specific group or set of groups from the following file types: fasta, fasta, name_, group_, list_, taxonomy_.
 
+.. _name: http://www.mothur.org/wiki/Name_file
+.. _group: http://www.mothur.org/wiki/Group_file
+.. _list: http://www.mothur.org/wiki/List_file
+.. _taxonomy: http://www.mothur.org/wiki/Taxonomy_outline
 .. _get.groups: http://www.mothur.org/wiki/Get.groups
 
 
--- a/mothur/tools/mothur/get.lineage.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.lineage.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_get_lineage" name="Get.lineage" version="1.19.0">
+<tool id="mothur_get_lineage" name="Get.lineage" version="1.20.0">
  <description>Picks by taxon</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -9,7 +9,7 @@
   --cmd='get.lineage'
   --outputdir='$logfile.extra_files_path'
   --taxonomy=$taxonomy
-  --taxon="'$re.sub('\(\d+\)','',$taxon.value.__str__)'"
+  --taxon="'$re.sub('(\s|,)+',',',$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__]
@@ -35,14 +35,17 @@
  </command>
  <inputs>
   <param name="taxonomy" type="data" format="seq.taxonomy" label="taxonomy - Taxonomy"/>
-  <param name="taxons" type="select" size="120" label="Browse Taxons from Taxonomy">
+  <!--
+  <param name="taxons" type="select" size="120" multiple="true" 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" />
+    <filter type="sort_by" name="sorted_taxon" column="1" />
    </options>
   </param>
-  <param name="taxon" type="text" size="120" label="taxon - Select Taxon for filtering"/>
+  -->
+  <param name="taxon" type="text" area="True" size="5x120" label="taxon - Select Taxons for filtering" help="Enter 1 or more taxons separated by whitespace or commas"/>
   <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"/>
@@ -53,7 +56,7 @@
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
   <data format="seq.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">
+  <data format_source="fasta_in" 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">
--- a/mothur/tools/mothur/get.otulist.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.otulist.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -22,9 +22,8 @@
  <inputs>
   <param name="list_in" type="data" format="list" label="list - OTU List"/>
   <param name="label" type="select" multiple="true" label="label - select OTU distance labels" help="By default, uses all if none are selected.">
-   <options from_dataset="list_in">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
+   <options>
+    <filter type="data_meta" ref="list_in" key="labels" />
    </options>
   </param>
   <param name="sort" type="select" label="sort - select the output format">
--- a/mothur/tools/mothur/get.oturep.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.oturep.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_get_oturep" name="Get.oturep" version="1.19.0"  force_history_refresh="True">
+<tool id="mothur_get_oturep" name="Get.oturep" version="1.23.0"  force_history_refresh="True">
  <description>Generate a fasta with a representative sequence for each OTU</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -7,9 +7,11 @@
   --outputdir='$logfile.extra_files_path'
   #if $as_datasets.__str__ == "yes":
    --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'
+   --new_datasets='^\S+?\.((unique|[0-9.]*)(\S+)\.rep\.fasta)$:${fasta.ext}','^\S+?\.((unique|[0-9.]*)(\S+)\.rep\.names)$:names'
   #end if
-  --fasta=$fasta
+  #if $fasta.__str__ != "None" and len($fasta.__str__) > 0:
+   --fasta=$fasta
+  #end if
   --list=$otu_list
   #if $input.source == 'column':
    --column=$input.dist
@@ -38,7 +40,6 @@
  </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 Format">
@@ -54,6 +55,7 @@
     <param name="name" type="data" format="names" optional="true" label="name - Names"/>
    </when>
   </conditional>
+  <param name="fasta" type="data" format="fasta" optional="true" label="fasta - Fasta"/>
   <conditional name="pick">
    <param name="type" type="select" label="Parse a group file into abundant and rare groups?" help="">
     <option value="no" selected="true">No</option>
@@ -63,18 +65,15 @@
    <when value="yes">
     <param name="group" type="data" format="groups" label="group - Group file for the OTU List"/>
     <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>
+      <filter type="data_meta" ref="group" key="groups" />
      </options>
     </param>
    </when>
   </conditional> <!-- pick -->
   <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>
+    <filter type="data_meta" ref="otu_list" key="labels" />
    </options>
   </param>
   <param name="sorted" type="select" label="sorted - Sort Sequences by">
--- a/mothur/tools/mothur/get.otus.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.otus.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -27,9 +27,8 @@
   <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>
+    <filter type="data_meta" ref="list_in" key="labels" />
    </options>
   </param>
   <conditional name="groupnames">
@@ -40,10 +39,8 @@
    <when value="groups">
     <param name="groups" type="select" label="groups - Pick groups to include" multiple="true"  force_select="true">
      <help>At least one group must be selected</help>
-     <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>
+      <filter type="data_meta" ref="group_in" key="groups" />
      </options>
     </param>
    </when>
--- a/mothur/tools/mothur/get.rabund.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.rabund.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -18,9 +18,8 @@
  <inputs>
   <param name="otu" type="data" format="list,sabund" label="list,sabund - List or Sabund"/>
   <param name="label" type="select" multiple="true" label="label - select OTU distance labels" help="(all used if none are selected)">
-   <options from_dataset="otu">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
+   <options>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="sorted" type="boolean" checked="false" truevalue="--sorted=true" falsevalue="" label="sorted - sort by abundance" 
--- a/mothur/tools/mothur/get.relabund.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.relabund.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_get_relabund" name="Get.relabund" version="1.19.0">
+<tool id="mothur_get_relabund" name="Get.relabund" version="1.20.0">
  <description>Calculate the relative abundance of each otu</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -20,17 +20,13 @@
   <param name="otu" type="data" format="shared" label="shared - OTU Shared" 
     help="Use Make.shared to create a shared file from a list and a group file"/>
   <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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </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>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
   <param name="scale" type="select" label="scale - Scale by">
--- a/mothur/tools/mothur/get.sabund.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.sabund.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -17,9 +17,8 @@
  <inputs>
   <param name="otu" type="data" format="list,rabund" label="list,rabund - List or Rabund"/>
   <param name="label" type="select" multiple="true" label="label - select OTU distance labels" help="(all used if none are selected)">
-   <options from_dataset="otu">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
+   <options>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
  </inputs>
--- a/mothur/tools/mothur/get.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_get_seqs" name="Get.seqs" version="1.19.0">
+<tool id="mothur_get_seqs" name="Get.seqs" version="1.20.0">
  <description>Picks sequences by name</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -53,11 +53,11 @@
  <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">
+  <data format_source="fasta_in" 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">
+  <data format_source="qfile_in" 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">
@@ -102,6 +102,5 @@
 .. _list.seqs: http://www.mothur.org/wiki/list.seqs
 .. _get.seqs: http://www.mothur.org/wiki/Get.seqs
 
-
  </help>
 </tool>
--- a/mothur/tools/mothur/get.sharedseqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/get.sharedseqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_get_sharedseqs" name="Get.sharedseqs" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_get_sharedseqs" name="Get.sharedseqs" version="1.20.0" force_history_refresh="True">
  <description>Get shared sequences at each distance from list and group</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -23,7 +23,7 @@
   #end if
   #if $fasta.__str__ != "None" and len($fasta.__str__) > 0:
    --fasta=$fasta
-   #set datasets = $datasets + ["'^\S+?\.((unique|[0-9.]*)(\S+)\.shared.fasta)$:fasta'"]
+   #set datasets = $datasets + ["'^\S+?\.((unique|[0-9.]*)(\S+)\.shared.fasta)$:" + $fasta.ext + "'"]
   #end if
   #if $output.__str__ != "None" and len($output.__str__) > 0:
    --output=$output
@@ -39,9 +39,8 @@
   <param name="group" type="data" format="groups" label="group - "/>
   <param name="label" type="select" optional="true" label="label - Select OTU Labels to include" multiple="true" 
      help="By default all are included if no selection is made.">
-   <options from_dataset="list">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
+   <options>
+    <filter type="data_meta" ref="list" key="labels" />
    </options>
   </param>
   <param name="fasta" type="data" format="fasta" optional="true" label="fasta - Dataset"/>
@@ -55,19 +54,15 @@
    <when value="all"/>
    <when value="unique">
     <param name="groups" type="select" label="unique - Group to analyze" 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>
+      <filter type="data_meta" ref="group" key="groups" />
      </options>
     </param>
    </when>
    <when value="shared">
     <param name="groups" type="select" label="shared - Groups to analyze" 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>
+      <filter type="data_meta" ref="group" key="groups" />
      </options>
     </param>
    </when>
@@ -98,7 +93,7 @@
 
 **Command Documenation**
 
-The get.sharedseqs_ command takes a list and group file and outputs a *.shared.seqs file for each distance. This is useful for those cases where you might be interested in identifying sequences that are either unique or shared by specific groups, which you could then classify.
+The get.sharedseqs_ command takes a list and group file and outputs a .shared.seqs file for each distance. This is useful for those cases where you might be interested in identifying sequences that are either unique or shared by specific groups, which you could then classify.
 
 .. _get.sharedseqs: http://www.mothur.org/wiki/Get.sharedseqs
 
--- a/mothur/tools/mothur/heatmap.bin.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/heatmap.bin.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_heatmap_bin" name="Heatmap.bin" version="1.19.0"  force_history_refresh="True">
+<tool id="mothur_heatmap_bin" name="Heatmap.bin" version="1.20.0"  force_history_refresh="True">
  <description>Generate a heatmap for OTUs</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -49,45 +49,35 @@
    <when value="default">
      <param name="otu" type="data" format="shared,relabund" label="shared,relabund - OTU List"/>
      <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>
+       <filter type="data_meta" ref="otu" key="groups" />
       </options>
      </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"/>
-       <filter type="unique_value" name="unq_lbl" column="0" />
+      <options>
+       <filter type="data_meta" ref="otu" key="labels" />
       </options>
      </param>
    </when>
    <when value="no">
      <param name="otu" type="data" format="list,rabund,sabund" label="list,rabund,sabund - 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>
+       <filter type="data_meta" ref="otu" key="labels" />
       </options>
      </param>
    </when>
    <when value="yes">
      <param name="otu" type="data" format="list,rabund,sabund" label="list,rabund,sabund - OTU List"/>
-     <param name="otu_group" type="data" format="groups" label="read.otu(group) - Group file for the OTU List"/>
+     <param name="otu_group" type="data" format="groups" label="group - Group file for the OTU List"/>
      <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>
+       <filter type="data_meta" ref="otu_group" key="groups" />
       </options>
      </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"/>
-       <filter type="unique_value" name="unq_lbl" column="0" />
+      <options>
+       <filter type="data_meta" ref="otu" key="labels" />
       </options>
      </param>
    </when>
--- a/mothur/tools/mothur/heatmap.sim.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/heatmap.sim.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_heatmap_sim" name="Heatmap.sim" version="1.19.0"  force_history_refresh="True">
+<tool id="mothur_heatmap_sim" name="Heatmap.sim" version="1.23.0"  force_history_refresh="True">
  <description>Generate a heatmap for pariwise similarity</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -32,6 +32,9 @@
   #elif $input.source == 'phylip':
    --phylip=$input.dist
   #end if
+  #if 100 > $fontsize > 0:
+   --fontsize=$fontsize
+  #end if
  </command>
  <inputs>
   <conditional name="input">
@@ -41,28 +44,28 @@
     <option value="column">colomn - Pairwise Column Distance Matrix</option>
    </param>
    <when value="shared">
-    <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+    <param name="otu" type="data" format="shared" label="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>
+       <filter type="data_meta" ref="otu" key="labels" />
       </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>
+       <filter type="data_meta" ref="otu" key="groups" />
       </options>
      </param>
      <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
-      <options from_file="mothur_calculators.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>
+      <option value="jclass">jclass - Community Membership Similarity the traditional Jaccard similarity coefficient based on the observed richness</option>
+      <option value="jest" selected="true">jest - Community Membership Similarity the Jaccard similarity coefficient based on the Chao1 estimated richnesses</option>
+      <option value="sorclass">sorclass - Community Membership Similarity the Sorenson similarity coefficient based on the observed richness</option>
+      <option value="sorest">sorest - Community Membership Similarity the Sorenson similarity coefficient based on the Chao1 estimated richnesses</option>
+      <option value="braycurtis">braycurtis - Community Structure Similarity the Bray-Curtis similarity coefficient</option>
+      <option value="jabund">jabund - Community Structure Similarity the abundance-based Jaccard similarity coefficient</option>
+      <option value="morisitahorn">morisitahorn - Community Structure Similarity the Morisita-Horn similarity coefficient</option>
+      <option value="sorabund">sorabund - Community Structure Similarity the abundance-based Sorenson similarity coefficient</option>
+      <option value="thetan">thetan - Community Structure Similarity the Smith theta similarity coefficient</option>
+      <option value="thetayc" selected="true">thetayc - Community Structure Similarity the Yue &amp; Clayton theta similarity coefficient</option>
      </param>
    </when>
    <when value="column">
@@ -73,6 +76,7 @@
        <param name="dist" type="data" format="lower.dist,square.dist" label="phylip - Distance Matrix"/>
    </when>
   </conditional>
+  <param name="fontsize" type="integer" value="24" label="fontsize - Fontsize (default is 24)"/>
   <param name="as_datasets" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Create a new history dataset for each image"/>
  </inputs>
  <outputs>
--- a/mothur/tools/mothur/indicator.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/indicator.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_indicator" name="Indicator" version="1.19.0">
+<tool id="mothur_indicator" name="Indicator" version="1.21.0">
  <description>Identify indicator "species" for nodes on a tree</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -6,7 +6,9 @@
   #import re, os.path
   --cmd='indicator'
   --outputdir='$logfile.extra_files_path'
-  --tree=$tree
+  #if $tree.__str__ != "None" and len($tree.__str__) > 0:
+   --tree=$tree
+  #end if
   #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__):
@@ -22,31 +24,31 @@
    --design=$design
   #end if
   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.indicator.tre$:'$tree_out,'^\S+\.indicator.summary$:'$summary
+  --processors=8
  </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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </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>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
+  <param name="tree" type="data" format="tree"  optional="true" label="tree - A newick-formatted tree" 
+         help="Optional, if a design file is provided."/>
   <param name="design" type="data" format="tabular" optional="true" label="design - assign groups to new grouping"
          help="design has 2 columns: group(col 1) and grouping(col 2) (separated by a TAB character)"/>
  </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"/>
+  <data format="tre" name="tree_out" label="${tool.name} on ${on_string}: indicator.tre">
+   <filter>tree != None</filter>
+  </data>
+  <data format="tabular" name="summary" label="${tool.name} on ${on_string}: indicator.summary"/>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
@@ -64,9 +66,10 @@
 
 **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.
+The indicator_ command reads a shared_ or relabund_ file and a tree file, and outputs a .indicator.summary file and when a tree file is given a .indicator.tre file. The summary file lists the indicator value for each OTU for each node.  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. 
 
 .. _shared: http://www.mothur.org/wiki/Shared_file
+.. _relabund: http://www.mothur.org/wiki/Get.relabund
 .. _indicator: http://www.mothur.org/wiki/Indicator
 
 
--- a/mothur/tools/mothur/libshuff.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/libshuff.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -27,10 +27,8 @@
   <param name="dist" type="data" format="lower.dist,square.dist" label="phylip - Distance Matrix"/>
   <param name="group" type="data" format="groups" label="group - Groups"/>
   <param name="groups" type="select" label="groups - Groups to condider" 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>
+    <filter type="data_meta" ref="group" key="groups" />
    </options>
   </param>
   <param name="iters" type="integer" value="10000" label="iters - Number of iterations to try (default 10000)"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/make.biom.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,72 @@
+<tool id="mothur_make_biom" name="Make.biom" version="1.25.0" force_history_refresh="True">
+ <description>Make biom files from a shared file</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  --cmd='make.biom'
+  --result='^mothur.\S+\.logfile$:'$logfile
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.((\S+)\.biom)$:biom'
+  --shared=$shared
+  #if $contaxonomy != 'none' and len($contaxonomy.__str__) > 0:
+   --contaxonomy=$contaxonomy
+  #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
+  --matrixtype=$matrixtype
+ </command>
+ <inputs>
+  <param name="shared" type="data" format="shared" label="shared - OTU Shared file"/>
+  <param name="contaxonomy" type="data" format="cons.taxonomy" label="contaxonomy - consensus taxonomy"
+         help="The contaxonomy file is the taxonomy file outputted by classify.otu"/>
+  <param name="matrixtype" type="select" label="matrixtype - sparse or dense">
+    <option value="sparse">sparse</option>
+    <option value="dense">dense</option>
+  </param>
+  <param name="groups" type="select" label="groups - Groups to include" multiple="true"
+     help="By default all are included if no selection is made.">
+   <options>
+    <filter type="data_meta" ref="shared" key="groups" />
+   </options>
+  </param>
+  <param name="label" type="select" optional="true" label="label - Select OTU Labels to include" multiple="true" 
+     help="By default all are included if no selection is made.">
+   <options>
+    <filter type="data_meta" ref="shared" key="labels" />
+   </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 make.biom command converts a shared_ shared file to biom_ files. 
+The output can be filtered by groups and labels.
+
+
+.. _shared: http://www.mothur.org/wiki/Shared_file
+.. _biom:  http://biom-format.org/documentation/biom_format.html
+.. _make.biom: http://www.mothur.org/wiki/Make.biom
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/make.design.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/make.design.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -7,10 +7,8 @@
     <repeat name="groupings" title="Grouping">
      <param name="name" type="text" label="Name for a new combined grouping"/>
      <param name="groups" type="select" multiple="true" label="Select groups for to include in this grouping">
-      <options from_dataset="source">
-       <column name="name" index="1"/>
-       <column name="value" index="1"/>
-       <filter type="unique_value" name="unq_grp" column="1" />
+      <options>
+       <filter type="data_meta" ref="source" key="groups" />
       </options>
      </param>
     </repeat>
--- a/mothur/tools/mothur/make.fastq.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/make.fastq.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -2,7 +2,7 @@
  <description>Convert fasta and quality to fastq</description>
  <command interpreter="python">
   mothur_wrapper.py 
-  --cmd='fastq.info'
+  --cmd='make.fastq'
   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.fastq$:'$fastq
   --outputdir='$logfile.extra_files_path'
   --fasta=$fasta
@@ -14,7 +14,14 @@
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
-  <data format="fastq" name="fastq" label="${tool.name} on ${on_string}: fastq"/>
+  <data format="fastq" name="fastq" label="${tool.name} on ${on_string}: fastq">
+   <change_format>
+    <when input="qfile.ext" value="qual454" format="fastqsanger"/>
+    <when input="qfile.ext" value="qualillumina" format="fastqillumina"/>
+    <when input="qfile.ext" value="qualsolexa" format="fastqsolexa"/>
+    <when input="qfile.ext" value="qualsolid" format="fastqcssanger"/>
+   </change_format>
+  </data>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/make.shared.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/make.shared.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_make_shared" name="Make.shared" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_make_shared" name="Make.shared" version="1.22.0" force_history_refresh="True">
  <description>Make a shared file from a list and a group</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -16,30 +16,31 @@
    --label='$label'
   #end if
   #if $groups.__str__ != "None" and len($groups.__str__) > 0:
-    --unique=$groups
+    --groups=$groups
   #end if
+  #*
   #if $ordergroup.__str__ != "None" and len($ordergroup.__str__) > 0:
    --ordergroup=$ordergroup
   #end if
+  *#
  </command>
  <inputs>
   <param name="list" type="data" format="list" label="list - OTU List"/>
   <param name="group" type="data" format="groups" label="group - "/>
   <param name="label" type="select" optional="true" label="label - Select OTU Labels to include" multiple="true" 
      help="By default all are included if no selection is made.">
-   <options from_dataset="list">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
+   <options>
+    <filter type="data_meta" ref="list" key="labels" />
    </options>
   </param>
   <param name="groups" type="select" label="groups - Groups to include" 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>
+    <filter type="data_meta" ref="group" key="groups" />
    </options>
   </param>
+  <!--
   <param name="ordergroup" type="data" format="groups" optional="true" label="ordergroup - one column list of group names in desired order"/>
+  -->
   <param name="as_datasets" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Create a new history dataset for each group rabund"/>
  </inputs>
  <outputs>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/make.shared_from_biom.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,59 @@
+<tool id="mothur_make_shared_from_biom" name="Make.shared " version="1.25.0" force_history_refresh="True">
+ <description>Make a shared file from a biom file</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  --cmd='make.shared'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.shared$:'$shared
+  --outputdir='$logfile.extra_files_path'
+  #if $as_datasets.__str__ == "yes":
+   --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+   --new_datasets='^\S+?\.((\S+)\.rabund)$:rabund'
+  #end if
+  --biom=$biom
+  #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
+ </command>
+ <inputs>
+  <param name="biom" type="data" format="biom" label="biom -  The Biological Observation Matrix"/>
+  <param name="label" type="text" size="40" label="label - to restrict to these OTU Labels" 
+     help="multiple labels separated by hyphens, example: unique-0.02-0.04"/>
+  <param name="groups" type="text" size="40" label="groups - restrict to these groups"
+     help="multiple groups separated by hyphens, example: control-group1-group2"/>
+  <param name="as_datasets" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Create a new history dataset for each group rabund"/>
+ </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 make.shared_ command takes a list_ and a group_ file and outputs a shared_ file, as well as a rabund_ file for each group.
+
+
+.. _list: http://www.mothur.org/wiki/List_file
+.. _group: http://www.mothur.org/wiki/Group_file
+.. _shared: http://www.mothur.org/wiki/Shared_file
+.. _rabund: http://www.mothur.org/wiki/Rabund_file
+.. _make.shared: http://www.mothur.org/wiki/Make.shared
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/merge.groups.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/merge.groups.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,12 +1,19 @@
-<tool id="mothur_merge_groups" name="Merge.groups" version="1.19.0" >
+<tool id="mothur_merge_groups" name="Merge.groups" version="1.24.0" >
  <description>Merge groups in a shared file</description>
  <command interpreter="python">
   mothur_wrapper.py 
   --cmd='merge.groups'
   ## 98_sq_phylip_amazon.fn.merge.shared
-  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.merge\.\S+$:'$shared
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
   --outputdir='$logfile.extra_files_path'
-  --shared=$otu
+  #if $otu.__str__ != "None" and len($otu.__str__) > 0:
+   --shared=$otu
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.merge.\2',$os.path.basename($otu.__str__)) + ":'" + $merge_shared.__str__]
+  #end if
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --group=$group
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.merge.\2',$os.path.basename($group.__str__)) + ":'" + $merge_group.__str__]
+  #end if
   #if $design.source == 'hist':
    --design=$design_dataset
   #else:
@@ -18,21 +25,19 @@
   #if $label.__str__ != "None" and len($label.__str__) > 0:
    --label='$label'
   #end if
+  --result=#echo ','.join($results)
  </command>
  <inputs>
-  <param name="otu" type="data" format="shared" label="shared - OTU Shared Dataset"/>
+  <param name="otu" type="data" format="shared" optional="true" label="shared - OTU Shared Dataset"/>
+  <param name="group" type="data" format="groups" optional="true" label="group - Group Dataset"/>
   <param name="groups" type="select" optional="true" label="groups - Pick 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>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
   <param name="label" type="select" label="label - Pick OTU Labels to include" optional="true" 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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <conditional name="design">
@@ -48,10 +53,8 @@
     <repeat name="groupings" title="Grouping">
      <param name="name" type="text" label="Name for a new combined grouping"/>
      <param name="groups" type="select" multiple="true" label="Select groups for to include in this grouping">
-      <options from_dataset="otu">
-       <column name="name" index="1"/>
-       <column name="value" index="1"/>
-       <filter type="unique_value" name="unq_grp" column="1" />
+      <options>
+       <filter type="data_meta" ref="otu" key="groups" />
       </options>
      </param>
     </repeat>
@@ -74,7 +77,12 @@
  </configfiles>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
-  <data format="shared" name="shared" label="${tool.name} on ${on_string}: merge.shared" />
+  <data format="shared" name="merged_shared" label="${tool.name} on ${on_string}: merge.shared" >
+    <filter>otu != None</filter>
+  </data>
+  <data format="groups" name="merged_group" label="${tool.name} on ${on_string}: merge.groups" >
+    <filter>groups != None</filter>
+  </data>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/metastats.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/metastats.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_metastats" name="Metastats" version="1.19.0" force_history_refresh="True" >
+<tool id="mothur_metastats" name="Metastats" version="1.20.0" force_history_refresh="True" >
  <description>generate principle components plot data</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -26,31 +26,25 @@
   #if $sets.__str__ != "None" and len($sets.__str__) > 0:
    --sets=$sets
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="otu" type="data" format="shared" label="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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </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>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
   <param name="design" type="data" format="tabular" label="design - assign groups to new grouping"
          help="design has 2 columns: group(col 1) and grouping(col 2) (separated by a TAB character) use make.design"/>
   <param name="sets" type="select" label="sets - group sets to analyze" multiple="true">
-   <options from_dataset="design">
-    <column name="name" index="1"/>
-    <column name="value" index="1"/>
-    <filter type="unique_value" name="unq_grp" column="1" />
+   <options>
+    <filter type="data_meta" ref="design" key="groups" />
    </options>
   </param>
   <param name="iters" type="integer" value="1000" label="iters - Number of randomizations (default 1000)"/>
--- a/mothur/tools/mothur/mothur_wrapper.py	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/mothur_wrapper.py	Wed Sep 05 19:49:43 2012 -0500
@@ -4,7 +4,7 @@
 http://www.mothur.org/
 
 Supports mothur version 
-mothur v.1.17.0
+mothur v.1.24.0
 
 Class encapsulating Mothur galaxy tool.
 Expect each invocation to include:
@@ -28,7 +28,7 @@
  # 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
+ ## Before version 1.18.0 Many mothur commands first required 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
@@ -46,7 +46,7 @@
 
 debug = False
 #debug = True
-max_processors = 2
+max_processors = os.getenv('MOTHUR_MAX_PROCESSORS') if os.getenv('MOTHUR_MAX_PROCESSORS') else 8
 
 def stop_err( msg ):
     sys.stderr.write( "%s\n" % msg )
@@ -176,235 +176,121 @@
     """
     cmd_dict = dict()
     cmd_dict['align.check'] = dict({'required' : ['fasta','map']})
-   #cmd_dict['align.seqs'] = dict({'required' : ['candidate','template'], 'optional' : ['search','ksize','align','match','mismatch','gapopen','gapextend','flip','threshold','processors']})
-    cmd_dict['align.seqs'] = dict({'required' : ['fasta','reference',], 'optional' : ['search','ksize','align','match','mismatch','gapopen','gapextend','flip','threshold','processors']})
+    cmd_dict['align.seqs'] = dict({'required' : ['fasta','reference',], 'optional' : ['search','ksize','align','match','mismatch','gapopen','gapextend','flip','threshold','save','processors']})
     cmd_dict['amova'] = dict({'required' : ['phylip','design'] ,  'optional' : ['alpha','iters']})
     cmd_dict['anosim'] = dict({'required' : ['phylip','design'] ,  'optional' : ['alpha','iters']})
-   #cmd_dict['bin.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','label','group']})
     cmd_dict['bin.seqs'] = dict({'required' : ['list','fasta'], 'optional' : ['name','label','group']})
-   #cmd_dict['bootstrap.shared'] = dict({'required' : [], 'optional' : ['calc','groups','iters','label']})
     cmd_dict['bootstrap.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','groups','iters','label']})
     #catchall
     cmd_dict['chimera.bellerophon'] = dict({'required' : ['fasta'], 'optional' : ['filter','correction','window','increment','processors']})
-   #cmd_dict['chimera.ccode'] = dict({'required' : ['fasta','template'], 'optional' : ['filter','mask','window','numwanted','processors']})
-    cmd_dict['chimera.ccode'] = dict({'required' : ['fasta','reference'], 'optional' : ['filter','mask','window','numwanted','processors']})
-   #cmd_dict['chimera.check'] = dict({'required' : ['fasta','template'], 'optional' : ['ksize','svg','name','increment','processors']})
-    cmd_dict['chimera.check'] = dict({'required' : ['fasta','reference'], 'optional' : ['ksize','svg','name','increment','processors']})
-   #cmd_dict['chimera.pintail'] = dict({'required' : ['fasta','template'], 'optional' : ['conservation','quantile','filter','mask','window','increment','processors']})
-    cmd_dict['chimera.pintail'] = dict({'required' : ['fasta','reference'], 'optional' : ['conservation','quantile','filter','mask','window','increment','processors']})
-   #cmd_dict['chimera.slayer'] = dict({'required' : ['fasta','template'], 'optional' : ['name','search','window','increment','match','mismatch','numwanted','parents','minsim','mincov','iters','minbs','minsnp','divergence','realign','split','processors']})
-    cmd_dict['chimera.slayer'] = dict({'required' : ['fasta','reference'], 'optional' : ['name','search','window','increment','match','mismatch','numwanted','parents','minsim','mincov','iters','minbs','minsnp','divergence','realign','split','processors']})
-   #cmd_dict['chop.seqs'] = dict({'required' : ['fasta','numbases'],  'optional' : ['keep','short']})
+    cmd_dict['chimera.ccode'] = dict({'required' : ['fasta','reference'], 'optional' : ['filter','mask','window','numwanted','save','processors']})
+    cmd_dict['chimera.check'] = dict({'required' : ['fasta','reference'], 'optional' : ['ksize','svg','name','increment','save','processors']})
+    cmd_dict['chimera.perseus'] = dict({'required' : ['fasta','name'], 'optional' : ['group','sigma']})
+    cmd_dict['chimera.pintail'] = dict({'required' : ['fasta','reference'], 'optional' : ['conservation','quantile','filter','mask','window','increment','save','processors']})
+    cmd_dict['chimera.slayer'] = dict({'required' : ['fasta','reference'], 'optional' : ['name','group','search','window','increment','match','mismatch','numwanted','parents','minsim','mincov','iters','minbs','minsnp','divergence','realign','split','blastlocation','save','processors']})
+    cmd_dict['chimera.uchime'] = dict({'required' : ['fasta'], 'optional' : ['name','group','reference','abskew','chimealns','minh','mindiv','xn','dn','xa','chunks','minchunk','idsmoothwindow','minsmoothid','maxp','skipgaps','skipgaps2','minlen','maxlen','ucl','queryfract','processors']})
     cmd_dict['chop.seqs'] = dict({'required' : ['fasta','numbases'],  'optional' : ['countgaps','keep','short']})
     cmd_dict['classify.otu'] = dict({'required' : ['list','taxonomy'],'optional' : ['name','cutoff','label','group','probs','basis','reftaxonomy']})
-   #cmd_dict['classify.seqs'] = dict({'required' : ['fasta','template','taxonomy'],'optional' : ['name','search','ksize','method','match','mismatch','gapopen','gapextend','numwanted','probs','processors']})
-    cmd_dict['classify.seqs'] = dict({'required' : ['fasta','reference','taxonomy'],'optional' : ['name','search','ksize','method','match','mismatch','gapopen','gapextend','numwanted','probs','processors']})
+    cmd_dict['classify.seqs'] = dict({'required' : ['fasta','reference','taxonomy'],'optional' : ['name','search','ksize','method','match','mismatch','gapopen','gapextend','numwanted','probs','save','processors']})
+    cmd_dict['classify.tree'] = dict({'required' : ['taxonomy','tree'],'optional' : ['name','group','cutoff']})
+    #clear.memory ## not needed in galaxy framework
     cmd_dict['clearcut'] = dict({'required' : [['phylip','fasta']],'optional' : ['seed','norandom','shuffle','neighbor','expblen','expdist','ntrees','matrixout','kimura','jukes','protein','DNA']})
-   #cmd_dict['cluster'] = dict({'required' : [] ,  'optional' : ['method','cutoff','hard','precision']})
     cmd_dict['cluster'] = dict({'required' : [['phylip','column']] ,  'optional' : ['name','method','cutoff','hard','precision','sim','showabund','timing']})
-   #cmd_dict['cluster.classic'] = dict({'required' : ['phylip'] ,  'optional' : ['method','cutoff','hard','precision']})
     cmd_dict['cluster.classic'] = dict({'required' : ['phylip'] ,  'optional' : ['name','method','cutoff','hard','sim','precision']})
     cmd_dict['cluster.fragments'] = dict({'required' : ['fasta'] ,  'optional' : ['name','diffs','percent']})
     cmd_dict['cluster.split'] = dict({'required' : [['fasta','phylip','column']] ,  'optional' : ['name','method','splitmethod','taxonomy','taxlevel','showabund','cutoff','hard','large','precision','timing','processors']})
-   #cmd_dict['collect.shared'] = dict({'required' : [], 'optional' : ['calc','label','freq','groups','all']})
     cmd_dict['collect.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','freq','groups','all']})
-   #cmd_dict['collect.single'] = dict({'required' : [], 'optional' : ['calc','abund','size','label','freq']})
     cmd_dict['collect.single'] = dict({'required' : [['list', 'sabund', 'rabund', 'shared']], 'optional' : ['calc','abund','size','label','freq']})
-    cmd_dict['consensus.seqs'] = dict({'required' : ['fasta'], 'optional' : ['list','name','label']})
+    cmd_dict['consensus.seqs'] = dict({'required' : ['fasta'], 'optional' : ['list','name','label','cutoff']})
+
+    cmd_dict['cooccurrence'] = dict({'required' : ['shared'], 'optional' : ['iters','metric','matrixmodel','groups','label']})
+
     cmd_dict['corr.axes'] = dict({'required' : [['shared','relabund','metadata'],'axes'], 'optional' : ['label','groups','method','numaxes']})
+    cmd_dict['count.groups'] = dict({'required' : ['group','shared'], 'optional' : ['accnos','groups']})
+    cmd_dict['count.seqs'] = dict({'required' : ['name'], 'optional' : ['group','groups']})
+
+    cmd_dict['create.database'] = dict({'required' : ['list, repfasta','repname','contaxonomy'], 'optional' : ['group','label']})
+
     cmd_dict['degap.seqs'] = dict({'required' : ['fasta']})
     cmd_dict['deunique.seqs'] = dict({'required' : ['fasta','name'],  'optional' : []})
-   #cmd_dict['dist.seqs'] = dict({'required' : ['fasta'],  'optional' : ['calc','countends','output','cutoff','processors']})
+    cmd_dict['deunique.tree'] = dict({'required' : ['tree','name'],  'optional' : []})
     cmd_dict['dist.seqs'] = dict({'required' : ['fasta'],  'optional' : ['calc','countends','output','cutoff','oldfasta','column','processors']})
-   #cmd_dict['dist.shared'] = dict({'required' : [], 'optional' : ['calc','label','groups','output']})
-    cmd_dict['dist.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','groups','output']})
-    cmd_dict['fastq.info'] = dict({'required' : ['fastq'], 'optional' : []})
+    cmd_dict['dist.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','groups','output','subsample','iters','processors']})
+    cmd_dict['fastq.info'] = dict({'required' : ['fastq'], 'optional' : ['fasta','qfile']})
     cmd_dict['filter.seqs'] = dict({'required' : ['fasta'],  'optional' : ['vertical','trump','soft','hard','processors']})
-   #cmd_dict['get.group'] = dict({'required' : [], 'optional' : []})
     cmd_dict['get.group'] = dict({'required' : ['shared'], 'optional' : []})
-    cmd_dict['get.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','taxonomy']})
+    cmd_dict['get.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','shared','taxonomy','design']})
     cmd_dict['get.lineage'] = dict({'required' : ['taxonomy','taxon'],'optional' : ['fasta','name','group','list','alignreport','dups']})
-  ##cmd_dict['get.otulist'] = dict({'required' : [], 'optional' : []})
     cmd_dict['get.otulist'] = dict({'required' : ['list'], 'optional' : ['label','sort']})
-   #cmd_dict['get.oturep'] = dict({'required' : ['fasta','list'], 'optional' : ['phylip','column','name','label','group','groups','sorted','precision','cutoff','large','weighted']})
-    cmd_dict['get.oturep'] = dict({'required' : ['fasta','list',['phylip','column']], 'optional' : ['name','label','group','groups','sorted','precision','cutoff','large','weighted']})
+    cmd_dict['get.oturep'] = dict({'required' : ['list',['phylip','column']], 'optional' : ['fasta','name','label','group','groups','sorted','precision','cutoff','large','weighted']})
     cmd_dict['get.otus'] = dict({'required' : ['group','list','label'], 'optional' : ['groups','accnos']})
-  ##cmd_dict['get.rabund'] = dict({'required' : [],'optional' : []})
     cmd_dict['get.rabund'] = dict({'required' : [['list','sabund']],'optional' : ['sorted','label']})
-   #cmd_dict['get.relabund'] = dict({'required' : [],'optional' : ['scale','label','groups']})
     cmd_dict['get.relabund'] = dict({'required' : ['shared'],'optional' : ['scale','label','groups']})
-  ##cmd_dict['get.sabund'] = dict({'required' : [],'optional' : []})
     cmd_dict['get.sabund'] = dict({'required' : [['list','rabund']],'optional' : ['label']})
     cmd_dict['get.seqs'] = dict({'required' : ['accnos',['fasta','qfile','name','group','list','alignreport','taxonomy']], 'optional' : ['dups']})
-  ##cmd_dict['get.sharedseqs'] = dict({'required' : [], 'optional' : []})
     cmd_dict['get.sharedseqs'] = dict({'required' : ['list','group'], 'optional' : ['label', 'unique', 'shared', 'output', 'fasta']})
     cmd_dict['hcluster'] = dict({'required' : [['column','phylip']] , 'optional' : ['name','method','cutoff','hard','precision','sorted','showabund','timing']})
-   #cmd_dict['heatmap.bin'] = dict({'required' : [], 'optional' : ['label','groups','scale','sorted','numotu','fontsize']})
     cmd_dict['heatmap.bin'] = dict({'required' : [['list', 'sabund', 'rabund', 'shared']], 'optional' : ['label','groups','scale','sorted','numotu','fontsize']})
-   #cmd_dict['heatmap.sim'] = dict({'required' : [], 'optional' : ['calc','phylip','column','name','label','groups']})
-    cmd_dict['heatmap.sim'] = dict({'required' : [['shared','phylip','column']], 'optional' : ['calc','name','label','groups']})
+    cmd_dict['heatmap.sim'] = dict({'required' : [['shared','phylip','column']], 'optional' : ['calc','name','label','groups','fontsize']})
     cmd_dict['homova'] = dict({'required' : ['phylip','design'] ,  'optional' : ['alpha','iters']})
-    cmd_dict['indicator'] = dict({'required' : ['tree',['shared','relabund']], 'optional' : ['groups','label','design']})
-   #cmd_dict['libshuff'] = dict({'required' : [],'optional' : ['iters','form','step','cutoff']})
+    cmd_dict['indicator'] = dict({'required' : [['tree','design'],['shared','relabund']], 'optional' : ['groups','label','processors']})
     cmd_dict['libshuff'] = dict({'required' : ['phylip','group'],'optional' : ['groups','iters','form','sim','step','cutoff']})
     cmd_dict['list.seqs'] = dict({'required' : [['fasta','name','group','list','alignreport','taxonomy']]})
-    cmd_dict['make,fastq'] = dict({'required' : ['fasta','qfile'] ,  'optional' : []})
-   #cmd_dict['make.group'] = dict({'required' : ['fasta','groups'],  'optional' : ['output']})
+
+    cmd_dict['make.biom'] = dict({'required' : ['shared'] ,  'optional' : ['contaxonomy','matrixtype','groups','label']})
+
+    cmd_dict['make.fastq'] = dict({'required' : ['fasta','qfile'] ,  'optional' : []})
     cmd_dict['make.group'] = dict({'required' : ['fasta','groups'],  'optional' : []})
-    cmd_dict['make.shared'] = dict({'required' : ['list','group'],  'optional' : ['label','groups','ordergroup']})
+    cmd_dict['make.shared'] = dict({'required' : [['list','group','biom']],  'optional' : ['label','groups']})
     cmd_dict['mantel'] = dict({'required' : ['phylip','phylip2'] ,  'optional' : ['method','iters']})
     cmd_dict['merge.files'] = dict({'required' : ['input','output']})
-    cmd_dict['merge.groups'] = dict({'required' : ['shared','design'],  'optional' : ['groups', 'label']})
-   #cmd_dict['metastats'] = dict({'required' : ['design'],  'optional' : ['groups', 'label','iters','threshold','sets','processors']})
+    cmd_dict['merge.groups'] = dict({'required' : [['shared','group'],'design'],  'optional' : ['groups', 'label']})
     cmd_dict['metastats'] = dict({'required' : ['shared','design'],  'optional' : ['groups', 'label','iters','threshold','sets','processors']})
     cmd_dict['nmds'] = dict({'required' : ['phylip'], 'optional' : ['axes','mindim','maxdim','iters','maxiters','epsilon']})
-   #cmd_dict['normalize.shared'] = dict({'required' : [], 'optional' : ['label','method','norm','groups']})
     cmd_dict['normalize.shared'] = dict({'required' : [['shared','relabund']], 'optional' : ['label','method','norm','groups','makerelabund']})
-  ##cmd_dict['otu.hierarchy'] = dict({'required' : [], 'optional' : []})
+    cmd_dict['otu.association'] = dict({'required' : [['shared','relabund']], 'optional' : ['groups', 'label','method']})
     cmd_dict['otu.hierarchy'] = dict({'required' : ['list','label'], 'optional' : ['output']})
     cmd_dict['pairwise.seqs'] = dict({'required' : ['fasta'],  'optional' : ['align','calc','countends','output','cutoff','match','mismatch','gapopen','gapextend','processors']})
     cmd_dict['parse.list'] = dict({'required' : ['list','group'], 'optional' : ['label']})
-   #cmd_dict['parsimony'] = dict({'required' : [], 'optional' : ['groups','iters','random','processors']})
     cmd_dict['parsimony'] = dict({'required' : ['tree'], 'optional' : ['group','groups','name','iters','random','processors']})
-   #cmd_dict['pca'] = dict({'required' : [], 'optional' : ['label','groups','metric']})
     cmd_dict['pca'] = dict({'required' : [['shared','relabund']], 'optional' : ['label','groups','metric']})
-   #cmd_dict['pcoa'] = dict({'required' : ['phylip'], 'optional' : []})
     cmd_dict['pcoa'] = dict({'required' : ['phylip'], 'optional' : ['metric']})
-   #cmd_dict['phylo.diversity'] = dict({'required' : [],'optional' : ['groups','iters','freq','scale','rarefy','collect','summary','processors']})
-    cmd_dict['phylo.diversity'] = dict({'required' : ['tree','group'],'optional' : ['name','groups','iters','freq','scale','rarefy','collect','summary','processors']})
+
+    cmd_dict['pcr.seqs'] = dict({'required' : ['fasta'], 'optional' : ['oligos','name','group','taxonomy','ecoli','start','end','nomatch','keepprimer','keepdots','processors']})
+
+    cmd_dict['phylo.diversity'] = dict({'required' : ['tree'],'optional' : ['group','name','groups','iters','freq','scale','rarefy','collect','summary','processors']})
     cmd_dict['phylotype'] = dict({'required' : ['taxonomy'],'optional' : ['name','cutoff','label']})
-   #cmd_dict['pre.cluster'] = dict({'required' : ['fasta'],  'optional' : ['names','diffs']})
-    cmd_dict['pre.cluster'] = dict({'required' : ['fasta'],  'optional' : ['name','diffs']})
-   #cmd_dict['rarefaction.shared'] = dict({'required' : [], 'optional' : ['label','iters','groups','jumble']})
+    cmd_dict['pre.cluster'] = dict({'required' : ['fasta'],  'optional' : ['name','diffs','group','processors']})
     cmd_dict['rarefaction.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','iters','groups','jumble']})
-   #cmd_dict['rarefaction.single'] = dict({'required' : [], 'optional' : ['calc','abund','iters','label','freq','processors']})
     cmd_dict['rarefaction.single'] = dict({'required' : [['list', 'sabund', 'rabund', 'shared']], 'optional' : ['calc','abund','iters','label','freq','processors']})
-   #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['remove.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','taxonomy']})
+    cmd_dict['remove.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','shared','taxonomy','design']})
     cmd_dict['remove.lineage'] = dict({'required' : ['taxonomy','taxon'],'optional' : ['fasta','name','group','list','alignreport','dups']})
     cmd_dict['remove.otus'] = dict({'required' : ['group','list','label'], 'optional' : ['groups','accnos']})
-   #cmd_dict['remove.rare'] = dict({'required' : [['list','sabund','rabund','shared'],'nseqs'], 'optional' : ['group','groups','label','bygroup']})
     cmd_dict['remove.rare'] = dict({'required' : [['list','sabund','rabund','shared'],'nseqs'], 'optional' : ['group','groups','label','bygroup']})
     cmd_dict['remove.seqs'] = dict({'required' : ['accnos',['fasta','qfile','name','group','list','alignreport','taxonomy']], 'optional' : ['dups']})
     cmd_dict['reverse.seqs'] = dict({'required' : ['fasta']})
-    cmd_dict['screen.seqs'] = dict({'required' : ['fasta'],  'optional' : ['start','end','maxambig','maxhomop','minlength','maxlength','criteria','optimize','name','group','alignreport','processors']})
+    cmd_dict['screen.seqs'] = dict({'required' : ['fasta'],  'optional' : ['start','end','maxambig','maxhomop','minlength','maxlength','criteria','optimize','name','group','alignreport','taxonomy','processors']})
     cmd_dict['sens.spec'] = dict({'required' : ['list',['column','phylip']] , 'optional' : ['label','cutoff','hard','precision']})
+    cmd_dict['seq.error'] = dict({'required' : ['fasta','reference'] , 'optional' : ['name','qfile','report','ignorechimeras','threshold','processors']})
     cmd_dict['sffinfo'] = dict({'required' : [['sff','sfftxt']], 'optional' : ['fasta','qfile','trim','sfftxt','flow','accnos']})
+    cmd_dict['shhh.flows'] = dict({'required' : [['flow','files']], 'optional' : ['lookup','maxiter','mindelta','cutoff','sigma','order','processors']})
+    cmd_dict['shhh.seqs'] = dict({'required' : [['fasta','files']], 'optional' : ['group','sigma','processors']})
     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['split.groups'] = dict({'required' : ['fasta','group'], 'optional' : ['name','groups']})
+    cmd_dict['sort.seqs'] = dict({'required' : [['fasta','qfile','name','group','flow','taxonomy']], 'optional' : ['accnos','large']})
     cmd_dict['sub.sample'] = dict({'required' : [['fasta','list','sabund','rabund','shared']], 'optional' : ['name','group','groups','label','size','persample']})
-   #cmd_dict['summary.seqs'] = dict({'required' : ['fasta'],'outputs' : ['names']})
+    cmd_dict['summary.qual'] = dict({'required' : ['qfile'], 'optional' : ['name']})
     cmd_dict['summary.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','processors']})
-   #cmd_dict['summary.shared'] = dict({'required' : [], 'optional' : ['calc','label','groups','all','distance']})
     cmd_dict['summary.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','groups','all','distance','processors']})
-   #cmd_dict['summary.single'] = dict({'required' : [], 'optional' : ['calc','abund','size','label','groupmode']})
     cmd_dict['summary.single'] = dict({'required' : [['list','sabund','rabund','shared']], 'optional' : ['calc','abund','size','label','groupmode']})
-   #cmd_dict['tree.shared'] = dict({'required' : [], 'optional' : ['groups','calc','cutoff','precision','label']})
-    cmd_dict['tree.shared'] = dict({'required' : [['shared','phylip','column']], 'optional' : ['name','groups','calc','cutoff','precision','label']})
-    cmd_dict['trim.seqs'] = dict({'required' : ['fasta'],  'optional' : ['group','oligos','qfile','qaverage','qthreshold','qtrim','flip','maxambig','maxhomop','minlength','maxlength','bdiffs','pdiffs','tdiffs','allfiles','keepfirst','removelast']})
-   #cmd_dict['unifrac.unweighted'] = dict({'required' : [], 'optional' : ['groups','iters','distance','random','root','processors']})
-    cmd_dict['unifrac.unweighted'] = dict({'required' : ['tree'], 'optional' : ['name','group','groups','iters','distance','random','root','processors']})
-   #cmd_dict['unifrac.weighted'] = dict({'required' : [], 'optional' : ['groups','iters','distance','random','root','processors']})
-    cmd_dict['unifrac.weighted'] = dict({'required' : ['tree'], 'optional' : ['name','group','groups','iters','distance','random','root','processors']})
-   #cmd_dict['unique.seqs'] = dict({'required' : ['fasta'],  'optional' : ['names']})
+    cmd_dict['summary.tax'] = dict({'required' : ['taxonomy'], 'optional' : ['name','group','reftaxonomy']})
+    cmd_dict['tree.shared'] = dict({'required' : [['shared','phylip','column']], 'optional' : ['name','groups','calc','cutoff','precision','label','subsample','iters','processors']})
+    cmd_dict['trim.flows'] = dict({'required' : ['flow'],  'optional' : ['oligos','bdiffs','pdiffs','tdiffs','ldiffs','sdiffs','minflows','maxflows','fasta','signal','noise','maxhomop','order','processors']})
+    cmd_dict['trim.seqs'] = dict({'required' : ['fasta'],  'optional' : ['name','group','oligos','qfile','qaverage','qthreshold','qwindowaverage','qwindowsize','rollaverage','qstepsize','qtrim','flip','maxambig','maxhomop','minlength','maxlength','bdiffs','pdiffs','tdiffs','ldiffs','sdiffs','keepforward','allfiles','keepfirst','removelast','processors']})
+    cmd_dict['unifrac.unweighted'] = dict({'required' : ['tree'], 'optional' : ['name','group','groups','iters','distance','random','root','subsample','consensus','processors']})
+    cmd_dict['unifrac.weighted'] = dict({'required' : ['tree'], 'optional' : ['name','group','groups','iters','distance','random','root','subsample','consensus','processors']})
     cmd_dict['unique.seqs'] = dict({'required' : ['fasta'],  'optional' : ['name']})
-   #cmd_dict['venn'] = dict({'required' : [], 'optional' : ['calc','label','groups','abund','nseqs','permute']})
-    cmd_dict['venn'] = dict({'required' : [['list','shared']], 'optional' : ['calc','label','groups','abund','nseqs','permute']})
-    ##
-    """
-    cmd_dict['merge.files'] = dict({'required' : ['input','output']})
-    cmd_dict['make.group'] = dict({'required' : ['fasta','groups'],  'optional' : ['output']})
-    cmd_dict['merge.groups'] = dict({'required' : ['shared','design'],  'optional' : ['groups', 'label']})
-    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','processors']})
-    cmd_dict['screen.seqs'] = dict({'required' : ['fasta'],  'optional' : ['start','end','maxambig','maxhomop','minlength','maxlength','criteria','optimize','name','group','alignreport','processors']})
-    cmd_dict['trim.seqs'] = dict({'required' : ['fasta'],  'optional' : ['group','oligos','qfile','qaverage','qthreshold','qtrim','flip','maxambig','maxhomop','minlength','maxlength','bdiffs','pdiffs','tdiffs','allfiles','keepfirst','removelast']})
-    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','processors']})
-    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','processors']})
-    cmd_dict['classify.otu'] = dict({'required' : ['list','taxonomy'],'optional' : ['name','cutoff','label','group','probs','basis','reftaxonomy']})
-    # 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','processors']})
-    cmd_dict['chimera.ccode'] = dict({'required' : ['fasta','template'], 'optional' : ['filter','mask','window','numwanted','processors']})
-    cmd_dict['chimera.check'] = dict({'required' : ['fasta','template'], 'optional' : ['ksize','svg','name','increment','processors']})
-    cmd_dict['chimera.pintail'] = dict({'required' : ['fasta','template'], 'optional' : ['conservation','quantile','filter','mask','window','increment','processors']})
-    cmd_dict['chimera.slayer'] = dict({'required' : ['fasta','template'], 'optional' : ['name','search','window','increment','match','mismatch','numwanted','parents','minsim','mincov','iters','minbs','minsnp','divergence','realign','split','processors']})
-    cmd_dict['dist.seqs'] = dict({'required' : ['fasta'],  'optional' : ['calc','countends','output','cutoff','processors']})
-    cmd_dict['pairwise.seqs'] = dict({'required' : ['fasta'],  'optional' : ['align','calc','countends','output','cutoff','match','mismatch','gapopen','gapextend','processors']})
-    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','diffs','percent']})
-    cmd_dict['cluster.split'] = dict({'required' : [['fasta','phylip','column']] ,  'optional' : ['name','method','splitmethod','taxonomy','taxlevel','showabund','cutoff','hard','large','precision','timing','processors']})
-    cmd_dict['metastats'] = dict({'required' : ['design'],  'optional' : ['groups', 'label','iters','threshold','sets','processors']})
-    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','processors']})
-    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','root','processors']})
-    cmd_dict['unifrac.weighted'] = dict({'required' : [], 'optional' : ['groups','iters','distance','random','root','processors']})
-    cmd_dict['parsimony'] = dict({'required' : [], 'optional' : ['groups','iters','random','processors']})
-    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','abund','nseqs','permute']})
-    cmd_dict['pcoa'] = dict({'required' : ['phylip'], 'optional' : []})
-    cmd_dict['pca'] = dict({'required' : [], 'optional' : ['label','groups','metric']})
-    cmd_dict['nmds'] = dict({'required' : ['phylip'], 'optional' : ['axes','mindim','maxdim','iters','maxiters','epsilon']})
-    cmd_dict['corr.axes'] = dict({'required' : [['shared','relabund','metadata'],'axes'], 'optional' : ['label','groups','method','numaxes']})
-    cmd_dict['get.group'] = dict({'required' : [], 'optional' : []})
-    cmd_dict['phylotype'] = dict({'required' : ['taxonomy'],'optional' : ['name','cutoff','label']})
-    cmd_dict['phylo.diversity'] = dict({'required' : [],'optional' : ['groups','iters','freq','scale','rarefy','collect','summary','processors']})
-    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']})
-    cmd_dict['cluster.classic'] = dict({'required' : ['phylip'] ,  '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['remove.rare'] = dict({'required' : [['list','sabund','rabund','shared'],'nseqs'], 'optional' : ['group','groups','label','bygroup']})
-    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','persample']})
-    cmd_dict['consensus.seqs'] = dict({'required' : ['fasta'], 'optional' : ['list','name','label']})
-    cmd_dict['indicator'] = dict({'required' : ['tree',['shared','relabund']], 'optional' : ['groups','label','design']})
-
-    cmd_dict['amova'] = dict({'required' : ['phylip','design'] ,  'optional' : ['alpha','iters']})
-    cmd_dict['homova'] = dict({'required' : ['phylip','design'] ,  'optional' : ['alpha','iters']})
-    cmd_dict['anosim'] = dict({'required' : ['phylip','design'] ,  'optional' : ['alpha','iters']})
-    cmd_dict['mantel'] = dict({'required' : ['phylip','phylip2'] ,  'optional' : ['method','iters']})
-    cmd_dict['make,fastq'] = dict({'required' : ['fasta','qfile'] ,  'optional' : []})
-    """
+    cmd_dict['venn'] = dict({'required' : [['list','shared']], 'optional' : ['calc','label','groups','abund','nseqs','permute','fontsize']})
 
     parser = optparse.OptionParser()
     # Options for managing galaxy interaction
@@ -446,9 +332,15 @@
     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( '--repfasta', dest='repfasta', help='fasta file paths' )
     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( '--qwindowaverage', dest='qwindowaverage', type="int", help='Remove sequences that have a window average quality below the value' )
+    parser.add_option( '--qwindowsize', dest='qwindowsize', type="int", help='WIndow size for qwindowaverage' )
+    parser.add_option( '--rollaverage', dest='rollaverage', type="int", help='Remove sequences that have a average quality below the value in a rolling window' )
+    parser.add_option( '--qstepsize', dest='qstepsize', type="int", help='Distance to move a rolling window for each step' )
     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( '--ignorechimeras', dest='ignorechimeras', help='ignorechimeras' )
     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' )
@@ -457,17 +349,23 @@
     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( '--ldiffs', dest='ldiffs', type="int", help='Number of linker sequence differences to allow' )
+    parser.add_option( '--sdiffs', dest='sdiffs', type="int", help='Number of spacer sequence 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( '--keepforward', dest='keepforward', help='T - keep primer' )
     parser.add_option( '--name', dest='name', help='A file containing a 2 column table: name, and comma separated list of represetatives' )
+    parser.add_option( '--repname', dest='repname', 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( '--report', dest='report', help='' )
     parser.add_option( '--taxonomy', dest='taxonomy', help='A Taxonomy file' )
     parser.add_option( '--reftaxonomy', dest='reftaxonomy', help='A Taxonomy file' )
+    parser.add_option( '--contaxonomy', dest='contaxonomy', help='The Taxonomy file output by classify.otu' )
     parser.add_option( '--taxon', dest='taxon',  help='A Taxon' )
     parser.add_option( '--taxlevel', dest='taxlevel', type="int", help='A Taxonomy level' )
     # parser.add_option( '--taxon', dest='taxon', action="callback", callback=remove_confidence_callback, help='A Taxon' )
@@ -485,6 +383,7 @@
     parser.add_option( '--gapextend', dest='gapextend', type="float", help='Penalty for extending a gap, default is -1.0' )
     parser.add_option( '--precision', dest='precision', type="int", help='' )
     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( '--sim', dest='sim', help='Calculate similarity rather than distance' )
     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' )
@@ -503,7 +402,6 @@
     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' )
@@ -516,7 +414,9 @@
     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( '--maxiter', dest='maxiter', type='int', help='Iterations' )
     parser.add_option( '--maxiters', dest='maxiters', type='int', help='Iterations of randomizations' )
+    parser.add_option( '--subsample', dest='subsample', help='Number of subsample, or T to default to smallest group size' )
     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' )
@@ -533,6 +433,15 @@
     parser.add_option( '--svg', dest='svg',  help='SVG' )
     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( '--minflows', dest='minflows', type='int', help='the minimum number of flows that each sequence must contain' )
+    parser.add_option( '--maxflows', dest='maxflows', type='int', help='the number of flows after which all other flows should be ignored.' )
+    parser.add_option( '--signal', dest='signal', type='float', help='threshold for intensity to be signal' )
+    parser.add_option( '--noise', dest='noise', type='float', help='threshold for intensity to be noise' )
+    parser.add_option( '--mindelta', dest='mindelta', type='float', help='threshold for determining how much change in the flowgram correction' )
+    parser.add_option( '--sigma', dest='sigma', type='float', help='sigma option is used to set the dispersion of the data in the expectation-maximization' )
+    parser.add_option( '--order', dest='order', help='flow order e.g. TACG' )
+    parser.add_option( '--lookup', dest='lookup', help='lookup file that are needed to run shhh.seqs' )
+    
     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='' )
@@ -568,6 +477,7 @@
     parser.add_option( '--design', dest='design', help='' )
     parser.add_option( '--sets', dest='sets', help='' )
     parser.add_option( '--metric', dest='metric', help='' )
+    parser.add_option( '--matrixmodel', dest='matrixmodel', help='' )
     parser.add_option( '--epsilon', dest='epsilon', help='' )
     parser.add_option( '--alpha', dest='alpha', help='' )
     parser.add_option( '--root', dest='root', help='' )
@@ -580,11 +490,37 @@
     parser.add_option( '--persample', dest='persample', help='sub sample option' )
     parser.add_option( '--timing', dest='timing', help='timing option' )
     parser.add_option( '--processors', dest='processors', type='int', action='callback', callback=processors_callback, help='Number of processors to use' )
+    parser.add_option( '--abskew', dest='abskew', type="float", help='Minimum abundance skew.')
+    parser.add_option( '--chimealns', dest='chimealns', help='Boolean - produce a file containing multiple alignments of query sequences')
+    parser.add_option( '--minh', dest='minh', type="float", help='mininum score to report chimera.')
+    parser.add_option( '--mindiv', dest='mindiv', type="float", help='mininum score to report chimera.')
+    parser.add_option( '--xn', dest='xn', type="float", help='weight of a no vote')
+    parser.add_option( '--dn', dest='dn', type="float", help='pseudo-count prior on number of no votes')
+    parser.add_option( '--xa', dest='xa', type="float", help='weight of an abstain vote')
+    parser.add_option( '--chunks', dest='chunks', type="int", help='the number of chunks to extract from the query sequence')
+    parser.add_option( '--minchunk', dest='minchunk', type="int", help='the minimum length of a chunk')
+    parser.add_option( '--idsmoothwindow', dest='idsmoothwindow', type="int", help='ength of id smoothing window')
+    parser.add_option( '--minsmoothid', dest='minsmoothid', type="float", help='minimum factional identity over smoothed window')
+    parser.add_option( '--maxp', dest='maxp', type="int", help='maximum number of candidate parents to consider')
+    parser.add_option( '--skipgaps', dest='skipgaps',  help='Boolean')
+    parser.add_option( '--skipgaps2', dest='skipgaps2',  help='Boolean')
+    parser.add_option( '--ucl', dest='ucl', help='')
+    parser.add_option( '--queryfract', dest='queryfract', type="float", help='')
+    parser.add_option( '--minlen', dest='minlen', type="int", help='Minimun sequence length' )
+    parser.add_option( '--maxlen', dest='maxlen', type="int", help='Maximun sequence length' )
+    parser.add_option( '--ecoli', dest='ecoli',  help='ecoli referance fasta' )
+    parser.add_option( '--nomatch', dest='nomatch',  help='What to with non matching items' )
+    parser.add_option( '--keepprimer', dest='keepprimer',  help='Whether to retain the primer' )
+    parser.add_option( '--keepdots', dest='keepdots',  help='Whether to retain dots in the sequence' )
+    parser.add_option( '--matrixtype', dest='matrixtype',  help='' )
+    parser.add_option( '--consensus', dest='consensus',  help='boolean' )
+    parser.add_option( '--biom', dest='biom',  help='biom file' )
     # 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( '--makerelabund', dest='makerelabund', help='Whether to convert to a relabund file' )
     parser.add_option( '--ordergroup', dest='ordergroup', help='')
     # include read.tree options
     parser.add_option( '--tree', dest='tree', help='' )
@@ -738,7 +674,7 @@
                 if re.match('^\d*\s*$',line):
                     continue
                 # if re.match('^(unique|[0-9.]*)(\t\d+)+',line):  # abundance from cluster commands 
-                if not options.cmd.startswith('unifrac') and re.match('^([0-9.]+)(\t\d+)*',line):  # abundance from cluster commands, allow unique line into info
+                if not options.cmd.startswith('unifrac') and re.match('^(unique|[0-9.]+)(\t\d+)*',line):  # abundance from cluster commands, allow unique line into info
                     continue
                 if re.match('Output .*',line):
                     break
--- a/mothur/tools/mothur/normalize.shared.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/normalize.shared.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_normalize_shared" name="Normalize.shared" version="1.19.0">
+<tool id="mothur_normalize_shared" name="Normalize.shared" version="1.20.0">
  <description>Normalize the number of sequences per group to a specified level</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -27,17 +27,13 @@
  <inputs>
   <param name="otu" type="data" format="shared,relabund" label="shared,relabund - OTU Shared or Relabund file"/>
   <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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </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>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
   <param name="norm" type="integer" value="0" label="norm - Number to normalize to (Uses default if &lt; 1)"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/otu.association.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,69 @@
+<tool id="mothur_otu_association" name="Otu.association" version="1.24.0" force_history_refresh="True">
+ <description>Calculate the correlation coefficient for the otus</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='otu.association'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.norm\.shared$:'$shared
+  --outputdir='$logfile.extra_files_path'
+  --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+  --new_datasets='^\S+?\.otu.corr$:$tabular'
+  #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
+  #if $method.__str__ != "None" and len($method.__str__) > 0:
+   --method=$method
+  #end if
+ </command>
+ <inputs>
+  <param name="otu" type="data" format="shared,relabund" label="shared,relabund - OTU Shared or Relabund file"/>
+  <param name="label" type="select" label="label - OTU Labels" multiple="true">
+   <options>
+    <filter type="data_meta" ref="otu" key="labels" />
+   </options>
+  </param>
+  <param name="groups" type="select" label="groups - Groups to include" multiple="true">
+   <options>
+    <filter type="data_meta" ref="otu" key="groups" />
+   </options>
+  </param>
+  <param name="method" type="select" label="method - Normalization method">
+   <option value="pearson" selected="true">pearson</option>
+   <option value="spearman">spearman</option>
+   <option value="kendall">kendall</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 otu.association_ command calculates the correlation coefficient for the otus in a shared_ or relabund_ file.
+
+.. _shared: http://www.mothur.org/wiki/Shared_file
+.. _relabund: http://www.mothur.org/wiki/Get.relabund
+.. _otu.association: http://www.mothur.org/wiki/Otu.association
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/otu.hierarchy.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/otu.hierarchy.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -14,16 +14,13 @@
  <inputs>
   <param name="list" type="data" format="list" label="list - OTU List"/>
   <param name="label1" type="select" label="label - OTU Label 1" >
-   <options from_dataset="list">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
+   <options>
+    <filter type="data_meta" ref="list" key="labels" />
    </options>
   </param>
   <param name="label2" type="select" label="label - OTU Label 2" help="Must be different than Label 1">
-   <options from_dataset="list">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
-    <filter type="param_value" ref="label1" column="value" keep="false"/>
+   <options>
+    <filter type="data_meta" ref="list" key="labels" />
    </options>
   </param>
   <param name="output" type="select" optional="true" label="output - display the names of the sequences in the otus or the otu numbers">
@@ -53,7 +50,7 @@
 
 The otu.hierarchy_ command relates OTUs from a list_ at different distances.
 
-.. _list_file: http://www.mothur.org/wiki/List_file
+.. _list: http://www.mothur.org/wiki/List_file
 .. _otu.hierarchy: http://www.mothur.org/wiki/Otu.hierarchy
 
 
--- a/mothur/tools/mothur/pairwise.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/pairwise.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -23,7 +23,7 @@
   #if len($output.__str__) > 0:
    --output=$output
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="fasta" label="fasta - Fasta"/>
--- a/mothur/tools/mothur/parse.list.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/parse.list.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -18,9 +18,8 @@
   <param name="group" type="data" format="groups" label="group - Sequences Name reference"/>
   <param name="label" type="select" optional="true" label="label - To filter: Select OTU Labels to include" multiple="true">
    <help>All labels are included if none are selected</help>
-   <options from_dataset="otu">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
+   <options>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
  </inputs>
--- a/mothur/tools/mothur/parsimony.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/parsimony.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -18,17 +18,15 @@
   #if int($iters.__str__) > 0:
    --iters=$iters
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="tree" type="data" format="tre" label="tree - Phylogenetic Tree"/>
   <param name="group" type="data" format="groups" label="group - Group file for the tree"/>
   <param name="groups" type="select" label="groups - Groups to display" multiple="true" 
          help="By default all are included if no selection is made.">
-   <options from_dataset="group">
-    <column name="name" index="1"/>
-    <column name="value" index="1"/>
-    <filter type="unique_value" name="unq_grp" column="1" />
+   <options>
+    <filter type="data_meta" ref="group" key="groups" />
    </options>
   </param>
   <param name="name" type="data" format="names" optional="true" label="name - Sequences Name reference file for the tree"/>
--- a/mothur/tools/mothur/pca.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/pca.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_pca" name="Pca" version="1.19.0">
+<tool id="mothur_pca" name="Pca" version="1.20.0">
  <description>Principal Coordinate Analysis for a shared file</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -23,17 +23,13 @@
  <inputs>
   <param name="otu" type="data" format="shared,relabund" label="shared,relabund - OTU Shared or Relabund file"/>
   <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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </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>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
   <param name="metric" type="boolean" truevalue="" falsevalue="--metric=False" checked="true" label="metric - Calculate pearson correlation coefficient" />
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/pcr.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,123 @@
+<tool id="mothur_pcr_seqs" name="Pcr.seqs" version="1.25.0">
+ <description>Trim sequences</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='pcr.seqs'
+  #import re, os.path
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
+  ## adds .pcr before the last extension to the input file
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pcr.\2',$os.path.basename($fasta.__str__)) + ":'" + $pcr_fasta.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pcr.scrap.\2',$os.path.basename($fasta.__str__)) + ":'" + $scrap_fasta.__str__]
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  #if $name_in.__str__ != "None" and len($name_in.__str__) > 0:
+   --name=$name_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pcr.\2',$os.path.basename($name_in.__str__)) + ":'" + $name_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.pcr.\2',$os.path.basename($group_in.__str__)) + ":'" + $group_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.pcr.\2',$os.path.basename($taxonomy_in.__str__)) + ":'" + $taxonomy_out.__str__]
+  #end if
+  #if $trim.method == 'oligos': 
+   --oligos=$trim.oligos
+   --nomatch=$trim.nomatch
+   $trim.keepprimer
+  #elif $trim.method == 'reference': 
+   --ecoli=$trim.ecoli
+  #elif $trim.method == 'position': 
+   #if $trim.start.__str__ != '' and int($trim.start.__str__) > 0:
+    --start=$trim.start
+   #end if
+   #if $trim.end.__str__ != '' and int($trim.end.__str__) > 0:
+    --end=$trim.end
+   #end if
+  #end if
+  $keepdots
+  --result=#echo ','.join($results)
+  --processors=8
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
+
+  <conditional name="trim">
+   <param name="method" type="select" label="Trim with an oligos file?" help="">
+    <option value="oligos">oligos</option>
+    <option value="reference">reference sequence</option>
+    <option value="position">start and end positions</option>
+   </param>
+   <when value="oligos">
+    <param name="oligos" type="data" format="oligos" optional="true" label="oligos - barcodes and primers"
+           help="a file that can contain the sequences of the forward and reverse primers and barcodes and their sample identifier. 
+                Each line of the oligos file can start with the key words &quot;forward&quot;, &quot;reverse&quot;, 
+                and &quot;barcode&quot; or it can start with a &quot;#&quot; to tell mothur to ignore that line of the oligos file.  "/>
+    <param name="nomatch" type="select" label="nomatch - action when no primer is found" 
+           help="">
+     <option value="reject" selected="true">reject (default)</option>
+     <option value="keep">keep</option>
+    </param>
+    <param name="keepprimer" type="boolean" falsevalue="" truevalue="--keepprimer=true" checked="false" 
+           label="keepprimer - keep the primer in the output sequence"/>
+   </when>
+   <when value="reference">
+    <param name="ecoli" type="data" format="fasta" optional="true" label="ecoli - An aligned reference sequence for trimming"
+         help="The ecoli parameter is used to provide a fasta file containing a single reference sequence (e.g. for e. coli) this must be aligned. Mothur will trim to the start and end positions of the reference sequence."/>
+   </when>
+   <when value="position">
+    <param name="start" type="integer" value="" optional="true" label="start - a starting position to trim to">
+     <validator type="in_range" message="Starting position can't be negative" min="0"/>
+    </param>
+    <param name="end" type="integer" value="" optional="true" label="end - a ending position to trim from">
+     <validator type="in_range" message="Starting position can't be negative and should be " min="0"/>
+    </param>
+   </when>
+  </conditional> <!-- trimtype -->
+
+  <param name="keepdots" type="boolean" falsevalue="--keepdots=false" truevalue="" checked="true" 
+         label="keepdots - keep the leading and trailing alignment dots in the output sequences"/>
+  <param name="taxonomy_in" type="data" format="seq.taxonomy" optional="true" label="taxonomy - Sequence Taxonomy"/>
+  <param name="name_in" type="data" format="names" optional="true" label="name - Sequence representative name list"/>
+  <param name="group_in" type="data" format="groups" optional="true" label="group - Group file"/>
+
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format_source="fasta" name="pcr_fasta" label="${tool.name} on ${on_string}: pcr.fasta" />
+  <data format_source="fasta" name="scrap_fasta" label="${tool.name} on ${on_string}: pcr.scrap.fasta" />
+  <data format="seq.taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: tax.summary" >
+    <filter>taxonomy_in != None</filter>
+  </data>
+  <data format="groups" name="group_out" label="${tool.name} on ${on_string}: " >
+    <filter>group_in != None</filter>
+  </data>
+  <data format="names" name="name_out" label="${tool.name} on ${on_string}: " >
+    <filter>name_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 pcr.seqs_ command assigns sequences to chosen taxonomy outline.
+
+.. _pcr.seqs: http://www.mothur.org/wiki/Pcr.seqs
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/phylo.diversity.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/phylo.diversity.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_phylo_diversity" name="Phylo.diversity" version="1.19.0">
+<tool id="mothur_phylo_diversity" name="Phylo.diversity" version="1.20.0">
  <description>Alpha Diversity calculates unique branch length</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -6,11 +6,13 @@
   --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.phylodiv\.summary$:'$summary_out,'^\S+\.phylodiv$:'$collectors_out,'^\S+\.rarefaction$:'$rarefaction_out
   --outputdir='$logfile.extra_files_path'
   --tree=$tree
-  #if $group.__str__ != "None" and len($group.__str__) > 0:
-   --group='$group'
-  #end if
-  #if $groups.__str__ != "None" and len($groups.__str__) > 0:
-   --groups='$groups'
+  #if $grouping.use:
+   #if $grouping.group.__str__ != "None" and len($grouping.group.__str__) > 0:
+    --group='$grouping.group'
+   #end if
+   #if $grouping.groups.__str__ != "None" and len($grouping.groups.__str__) > 0:
+    --groups='$grouping.groups'
+   #end if
   #end if
   #if $name.__str__ != "None" and len($name.__str__) > 0:
    --name='$name'
@@ -27,19 +29,24 @@
   #if len($rarefy.__str__) > 0 or len($collect.__str__) > 0:
    $summary
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <!-- list,group  or shared -->
   <param name="tree" type="data" format="tre" label="tree - Phylogenetic Tree"/>
-  <param name="group" type="data" format="groups" label="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>
+  <conditional name="grouping">
+   <param name="use" type="boolean" truevalue="yes" falsevalue="no" checked="true" label="Analyze by group using a Group file"/>
+   <when value="yes">
+   <param name="group" type="data" format="groups" label="group - Group file for the tree"/>
+   <param name="groups" type="select" label="groups - Groups to display" multiple="true">
+    <help>All groups displayed if none are selected.</help>
+    <options>
+     <filter type="data_meta" ref="group" key="groups" />
+    </options>
+   </param>
+   </when>
+   <when value="no"/>
+  </conditional> <!-- use_groups -->
   <param name="name" type="data" format="names" optional="true" label="name - Sequences Name reference file for the tree"/>
   <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" 
--- a/mothur/tools/mothur/pre.cluster.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/pre.cluster.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_pre_cluster" name="Pre.cluster" version="1.19.0">
+<tool id="mothur_pre_cluster" name="Pre.cluster" version="1.23.0">
  <description>Remove sequences due to pyrosequencing errors</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -7,26 +7,33 @@
   ## adds .precluster before the last extension to the input file
   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.precluster.\2',$os.path.basename($fasta.__str__)) + ":'" + $fasta_out.__str__]
   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.precluster.names',$os.path.basename($fasta.__str__)) + ":'" + $names_out.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.precluster.map',$os.path.basename($fasta.__str__)) + ":'" + $map_out.__str__]
   --cmd='pre.cluster'
   --outputdir='$logfile.extra_files_path'
   --fasta=$fasta
   #if $name.__str__ != "None" and len($name.__str__) > 0:
    --name=$name
   #end if
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --group=$group
+  #end if
   #if 20 >= int($diffs.__str__) >= 0:
    --diffs=$diffs
   #end if
   --result=#echo ','.join($results)
+  --processors=8
  </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="group" type="data" format="groups" optional="true" label="group - 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_source="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" />
+  <data format="tabular" name="map_out" label="${tool.name} on ${on_string}: precluster.map" />
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/rarefaction.shared.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/rarefaction.shared.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_rarefaction_shared" name="Rarefaction.shared" version="1.19.0">
+<tool id="mothur_rarefaction_shared" name="Rarefaction.shared" version="1.20.0">
  <description>Generate inter-sample rarefaction curves for OTUs</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -23,30 +23,22 @@
  <inputs>
   <param name="otu" type="data" format="shared" label="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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="groups" type="select" label="groups - Groups to analyze" multiple="true">
    <help>All groups will be analyzed by default if none are selected</help>
-   <options from_dataset="otu">
-    <column name="name" index="1"/>
-    <column name="value" index="1"/>
-    <filter type="unique_value" name="unq_grp" column="1" />
+   <options>
+    <filter type="data_meta" ref="otu" key="groups" />
     <filter type="add_value" name="all" value="all" />
    </options>
   </param>
   <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_calculators.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>
+   <option value="sharedobserved" selected="true">sharedobserved - the number of sequences in two samples</option>
+   <option value="sharednseqs">sharednseqs - the number of sequences in two samples</option>
   </param>
  </inputs>
  <outputs>
--- a/mothur/tools/mothur/rarefaction.single.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/rarefaction.single.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,12 +1,14 @@
-<tool id="mothur_rarefaction_single" name="Rarefaction.single" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_rarefaction_single" name="Rarefaction.single" version="1.20.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|r_\w*))$:tabular'
+  #if $as_datasets.__str__ == 'yes':
+   --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+   --new_datasets='^\S+?\.(((\S+)\.)?(rarefaction|r_\w*))$:tabular'
+  #end if
   #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('rabund').__class__):
@@ -31,29 +33,37 @@
   #if float($freq.__str__) > 0:
    --freq=$freq
   #end if
-  --processors=2
+  --processors=8
  </command>
  <inputs>
   <param name="otu" type="data" format="list,rabund,sabund,shared" label="list,rabund,sabund,shared - 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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
-   <options from_file="mothur_calculators.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>
+   <option value="ace">ace - Community richness the ACE estimator</option>
+   <option value="bootstrap">bootstrap - Community richness the bootstrap estimator</option>
+   <option value="chao">chao - Community richness the Chao1 estimator</option>
+   <option value="jack">jack - Community richness the jackknife estimator</option>
+   <option value="sobs" selected="true">sobs - Community richness the observed richness</option>
+   <option value="simpsoneven">simpsoneven - Community evenness a Simpson index-based measure of evenness</option>
+   <option value="shannoneven">shannoneven - Community evenness a Shannon index-based measure of evenness</option>
+   <option value="heip">heip - Community evenness Heip's metric of community evenness</option>
+   <option value="smithwilson">smithwilson - Community evenness Smith and Wilson's metric of community evenness</option>
+   <option value="coverage">coverage - Community diversity the sampling coverage </option>
+   <option value="simpson">simpson - Community diversity the Simpson index</option>
+   <option value="invsimpson">invsimpson - Community diversity the Simpson index</option>
+   <option value="shannon">shannon - Community diversity the Shannon index</option>
+   <option value="npshannon">npshannon - Community diversity the non-parametric Shannon index</option>
+   <option value="nseqs">nseqs - Utility the number of sequences in a sample</option>
   </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"/>
+  <param name="as_datasets" type="boolean" truevalue="yes" falsevalue="no" checked="True" label="Create a new history dataset for each label and calculator"/>
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
--- a/mothur/tools/mothur/remove.groups.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/remove.groups.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_remove_groups" name="Remove.groups" version="1.19.0">
+<tool id="mothur_remove_groups" name="Remove.groups" version="1.24.0">
  <description>Remove groups from groups,fasta,names,list,taxonomy</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -20,22 +20,29 @@
   #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__]
+   #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__]
+   #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__]
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.pick\\.\2',$os.path.basename($list_in.__str__)) + ":'" + $list_out.__str__]
+  #end if
+  #if $shared_in.__str__ != "None" and len($shared_in.__str__) > 0:
+   --shared=$shared_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.*\\.pick\\.\2',$os.path.basename($shared_in.__str__)) + ":'" + $shared_out.__str__]
   #end if
   #if $taxonomy_in.__str__ != "None" and len($taxonomy_in.__str__) > 0:
    --taxonomy=$taxonomy_in
-   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.pick.\2',$os.path.basename($taxonomy_in.__str__)) + ":'" + $taxonomy_out.__str__]
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.pick\\.\2',$os.path.basename($taxonomy_in.__str__)) + ":'" + $taxonomy_out.__str__]
+  #end if
+  #if $design_in.__str__ != "None" and len($design_in.__str__) > 0:
+   --design=$design_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.*\\.pick\\.\2',$os.path.basename($design_in.__str__)) + ":'" + $design_out.__str__]
   #end if
   --result=#echo ','.join($results)
-
  </command>
  <inputs>
   <param name="group_in" type="data" format="groups" label="group - Groups"/>
@@ -46,10 +53,8 @@
    </param>
    <when value="groups">
     <param name="groups" type="select" 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>
+      <filter type="data_meta" ref="group_in" key="groups" />
      </options>
     </param>
    </when>
@@ -60,7 +65,10 @@
   <param name="fasta_in" type="data" format="fasta,align" optional="true" label="fasta - Fasta Sequences"/>
   <param name="name_in" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
   <param name="list_in" type="data" format="list" optional="true" label="list - OTU List"/>
+  <param name="shared_in" type="data" format="shared" optional="true" label="shared - OTU Shared"/>
   <param name="taxonomy_in" type="data" format="seq.taxonomy" optional="true" label="taxonomy - Taxonomy"/>
+  <param name="design_in" type="data" format="tabular" label="design - assign groups to new grouping"
+         help="design has 2 columns: group(col 1) and grouping(col 2) (separated by a TAB character) use make.design"/>
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
@@ -75,9 +83,15 @@
   <data format="list" name="list_out" label="${tool.name} on ${on_string}: pick.list">
    <filter>list_in != None</filter>
   </data>
+  <data format="shared" name="shared_out" label="${tool.name} on ${on_string}: pick.shared">
+   <filter>shared_in != None</filter>
+  </data>
   <data format="seq.taxonomy" name="taxonomy_out" label="${tool.name} on ${on_string}: pick.taxonomy">
    <filter>taxonomy_in != None</filter>
   </data>
+  <data format="design" name="design_out" label="${tool.name} on ${on_string}: pick.design">
+   <filter>design_in != None</filter>
+  </data>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/remove.lineage.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/remove.lineage.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_remove_lineage" name="Remove.lineage" version="1.19.0">
+<tool id="mothur_remove_lineage" name="Remove.lineage" version="1.20.0">
  <description>Picks by taxon</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -9,7 +9,7 @@
   --cmd='remove.lineage'
   --outputdir='$logfile.extra_files_path'
   --taxonomy=$taxonomy
-  --taxon="'$re.sub('\(\d+\)','',$taxon.value.__str__)'"
+  --taxon="'$re.sub('(\s|,)+',',',$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__]
@@ -35,14 +35,17 @@
  </command>
  <inputs>
   <param name="taxonomy" type="data" format="seq.taxonomy" label="taxonomy - Taxonomy"/>
-  <param name="taxons" type="select" size="120" label="Browse Taxons from Taxonomy">
+  <!--
+  <param name="taxons" type="select" size="120" multiple="true" 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" />
+    <filter type="sort_by" name="sorted_taxon" column="1" />
    </options>
   </param>
-  <param name="taxon" type="text" size="120" label="taxon - Select Taxon"/>
+  -->
+  <param name="taxon" type="text" area="True" size="5x120" label="taxon - Select Taxons for filtering" help="Enter 1 or more taxons separated by whitespace or commas"/>
   <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"/>
@@ -51,10 +54,9 @@
   <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="seq.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">
+  <data format_source="fasta_in" 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">
@@ -86,7 +88,7 @@
 
 **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.
+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.
 
 .. _taxonomy: http://www.mothur.org/wiki/Taxonomy_outline
 .. _name: http://www.mothur.org/wiki/Name_file
--- a/mothur/tools/mothur/remove.otus.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/remove.otus.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -19,17 +19,16 @@
    #end if
   #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__]
+  #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>
+    <filter type="data_meta" ref="list_in" key="labels" />
    </options>
   </param>
   <conditional name="groupnames">
@@ -38,12 +37,10 @@
     <option value="accnos">A History Group Name Accnos Dataset</option>
    </param>
    <when value="groups">
-    <param name="groups" type="select" label="groups - Pick groups to include" multiple="true" force_select="true">
+    <param name="groups" type="select" label="groups - Pick groups to remove" multiple="true" force_select="true">
      <help>At least one group must be selected</help>
-     <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>
+      <filter type="data_meta" ref="group_in" key="groups" />
      </options>
     </param>
    </when>
--- a/mothur/tools/mothur/remove.rare.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/remove.rare.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_remove_rare" name="Remove.rare" version="1.19.0">
+<tool id="mothur_remove_rare" name="Remove.rare" version="1.20.0">
  <description>Remove rare OTUs</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -47,18 +47,14 @@
    <when value="shared">
     <param name="otu" type="data" format="shared" label="shared - Otu dataset"/>
     <param name="groups" type="select" optional="true" label="groups - Pick groups to analyze" 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>
+      <filter type="data_meta" ref="otu" key="groups" />
      </options>
     </param>
     <param name="bygroup" type="boolean" truevalue="--bygroup=true" falsevalue="" checked="false" label="bygroup - Remove any OTU that has nseqs or fewer sequences across all groups"/> 
     <param name="label" type="select" multiple="true" 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>
+      <filter type="data_meta" ref="otu" key="labels" />
      </options>
     </param>
    </when>
@@ -66,27 +62,21 @@
     <param name="otu" type="data" format="list" label="list - Otu dataset"/>
     <param name="group" type="data" format="groups" label="group - Groups" />
     <param name="groups" type="select" optional="true" label="groups - Pick groups to analyze" 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>
+      <filter type="data_meta" ref="group" key="groups" />
      </options>
     </param>
     <param name="label" type="select" multiple="false" 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>
+      <filter type="data_meta" ref="otu" key="labels" />
      </options>
     </param>
    </when>
    <when value="default">
     <param name="otu" type="data" format="shared,list,rabund,sabund" label="shared,list,rabund,sabund - Otu dataset"/>
     <param name="label" type="select" multiple="true" 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>
+      <filter type="data_meta" ref="otu" key="labels" />
      </options>
     </param>
    </when>
--- a/mothur/tools/mothur/remove.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/remove.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_remove_seqs" name="Remove.seqs" version="1.19.0">
+<tool id="mothur_remove_seqs" name="Remove.seqs" version="1.20.0">
  <description>Remove sequences by name</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -41,8 +41,8 @@
  </command>
  <inputs>
   <param name="accnos" type="data" format="accnos" label="accnos - Accession Names"/>
-  <param name="fasta_in" type="data" format="fasta,align" optional="true" label="fasta - Fasta Sequences"/>
-  <param name="qfile_in" type="data" format="qual,qual454" optional="true" label="qfile - Fasta Quality"/>
+  <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"/>
@@ -53,23 +53,12 @@
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
   <!-- format should be set to match input -->
-  <!-- There should be a  format_source   attribute
-  <data format_source="fasta_in" metadata_source="fasta_in" name="fasta_out" label="${tool.name} on ${on_string}: pick.${fasta_in.datatype.file_ext}">
+  <data format_source="fasta_in" name="fasta_out" label="${tool.name} on ${on_string}: pick.fasta">
    <filter>fasta_in != None</filter>
   </data>
-  -->
-  <data format="fasta" metadata_source="fasta_in" name="fasta_out" label="${tool.name} on ${on_string}: pick.${fasta_in.datatype.file_ext}">
-   <filter>fasta_in != None</filter>
-   <change_format>
-     <when input="${fasta_in.datatype.file_ext}" value="align" format="align" />
-   </change_format>
-  </data>
   <!-- format should be set to match input -->
-  <data format="qual" name="qfile_out" label="${tool.name} on ${on_string}: pick.qfile">
+  <data format_source="qfile_in" name="qfile_out" label="${tool.name} on ${on_string}: pick.qfile">
    <filter>qfile_in != None</filter>
-   <change_format>
-     <when input="${qfile_in.datatype.file_ext}" value="qual454" format="qual454" />
-   </change_format>
   </data>
   <data format="names" name="name_out" label="${tool.name} on ${on_string}: pick.names">
    <filter>name_in != None</filter>
--- a/mothur/tools/mothur/screen.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/screen.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,15 +1,15 @@
-<tool id="mothur_screen_seqs" name="Screen.seqs" version="1.19.0">
+<tool id="mothur_screen_seqs" name="Screen.seqs" version="1.23.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__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.good.\2',$os.path.basename($input_fasta.__str__)) + ":'" + $out_file.__str__]
+  #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.bad.accnos',$os.path.basename($input_fasta.__str__)) + ":'" + $bad_accnos.__str__]
   --outputdir='$logfile.extra_files_path'
   --tmpdir='${logfile.extra_files_path}/input'
-  --fasta=$input
+  --fasta=$input_fasta
   #if int($start) >= 0:
    --start=$start
   #end if
@@ -50,11 +50,15 @@
    --alignreport=$input_alignreport
    #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.good.\2',$os.path.basename($input_alignreport.__str__)) + ":'" + $output_alignreport.__str__]
   #end if
+  #if $input_taxonomy != None and $input_taxonomy.__str__ != "None":
+   --taxonomy=$input_taxonomy
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.good.\2',$os.path.basename($input_taxonomy.__str__)) + ":'" + $output_taxonomy.__str__]
+  #end if
   --result=#echo ','.join($results)
-  --processors=2
+  --processors=8
  </command>
  <inputs>
-  <param name="input" type="data" format="fasta,align" label="fasta - Fasta to screen"/>
+  <param name="input_fasta" 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)"/>
@@ -74,10 +78,11 @@
   <param name="input_names" type="data" format="names" optional="true" label="name - Sequence 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"/>
+  <param name="input_taxonomy" type="data" format="taxonomy" optional="true" label="taxonomy - Taxonomy to screen"/>
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
-  <data format_source="input" name="out_file" label="${tool.name} on ${on_string}: good.${input.datatype.file_ext}" />
+  <data format_source="input_fasta" name="out_file" label="${tool.name} on ${on_string}: good.${input_fasta.datatype.file_ext}" />
   <data format="accnos" name="bad_accnos" label="${tool.name} on ${on_string}: bad.accnos" />
   <data format_source="input_qfile" name="output_qfile" label="${tool.name} on ${on_string}: qfile" >
    <filter>input_qfile != None</filter>
@@ -91,6 +96,9 @@
   <data format="align.report" name="output_alignreport" label="${tool.name} on ${on_string}: align.report" >
    <filter>input_alignreport != None</filter>
   </data>
+  <data format="taxonomy" name="output_taxonomy" label="${tool.name} on ${on_string}: taxonomy" >
+   <filter>input_taxonomy != None</filter>
+  </data>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/sens.spec.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/sens.spec.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -28,9 +28,8 @@
   <param name="dist" type="data" format="dist" label="phylip,column - Distance Matrix"/>
   <param name="label" type="select" optional="true" label="label - Select OTU Labels to include" multiple="true" 
      help="By default all are included if no selection is made.">
-   <options from_dataset="list">
-    <column name="name" index="0"/>
-    <column name="value" index="0"/>
+   <options>
+    <filter type="data_meta" ref="list" key="labels" />
    </options>
   </param>
   <param name="precision" type="integer" value="100" optional="true" label="precision - Precision for rounding distance values"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/seq.error.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,172 @@
+<tool id="mothur_seq_error" name="Seq.error" version="1.22.0">
+ <description>assess error rates in sequencing data</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
+  #if 'summary' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.summary$:'" + $summary_out.__str__]
+  #end if
+  #if 'seq' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.seq$:'" + $seq_out.__str__]
+  #end if
+  #if 'seq_forward' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.seq.forward$:'" + $seq_forward_out.__str__]
+  #end if
+  #if 'seq_reverse' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.seq.reverse$:'" + $seq_reverse_out.__str__]
+  #end if
+  #if 'chimera' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.chimera$:'" + $chimera_out.__str__]
+  #end if
+  #if 'count' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.count$:'" + $count_out.__str__]
+  #end if
+  #if 'matrix' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.matrix$:'" + $matrix_out.__str__]
+  #end if
+  #if 'ref_query' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.ref-query$:'" + $ref_query_out.__str__]
+  #end if
+  --cmd='seq.error'
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta_in
+  --reference=$alignment.template
+  #if $name_in.__str__ != "None" and len($name_in.__str__) > 0:
+   --name=$name_in
+  #end if
+  #if $qual.use.__str__ == 'yes':
+   --qfile=$qfile_in
+   --alignreport=$alignreport_in
+   #if 'quality' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.quality$:'" + $quality_out.__str__]
+   #end if
+   #if 'qual_forward' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.qual.forward$:'" + $qual_forward_out.__str__]
+   #end if
+   #if 'qual_reverse' in $output_sel.__str__.split(','):
+    #set results = $results + ["'^\S+.error.qual.reverse$:'" + $qual_reverse_out.__str__]
+   #end if
+  #end if
+  #if $threshold.__str__ != '':
+   --threshold=$threshold
+  #end if
+  $ignorechimeras
+  --result=#echo ','.join($results)
+  --processors=8
+ </command>
+ <inputs>
+  <param name="fasta_in" type="data" format="align" label="fasta - Candiate Sequences"/>
+  <conditional name="alignment">
+   <param name="source" type="select" label="Select Reference Template from" help="">
+    <option value="ref">Cached Reference</option>
+    <option value="history">Your History</option>
+   </param>
+   <when value="ref">
+    <param name="template" type="select" label="reference - 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="history">
+    <param name="template" type="data" format="align" label="reference - Reference to align with" help=""/>
+   </when>
+  </conditional>
+
+  <param name="name_in" type="data" format="names" optional="true" label="name - Sequences Name reference"/>
+
+  <conditional name="qual">
+   <param name="use" type="select" label="Include a quality file and an alignment report as inputs" help="">
+    <option value="no">No</option>
+    <option value="yes">Yes</option>
+   </param>
+   <when value="yes"> 
+    <param name="qfile_in" type="data" format="qual" label="qfile - Fasta Quality"/>
+    <param name="alignreport_in" type="data" format="align.report" label="alignreport - Align Report"/>
+   </when>
+   <when value="no"/> 
+  </conditional>
+
+  <param name="threshold" type="float" value="" optional="true" label="threshold - error rate at which to report (default 1.)"
+         help="">
+   <validator type="in_range" message="error rate threshold between 0. and 1." min="0.0" max="1.0"/>
+  </param>
+  <param name="ignorechimeras" type="boolean" truevalue="" falsevalue="--ignorechimeras=false" checked="true" label="ignorechimeras - " />
+
+  <param name="output_sel" type="select" multiple="true" display="checkboxes" label="Outputs as history datasets" >
+    <option value="summary">error.summary</option>
+    <option value="seq">error.seq</option>
+    <option value="seq_forward">error.seq.forward</option>
+    <option value="seq_reverse">error.seq.reverse</option>
+    <option value="chimera">error.chimera</option>
+    <option value="count">error.count</option>
+    <option value="matrix">error.matrix</option>
+    <option value="quality">error.quality</option>
+    <option value="qual_forward">error.qual.forward</option>
+    <option value="qual_reverse">error.qual.reverse</option>
+    <option value="ref_query">error.ref-query</option>
+  </param>
+ </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}: error.summary" >
+   <filter>('summary' in output_sel)</filter>
+  </data>
+  <data format="fasta" name="seq_out" label="${tool.name} on ${on_string}: error.seq" >
+   <filter>('seq' in output_sel)</filter>
+  </data>
+  <data format="tabular" name="seq_forward_out" label="${tool.name} on ${on_string}: error.seq.forward" >
+   <filter>('seq_forward' in output_sel)</filter>
+  </data>
+  <data format="tabular" name="seq_reverse_out" label="${tool.name} on ${on_string}: error.seq.reverse" >
+   <filter>('seq_reverse' in output_sel)</filter>
+  </data>
+  <data format="tabular" name="chimera_out" label="${tool.name} on ${on_string}: error.chimera" >
+   <filter>('chimera' in output_sel)</filter>
+  </data>
+  <data format="tabular" name="count_out" label="${tool.name} on ${on_string}: error.count" >
+   <filter>('count' in output_sel)</filter>
+  </data>
+  <data format="tabular" name="matrix_out" label="${tool.name} on ${on_string}: error.matrix" >
+   <filter>('matrix' in output_sel)</filter>
+  </data>
+  <data format="tabular" name="quality_out" label="${tool.name} on ${on_string}: error.quality" >
+   <filter>('quality' in output_sel)</filter>
+  </data>
+  <data format="tabular" name="qual_forward_out" label="${tool.name} on ${on_string}: error.qual.forward" >
+   <filter>('qual_forward' in output_sel)</filter>
+  </data>
+  <data format="tabular" name="qual_reverse_out" label="${tool.name} on ${on_string}: error.qual.reverse" >
+   <filter>('qual_reverse' in output_sel)</filter>
+  </data>
+  <data format="align" name="ref_query_out" label="${tool.name} on ${on_string}: error.ref-query" >
+   <filter>('ref_query' in output_sel)</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 seq.error_ command evaluates error rate for sequences by comparing to the fasta-formatted template_alignment_.
+This is demonstrated in http://www.mothur.org/wiki/Schloss_SOP#Error_analysis
+
+.. _template_alignment: http://www.mothur.org/wiki/Alignment_database
+.. _seq.error: http://www.mothur.org/wiki/Seq.error
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/sffinfo.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/sffinfo.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_sffinfo" name="Sffinfo" version="1.19.0">
+<tool id="mothur_sffinfo" name="Sffinfo" version="1.24.0">
  <description>Summarize the quality of sequences</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -33,7 +33,7 @@
   <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="flow" type="boolean" truevalue="--flow=true" falsevalue="--flow=false" checked="true" 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>
@@ -48,7 +48,7 @@
   <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">
+  <data format="sff.flow" name="out_flow" label="${tool.name} on ${on_string}: flowgram">
    <filter>flow == True</filter>
   </data>
  </outputs>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/shhh.flows.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,103 @@
+<tool id="mothur_shhh_flows" name="Shhh.flows" version="1.22.0" force_history_refresh="True">
+ <description>Denoise flowgrams (PyroNoise algorithm)</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  --cmd='shhh.flows'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.shhh\.fasta$:'$shhh_fasta,'^\S+\.shhh\.qual$:'$shhh_qual,'^\S+\.shhh\.names$:'$shhh_names,'^\S+\.shhh\.groups$:'$shhh_groups,'^\S+\.shhh\.counts$:'$shhh_counts
+  --outputdir='$logfile.extra_files_path'
+  --flow=$flow
+  --lookup=$prob.lookup
+  #if $maxiter.__str__ != '':
+   --maxiter=$maxiter 
+  #end if
+  #if $mindelta.__str__ != '':
+   --mindelta=$mindelta 
+  #end if
+  #if $cutoff.__str__ != '':
+   --cutoff=$cutoff 
+  #end if
+  #if $sigma.__str__ != '':
+   --sigma=$sigma 
+  #end if
+  #if $order.__str__.strip() != '':
+   --order=$order 
+  #end if
+  --processors=8
+ </command>
+ <inputs>
+  <param name="flow" type="data" format="sff.flow" label="flow - flowgram data" 
+         help="Use sffinfo to generate flow data from an sff file and usually trimmed by trim.flows"/>
+  <conditional name="prob">
+   <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="lookup" type="select" format="tabular" label="lookup - intensity value per homopolymer length"
+     help="table of the probability of observing an intensity value for a given homopolymer length">
+     <options from_file="mothur_lookup.loc">
+      <column name="name" index="0" />
+      <column name="value" index="1" />
+     </options>
+    </param>
+   </when>
+   <when value="hist">
+    <param name="lookup" type="data" format="tabular" label="lookup - intensity value per homopolymer length"
+           help="from http://www.mothur.org/wiki/Lookup_files"/>
+   </when>
+  </conditional>
+
+  <param name="maxiter" type="integer" value="1000" optional="true" label="maxiter - maximum iterations to run (default 1000)" help="if the delta value does not first drop below the mindelta value. ">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+  </param>
+
+  <param name="mindelta" type="float" value="" optional="true" label="mindelta - threshold for determining how much change in the flowgram correction is allowed" 
+         help="default .0000001 (10^-6)">
+   <validator type="in_range" message="mindelta between 0. and .1" min="0.0" max="0.1"/>
+  </param>
+
+  <param name="cutoff" type="float" value="" optional="true" label="cutoff - seed the expectation-maximizaton step" 
+         help="default .01 (usually doesn't need to be changed)">
+   <validator type="in_range" message="cutoff between 0. and 1." min="0.0" max="1.0"/>
+  </param>
+
+  <param name="sigma" type="float" value="" optional="true" label="sigma - the dispersion of the data in the expectation-maximization step of the algorithm" 
+         help="default .06 (usually doesn't need to be changed)">
+   <validator type="in_range" message="sigma between 0. and 1." min="0.0" max="1.0"/>
+  </param>
+
+  <param name="order" type="text" value="" label="order - flow order for nucleotides in the sequencer" 
+         help="default is TACG"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format_source="fasta" name="shhh_fasta" label="${tool.name} on ${on_string}: shhh.fasta"/>
+  <data format_source="qual454" name="shhh_qual" label="${tool.name} on ${on_string}: shhh.qual"/>
+  <data format_source="names" name="shhh_names" label="${tool.name} on ${on_string}: shhh.names"/>
+  <data format_source="groups" name="shhh_groups" label="${tool.name} on ${on_string}: shhh.groups"/>
+  <data format_source="tabular" name="shhh_counts" label="${tool.name} on ${on_string}: shhh.counts"/>
+ </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 shhh.flows_ command is Pat Schloss's translation of Chris Quince's PyroNoise algorithm [1] from C to C++ with the incorporation of mothur's bells and whistles. Based on processing of test datasets provided by Quince, shhh.flows gives the same/similar output to AmpliconNoise. shhh.flows uses a expectation-maximization algorithm to correct flowgrams to identify the idealized form of each flowgram and translate that flowgram to a DNA sequence. Our testing has shown that when Titanium data are trimmed to 450 flows using trim.flows, shhh.flows provides the highest quality data for any other method available. In contrast, when we use the min/max number of flows suggested by Quince of 360/720, the error rate is not that great. This much improved error rate does come at a computational cost. Whereas the features in trim.seqs take on the order of minutes, shhh.flows can take on the order of hours.  You will also need a lookup file that tells shhh.flows the probability of observing an intensity value for a given homopolymer length. You can get mothur-compatible files at: http://www.mothur.org/wiki/Lookup_files 
+
+.. _shhh.flows: http://www.mothur.org/wiki/Shhh.flows
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/shhh.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,56 @@
+<tool id="mothur_shhh_seqs" name="Shhh.seqs" version="1.23.0">
+ <description>Denoise program (Quince SeqNoise)</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  --cmd='shhh.seqs'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.shhh\.fasta$:'$shhh_fasta,'^\S+\.shhh\.names$:'$shhh_names,'^\S+\.shhh\.map$:'$shhh_map
+  --outputdir='$logfile.extra_files_path'
+  --fasta=$fasta
+  --name=$name
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --group=$group
+  #end if
+  #if $sigma.__str__ != '':
+   --sigma=$sigma 
+  #end if
+  --processors=8
+ </command>
+ <inputs>
+  <param name="fasta" type="data" format="fasta" label="fasta - Sequences" help=""/>
+  <param name="name" type="data" format="names" label="name - Sequences Name reference"/>
+  <param name="group" type="data" format="groups" optional="true" label="group - Sequences Name reference"/>
+  <param name="sigma" type="float" value="" optional="true" label="sigma" 
+         help="default .01">
+   <validator type="in_range" message="sigma between 0. and 1." min="0.0" max="1.0"/>
+  </param>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format_source="fasta" name="shhh_fasta" label="${tool.name} on ${on_string}: shhh.fasta"/>
+  <data format_source="names" name="shhh_names" label="${tool.name} on ${on_string}: shhh.names"/>
+  <data format_source="txt" name="shhh_map" label="${tool.name} on ${on_string}: shhh.map"/>
+ </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 shhh.seqs_ command is a mothur-based rewrite of Chris Quince's sequence denoting program, SeqNoise.  Schloss prefers pre.cluster for this operation.
+
+.. _shhh.seqs: http://www.mothur.org/wiki/Shhh.seqs
+
+
+ </help>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/sort.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,94 @@
+<tool id="mothur_sort_seqs" name="Sort.seqs" version="1.24.0">
+ <description>put sequences in different files in the same order</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
+  ## adds .sorted before the last extension to the input file (except group has .pick) 
+  --cmd='sort.seqs'
+  --outputdir='$logfile.extra_files_path'
+  #if $fasta_in.__str__ != "None" and len($fasta_in.__str__) > 0:
+   --fasta=$fasta_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.sorted.\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.sorted.\2',$os.path.basename($qfile_in.__str__)) + ":'" + $qfile_out.__str__]
+  #end if
+  #if $flow_in.__str__ != "None" and len($flow_in.__str__) > 0:
+   --flow=$flow_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.sorted.\2',$os.path.basename($flow_in.__str__)) + ":'" + $flow_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.sorted.\2',$os.path.basename($name_in.__str__)) + ":'" + $name_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 $taxonomy_in.__str__ != "None" and len($taxonomy_in.__str__) > 0:
+   --taxonomy=$taxonomy_in
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.sorted.\2',$os.path.basename($taxonomy_in.__str__)) + ":'" + $taxonomy_out.__str__]
+  #end if
+  #if $accnos.__str__ != "None" and len($accnos.__str__) > 0:
+   --accnos=$accnos
+  #end if
+  $large
+  --result=#echo ','.join($results)
+ </command>
+ <inputs>
+  <param name="fasta_in" type="data" format="fasta" optional="true" label="fasta - sequences"/>
+  <param name="qfile_in" type="data" format="qual" optional="true" label="qfile - sequence quality"/>
+  <param name="flow_in" type="data" format="sff.flow" optional="true" label="flow - sff flowgram "/>
+  <param name="group_in" type="data" format="groups" optional="true" label="groups - sequence groupings"/>
+  <param name="name_in" type="data" format="names" optional="true" label="names - name reference"/>
+  <param name="taxonomy_in" type="select" format="seq.taxonomy" optional="true" label="taxonomy - taxonomy reference"/>
+  <param name="accnos" type="data" format="accnos" optional="true" label="accnos - sort "/>
+  <param name="large" type="boolean" checked="false" truevalue="--large=true" falsevalue="" label="large - Datasets are large and may not fit in RAM"/>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format_source="fasta_in" name="fasta_out" label="${tool.name} on ${on_string}: sorted.fasta">
+    <filter>fasta_in != None</filter>
+  </data>
+  <data format_source="qfile_in" name="qfile_out" label="${tool.name} on ${on_string}: sorted.qfile">
+    <filter>qfile_in != None</filter>
+  </data>
+  <data format_source="flow_in" name="flow_out" label="${tool.name} on ${on_string}: sorted.flow">
+    <filter>flow_in != None</filter>
+  </data>
+  <data format_source="group_in" name="group_out" label="${tool.name} on ${on_string}: sorted.group">
+    <filter>group_in != None</filter>
+  </data>
+  <data format_source="name_in" name="name_out" label="${tool.name} on ${on_string}: sorted.name">
+    <filter>name_in != None</filter>
+  </data>
+  <data format_source="taxonomy_in" name="taxonomy_out" label="${tool.name} on ${on_string}: sorted.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 sort.seqs_ command puts sequences from a fasta, name, group, quality, flow or taxonomy file in the same order.
+You can provide an accnos file to indicate the order you want, otherwise mothur will use the order of the first file it reads.
+
+.. _sort.seqs: http://www.mothur.org/wiki/Sort.seqs
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/split.abund.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/split.abund.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_split_abund" name="Split.abund" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_split_abund" name="Split.abund" version="1.20.0" force_history_refresh="True">
  <description>Separate sequences into rare and abundant groups</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -10,10 +10,10 @@
   #set datasets = []
   #if $as_datasets.__str__ == "yes":
    --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'
+   --new_datasets='^\S+?\.((unique|[0-9.]+)\.(rare|abund)\.fasta)$:${fasta.ext}','^\S+?\.((unique|[0-9.]+)\.(rare|abund)\.groups)$:groups','^\S+?\.((unique|[0-9.]+)\.(rare|abund)\.accnos)$:accnos'
   #end if
   --fasta=$fasta
-  #set datasets = $datasets + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'^\1.(.*\.fasta)$',$os.path.basename($fasta.__str__)) + ":fasta'"]
+  #set datasets = $datasets + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'^\1.(.*\.fasta)$',$os.path.basename($fasta.__str__)) + ":" + $fasta.ext + "'"]
   #if $search.type == "list":
    --list=$search.input
    #set datasets = $datasets + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'^\1.(.*\.list)$',$os.path.basename($search.input.__str__)) + ":list'"]
@@ -59,9 +59,8 @@
    <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" help="Select OTU Labels to filter out all but selected labels">
-     <options from_dataset="input">
-      <column name="name" index="0"/>
-      <column name="value" index="0"/>
+     <options>
+      <filter type="data_meta" ref="input" key="labels" />
      </options>
     </param>
    </when>
@@ -76,10 +75,8 @@
    <when value="yes">
     <param name="group" type="data" format="groups" 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>
+      <filter type="data_meta" ref="group" key="groups" />
      </options>
     </param>
    </when>
--- a/mothur/tools/mothur/split.groups.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/split.groups.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_split_groups" name="Split.groups" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_split_groups" name="Split.groups" version="1.20.0" force_history_refresh="True">
  <description>Generates a fasta file for each group</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -6,7 +6,7 @@
   --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','^\S+?\.(\S+\.names)$:names'
+  --new_datasets='^\S+?\.(\S+\.fasta)$:${fasta.ext}','^\S+?\.(\S+\.names)$:names'
   --fasta=$fasta
   --group=$group
   #if $name.__str__ != "None" and len($name.__str__) > 0:
@@ -21,10 +21,8 @@
   <param name="name" type="data" format="names" label="name - Names to split by group" optional="true"/>
   <param name="group" type="data" format="groups" label="group - Groups"/>
   <param name="groups" type="select" optional="true" label="groups - Pick groups to analyze" 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>
+    <filter type="data_meta" ref="group" key="groups" />
    </options>
   </param>
  </inputs>
--- a/mothur/tools/mothur/sub.sample.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/sub.sample.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_sub_sample" name="Sub.sample" version="1.19.0">
+<tool id="mothur_sub_sample" name="Sub.sample" version="1.22.0">
  <description>Create a sub sample</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -9,15 +9,15 @@
   --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__]
+   #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__]
+    #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.name_in.__str__)) + ":'" + $names_out.__str__]
    #end if
    #if $input.use_group.to_filter == "yes":
     #if $input.use_group.group_in.__str__ != "None" and len($input.use_group.group_in.__str__) > 0:
      --group=$input.use_group.group_in
-     #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.subsample.\2',$os.path.basename($input.use_group.group_in.__str__)) + ":'" + $group_out.__str__]
+     #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
@@ -26,11 +26,11 @@
    #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__]
+   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1\\.subsample\\.\2',$os.path.basename($input.otu_in.__str__)) + ":'" + $list_out.__str__]
    #if $input.use_group.to_filter == "yes":
     #if $input.use_group.group_in.__str__ != "None" and len($input.use_group.group_in.__str__) > 0:
      --group=$input.use_group.group_in
-     #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)',r'\1.subsample.\2',$os.path.basename($input.use_group.group_in.__str__)) + ":'" + $group_out.__str__]
+     #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
@@ -42,7 +42,7 @@
    #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__]
+   #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
@@ -51,13 +51,13 @@
    #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__]
+   #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__]
+   #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
@@ -88,10 +88,8 @@
      <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>
+        <filter type="data_meta" ref="group_in" key="groups" />
        </options>
       </param>
       <param name="persample" type="boolean" truevalue="--persample=true" falsevalue="" checked="false" label="persample - select subsample of the same size from each of the groups"/>
@@ -109,54 +107,45 @@
      <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>
+        <filter type="data_meta" ref="group_in" key="groups" />
        </options>
       </param>
       <param name="persample" type="boolean" truevalue="--persample=true" falsevalue="" checked="false" label="persample - select subsample of the same size from each of the groups"/>
      </when> <!-- yes -->
     </conditional> <!-- use_group -->
     <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
-     <options from_dataset="otu_in">
-      <column name="name" index="0"/>
-      <column name="value" index="0"/>
+     <options>
+      <filter type="data_meta" ref="otu_in" key="labels" />
      </options>
     </param>
    </when> <!-- list -->
    <when value="shared">
-    <param name="otu_in" type="data" format="shared" label="shared - OTU List"/>
+    <param name="otu_in" type="data" format="shared" label="shared - OTU Shared"/>
     <param name="groups" type="select" optional="true" label="groups - Pick groups to include" multiple="true">
-     <options from_dataset="otu_in">
-      <column name="name" index="1"/>
-      <column name="value" index="1"/>
-      <filter type="unique_value" name="unq_grp" column="1" />
+     <options>
+      <filter type="data_meta" ref="otu_in" key="groups" />
      </options>
     </param>
     <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
-     <options from_dataset="otu_in">
-      <column name="name" index="0"/>
-      <column name="value" index="0"/>
-      <filter type="unique_value" name="unq_lbl" column="0" />
+     <options>
+      <filter type="data_meta" ref="otu_in" key="labels" />
      </options>
     </param>
    </when> <!-- shared -->
    <when value="sabund">
-    <param name="otu_in" type="data" format="sabund" label="sabund - OTU List"/>
+    <param name="otu_in" type="data" format="sabund" label="sabund - OTU Species Abundance"/>
     <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
-     <options from_dataset="otu_in">
-      <column name="name" index="0"/>
-      <column name="value" index="0"/>
+     <options>
+      <filter type="data_meta" ref="otu_in" key="labels" />
      </options>
     </param>
    </when> <!-- sabund -->
    <when value="rabund">
-    <param name="otu_in" type="data" format="rabund" label="rabund - OTU List"/>
+    <param name="otu_in" type="data" format="rabund" label="rabund - OTU Relative Abundance"/>
     <param name="label" type="select" label="label - OTU Labels" optional="true" multiple="true">
-     <options from_dataset="otu_in">
-      <column name="name" index="0"/>
-      <column name="value" index="0"/>
+     <options>
+      <filter type="data_meta" ref="otu_in" key="labels" />
      </options>
     </param>
    </when> <!-- rabund -->
@@ -165,7 +154,7 @@
  </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">
+  <data format_source="fasta_in" name="fasta_out" label="${tool.name} on ${on_string}: subsample.fasta">
    <filter>input['format'] == 'fasta'</filter>
   </data>
   <data format="list" name="list_out" label="${tool.name} on ${on_string}: subsample.list">
@@ -181,12 +170,12 @@
    <filter>input['format'] == 'rabund'</filter>
   </data>
   <!--  This doesn't appear to be generated even though the documentation says it is
+  -->
   <data format="names" name="names_out" label="${tool.name} on ${on_string}: subsample.names">
    <filter>(input['format'] == 'fasta' and input['name_in'] != None)</filter>
   </data>
-  -->
   <data format="groups" name="group_out" label="${tool.name} on ${on_string}: subsample.groups">
-   <filter>input['use_group']['group_in'] != None</filter>
+   <filter>((input['format'] == 'fasta' or input['format'] == 'list') and input['use_group'] == 'yes')</filter>
   </data>
  </outputs>
  <requirements>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/summary.qual.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,43 @@
+<tool id="mothur_summary_qual" name="Summary.qual" version="1.23.0">
+ <description>Summarize the quality scores</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='summary.qual'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.summary$:'$out_summary
+  --outputdir='$logfile.extra_files_path'
+  --qfile=$qfile
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --name=$name
+  #end if
+  ## --processors=8
+ </command>
+ <inputs>
+  <param name="qfile" type="data" format="qual" label="qfile - Sequence Quality file"/>
+  <param name="name" type="data" format="names" optional="true" label="name - Names"/>
+ </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.qual_ command reads a quality file and an optional name, and summarizes the quality information.
+
+.. _summary.qual: http://www.mothur.org/wiki/Summary.qual
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/summary.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/summary.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -9,6 +9,7 @@
   #if $name.__str__ != "None" and len($name.__str__) > 0:
    --name=$name
   #end if
+ --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="fasta,align" label="fasta - Dataset"/>
--- a/mothur/tools/mothur/summary.shared.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/summary.shared.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_summary_shared" name="Summary.shared" version="1.19.0"  force_history_refresh="True">
+<tool id="mothur_summary_shared" name="Summary.shared" version="1.23.0"  force_history_refresh="True">
  <description>Summary of calculator values for OTUs</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -19,30 +19,61 @@
   #end if
   $all
   $distance
+  --processors=8
  </command>
  <inputs>
-  <param name="otu" type="data" format="shared" label="read.otu(shared=) - OTU Shared"/>
+  <param name="otu" type="data" format="shared" label="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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </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>
+    <filter type="data_meta" ref="otu" key="groups" />
    </options>
   </param>
   <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
-   <options from_file="mothur_calculators.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>
+   <option value="sharedsobs" selected="true">sharedsobs - Shared community richness the observed richness shared between two or more samples</option>
+   <option value="sharedchao" selected="true">sharedchao - Shared community richness the two or more sample shared Chao1 richness estimator</option>
+   <option value="sharedace" selected="true">sharedace - Shared community richness the two sample shared ACE richness estimator</option>
+   <option value="anderberg">anderberg - Community Membership Similarity the Anderberg similarity coefficient</option>
+   <option value="jclass" selected="true">jclass - Community Membership Similarity the traditional Jaccard similarity coefficient based on the observed richness</option>
+   <option value="jest" selected="true">jest - Community Membership Similarity the Jaccard similarity coefficient based on the Chao1 estimated richnesses</option>
+   <option value="kulczynski">kulczynski - Community Membership Similarity the Kulczynski similarity coefficient</option>
+   <option value="kulczynskicody">kulczynskicody - Community Membership Similarity the Kulczynski-Cody similarity coefficient</option>
+   <option value="kstest">kstest - Community Membership Similarity Kolmogorov-Smirnov test</option>
+   <option value="lennon">lennon - Community Membership Similarity the Lennon similarity coefficient</option>
+   <option value="ochiai">ochiai - Community Membership Similarity the Ochiai similarity coefficient</option>
+   <option value="sorclass" selected="true">sorclass - Community Membership Similarity the Sorenson similarity coefficient based on the observed richness</option>
+   <option value="sorest" selected="true">sorest - Community Membership Similarity the Sorenson similarity coefficient based on the Chao1 estimated richnesses</option>
+   <option value="whittaker">whittaker - Community Membership Similarity the Whittaker similarity coefficient</option>
+   <option value="hamming">hamming - Community Membership Similarity -</option>
+   <option value="memchi2">memchi2 - Community Membership Similarity -</option>
+   <option value="memchord">memchord - Community Membership Similarity -</option>
+   <option value="memeuclidean">memeuclidean - Community Membership Similarity -</option>
+   <option value="mempearson">mempearson - Community Membership Similarity -</option>
+   <option value="braycurtis">braycurtis - Community Structure Similarity the Bray-Curtis similarity coefficient</option>
+   <option value="jabund" selected="true">jabund - Community Structure Similarity the abundance-based Jaccard similarity coefficient</option>
+   <option value="morisitahorn">morisitahorn - Community Structure Similarity the Morisita-Horn similarity coefficient</option>
+   <option value="sorabund" selected="true">sorabund - Community Structure Similarity the abundance-based Sorenson similarity coefficient</option>
+   <option value="thetan" selected="true">thetan - Community Structure Similarity the Smith theta similarity coefficient</option>
+   <option value="thetayc" selected="true">thetayc - Community Structure Similarity the Yue &amp; Clayton theta similarity coefficient</option>
+   <option value="canberra">canberra - Community Structure Similarity -</option>
+   <option value="gower">gower - Community Structure Similarity -</option>
+   <option value="hellinger">hellinger - Community Structure Similarity -</option>
+   <option value="manhattan">manhattan - Community Structure Similarity -</option>
+   <option value="odum">odum - Community Structure Similarity -</option>
+   <option value="soergel">soergel - Community Structure Similarity -</option>
+   <option value="spearman">spearman - Community Structure Similarity -</option>
+   <option value="speciesprofile">speciesprofile - Community Structure Similarity -</option>
+   <option value="structchi2">structchi2 - Community Structure Similarity -</option>
+   <option value="structchord">structchord - Community Structure Similarity -</option>
+   <option value="structeuclidean">structeuclidean - Community Structure Similarity -</option>
+   <option value="structkulczynski">structkulczynski - Community Structure Similarity -</option>
+   <option value="structpearson">structpearson - Community Structure Similarity -</option>
+   <option value="sharednseqs">sharednseqs - Utility the number of sequences in two samples</option>
+   <option value="sharedobserved">sharedobserved - Utility the number of sequences in two samples</option>
   </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"/>
--- a/mothur/tools/mothur/summary.single.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/summary.single.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -37,19 +37,36 @@
  <inputs>
   <param name="otu" type="data" format="list,rabund,sabund,shared" label="list,rabund,sabund,shared - 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>
+    <filter type="data_meta" ref="otu" key="labels" />
    </options>
   </param>
   <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
-   <options from_file="mothur_calculators.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>
+   <option value="ace" selected="true">ace - Community richness the ACE estimator</option>
+   <option value="bootstrap">bootstrap - Community richness the bootstrap estimator</option>
+   <option value="chao" selected="true">chao - Community richness the Chao1 estimator</option>
+   <option value="jack" selected="true">jack - Community richness the jackknife estimator</option>
+   <option value="sobs" selected="true">sobs - Community richness the observed richness</option>
+   <option value="simpsoneven">simpsoneven - Community evenness a Simpson index-based measure of evenness</option>
+   <option value="shannoneven">shannoneven - Community evenness a Shannon index-based measure of evenness</option>
+   <option value="heip">heip - Community evenness Heip's metric of community evenness</option>
+   <option value="smithwilson">smithwilson - Community evenness Smith and Wilson's metric of community evenness</option>
+   <option value="bergerparker">bergerparker - Community diversity the Berger-Parker index</option>
+   <option value="coverage">coverage - Community diversity the sampling coverage </option>
+   <option value="goodscoverage">goodscoverage - Community diversity the Good's estimate of sampling coverage </option>
+   <option value="simpson" selected="true">simpson - Community diversity the Simpson index</option>
+   <option value="invsimpson">invsimpson - Community diversity the Simpson index</option>
+   <option value="qstat">qstat - Community diversity the Q statistic</option>
+   <option value="shannon" selected="true">shannon - Community diversity the Shannon index</option>
+   <option value="npshannon" selected="true">npshannon - Community diversity the non-parametric Shannon index</option>
+   <option value="boneh">boneh - Estimator Boneh's estimator</option>
+   <option value="efron">efron - Estimator Efron's estimator</option>
+   <option value="shen">shen - Estimator Shen's estimator</option>
+   <option value="solow">solow - Estimator Solow's estimator</option>
+   <option value="logseries">logseries - Statistical distribution tests whether observed data follow the log series distribution</option>
+   <option value="geometric">geometric - Statistical distribution tests whether observed data follow the geometric series distribution</option>
+   <option value="bstick">bstick - Statistical distribution tests whether observed data follow the broken stick distribution</option>
+   <option value="nseqs">nseqs - Utility the number of sequences in a sample</option>
   </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 - "/>
@@ -81,6 +98,7 @@
 
 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.  This can be useful if you aren't interested in generating collector's or rarefaction curves for your multi-sample data analysis. It would be worth your while, however, to look at the collector's curves for the calculators you are interested in to determine how sensitive the values are to sampling. If the values are not sensitive to sampling, then you can trust the values. Otherwise, you need to keep sampling.  For calc parameter choices see: http://www.mothur.org/wiki/Calculators
 
+.. _group: http://www.mothur.org/wiki/Group_file
 .. _summary.single: http://www.mothur.org/wiki/Summary.single
 
  </help>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/summary.tax.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,84 @@
+<tool id="mothur_summary_tax" name="Summary.tax" version="1.22.0">
+ <description>Assign sequences to taxonomy</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  --cmd='summary.tax'
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.tax\.summary$:'$tax_summary
+  --outputdir='$logfile.extra_files_path'
+  --taxonomy=$tax.taxonomy
+  #if $name.__str__ != "None" and len($name.__str__) > 0:
+   --name='$name'
+  #end if
+  #if $group.__str__ != "None" and len($group.__str__) > 0:
+   --group='$group'
+  #end if
+  #if $reftax.source != 'none' and len($reftax.taxonomy.__str__) > 0:
+   --reftaxonomy=$reftax.taxonomy
+  #end if
+ </command>
+ <inputs>
+  <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="seq.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="seq.taxonomy" label="taxonomy - Taxonomy Reference"/>
+   </when>
+  </conditional>
+  <param name="name" type="data" format="names" optional="true" label="name - taxonomy sequence names"/>
+  <param name="group" type="data" format="groups" optional="true" label="group - Groups for summary file"/>
+  <conditional name="reftax">
+   <param name="source" type="select" label="Select Reference Taxonomy used in Summary.seqs from" help="Including the reference taxonomy file used when you classified your sequences keep the rankIDs in the summary file static.">
+    <option value="none">Selection is Optional</option>
+    <option value="hist">History</option>
+    <option value="ref">Cached Reference</option>
+   </param>
+   <when value="none"/>
+   <when value="ref">
+    <param name="taxonomy" type="select" format="seq.taxonomy" label="reftaxonomy - Taxonomy Reference used when sequences were classified">
+     <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="seq.taxonomy" label="reftaxonomy - Taxonomy Reference used when sequences were classified"/>
+   </when>
+  </conditional>
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="summary" name="tax_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.tax_ command reads a taxonomy file and an optional name and or group file, and summarizes the taxonomy information.
+
+.. _summary.tax: http://www.mothur.org/wiki/Summary.otu
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/tree.shared.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/tree.shared.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_tree_shared" name="Tree.shared" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_tree_shared" name="Tree.shared" version="1.25.0" force_history_refresh="True">
  <description>Generate a newick tree for dissimilarity among groups</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -7,7 +7,7 @@
    --result='^mothur.\S+\.logfile$:'$logfile
    #if $input.as_datasets.__str__ == "yes":
     --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
-    --new_datasets='^\S+?([a-z]+\.(unique|[0-9.]*)\.tre)$:tre'
+    --new_datasets='^\S+?([a-z]+\.(unique|[0-9.]*)(\.(all|ave|cons))?\.tre)$:tre'
    #end if
    --shared=$input.dist
    #if $input.groups.__str__ != "None" and len($input.groups.__str__) > 0:
@@ -16,6 +16,16 @@
    #if $input.label.__str__ != "None" and len($input.label.__str__) > 0:
     --label='$input.label'
    #end if
+   #if $input.subsampling.use:
+    #if len($input.subsampling.subsample.__str__) > 0 and int($input.subsampling.subsample.__str__) > 0:
+     --subsample=$input.subsampling.subsample
+    #else
+     --subsample=T
+    #end if
+    #if len($input.subsampling.iters.__str__) > 0 and int($input.subsampling.iters.__str__) > 0:
+     --iters=$input.subsampling.iters
+    #end if
+   #end if
   #else: 
    --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.tre$:'$tre
    --outputdir='$logfile.extra_files_path'
@@ -32,6 +42,7 @@
   #if $calc.__str__ != "None" and len($calc.__str__) > 0:
    --calc=$calc
   #end if
+  --processors=8
  </command>
  <inputs>
   <!-- column,name  phylip  or shared -->
@@ -53,28 +64,69 @@
      <param name="dist" type="data" format="shared" label="shared - OTU Shared"/>
      <param name="as_datasets" type="boolean" truevalue="yes" falsevalue="no" checked="true" label="Create a new history dataset for each label and calculator"/>
      <param name="label" type="select" label="label - OTU Labels" multiple="true">
-      <options from_dataset="dist">
-       <column name="name" index="0"/>
-       <column name="value" index="0"/>
-       <filter type="unique_value" name="unq_lbl" column="0" />
+      <options>
+       <filter type="data_meta" ref="dist" key="labels" />
       </options>
      </param>
      <param name="groups" type="select" label="groups - Groups to consider" multiple="true">
-      <options from_dataset="dist">
-       <column name="name" index="1"/>
-       <column name="value" index="1"/>
-       <filter type="unique_value" name="unq_grp" column="1" />
+      <options>
+       <filter type="data_meta" ref="dist" key="groups" />
       </options>
      </param>
+     <conditional name="subsampling">
+      <param name="use" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="subsample"/>
+      <when value="yes">
+       <param name="subsample" type="integer" value="" optional="true" label="subsample (defaults to the size of the smallest group)"
+              help="Should not exceed the number of sequences in any group"/>
+       <param name="iters" type="integer" value="" optional="true" label="iters - Number of iterations to try (default 1000)">
+         <validator type="in_range" message="Number of iterations must be positive" min="1"/>
+       </param>
+      </when>
+      <when value="no"/>
+     </conditional> <!-- subsampling -->
    </when>
   </conditional>
   <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
-   <options from_file="mothur_calculators.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>
+   <option value="sharedsobs">sharedsobs - Shared community richness the observed richness shared between two or more samples</option>
+   <option value="sharedchao">sharedchao - Shared community richness the two or more sample shared Chao1 richness estimator</option>
+   <option value="sharedace">sharedace - Shared community richness the two sample shared ACE richness estimator</option>
+   <option value="anderberg">anderberg - Community Membership Similarity the Anderberg similarity coefficient</option>
+   <option value="jclass" selected="true">jclass - Community Membership Similarity the traditional Jaccard similarity coefficient based on the observed richness</option>
+   <option value="jest">jest - Community Membership Similarity the Jaccard similarity coefficient based on the Chao1 estimated richnesses</option>
+   <option value="kulczynski">kulczynski - Community Membership Similarity the Kulczynski similarity coefficient</option>
+   <option value="kulczynskicody">kulczynskicody - Community Membership Similarity the Kulczynski-Cody similarity coefficient</option>
+   <option value="kstest">kstest - Community Membership Similarity Kolmogorov-Smirnov test</option>
+   <option value="lennon">lennon - Community Membership Similarity the Lennon similarity coefficient</option>
+   <option value="ochiai">ochiai - Community Membership Similarity the Ochiai similarity coefficient</option>
+   <option value="sorclass">sorclass - Community Membership Similarity the Sorenson similarity coefficient based on the observed richness</option>
+   <option value="sorest">sorest - Community Membership Similarity the Sorenson similarity coefficient based on the Chao1 estimated richnesses</option>
+   <option value="whittaker">whittaker - Community Membership Similarity the Whittaker similarity coefficient</option>
+   <option value="hamming">hamming - Community Membership Similarity -</option>
+   <option value="memchi2">memchi2 - Community Membership Similarity -</option>
+   <option value="memchord">memchord - Community Membership Similarity -</option>
+   <option value="memeuclidean">memeuclidean - Community Membership Similarity -</option>
+   <option value="mempearson">mempearson - Community Membership Similarity -</option>
+   <option value="braycurtis">braycurtis - Community Structure Similarity the Bray-Curtis similarity coefficient</option>
+   <option value="jabund">jabund - Community Structure Similarity the abundance-based Jaccard similarity coefficient</option>
+   <option value="morisitahorn">morisitahorn - Community Structure Similarity the Morisita-Horn similarity coefficient</option>
+   <option value="sorabund">sorabund - Community Structure Similarity the abundance-based Sorenson similarity coefficient</option>
+   <option value="thetan">thetan - Community Structure Similarity the Smith theta similarity coefficient</option>
+   <option value="thetayc" selected="true">thetayc - Community Structure Similarity the Yue &amp; Clayton theta similarity coefficient</option>
+   <option value="canberra">canberra - Community Structure Similarity -</option>
+   <option value="gower">gower - Community Structure Similarity -</option>
+   <option value="hellinger">hellinger - Community Structure Similarity -</option>
+   <option value="manhattan">manhattan - Community Structure Similarity -</option>
+   <option value="odum">odum - Community Structure Similarity -</option>
+   <option value="soergel">soergel - Community Structure Similarity -</option>
+   <option value="spearman">spearman - Community Structure Similarity -</option>
+   <option value="speciesprofile">speciesprofile - Community Structure Similarity -</option>
+   <option value="structchi2">structchi2 - Community Structure Similarity -</option>
+   <option value="structchord">structchord - Community Structure Similarity -</option>
+   <option value="structeuclidean">structeuclidean - Community Structure Similarity -</option>
+   <option value="structkulczynski">structkulczynski - Community Structure Similarity -</option>
+   <option value="structpearson">structpearson - Community Structure Similarity -</option>
+   <option value="sharednseqs">sharednseqs - Utility the number of sequences in two samples</option>
+   <option value="sharedobserved">sharedobserved - Utility the number of sequences in two samples</option>
   </param>
  </inputs>
  <outputs>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mothur/tools/mothur/trim.flows.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -0,0 +1,139 @@
+<tool id="mothur_trim_flows" name="Trim.flows" version="1.22.0" force_history_refresh="True">
+ <description>partition by barcode, trim to length, cull by lenght and mismatches</description>
+ <command interpreter="python">
+  mothur_wrapper.py 
+  #import re, os.path
+  --cmd='trim.flows'
+  ## #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
+  ## #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.good.\2',$os.path.basename($flow.__str__)) + ":'" + $trim_flow.__str__]
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.trim\.flow$:'$trim_flow, '^\S+\.scrap\.flow$:'$scrap_flow,'^\S+\.flow\.files$:'$flow_files,'^\S+\.flow\.fasta$:'$flow_fasta
+  --outputdir='$logfile.extra_files_path'
+  --flow=$flow
+  #if $minflows.__str__ != '':
+   --minflows=$minflows 
+  #end if
+  #if $maxflows.__str__ != '':
+   --maxflows=$maxflows 
+  #end if
+  #if $maxhomop.__str__ != '':
+   --maxhomop=$maxhomop 
+  #end if
+  #if $order.__str__.strip() != '':
+   --order=$order 
+  #end if
+  #if $signal.__str__ != ''
+   --signal=$signal 
+  #end if
+  #if $noise.__str__ != ''
+   --noise=$noise 
+  #end if
+  #if $oligo.add == "yes":
+   --oligos=$oligo.oligos
+   #if $oligo.bdiffs.__str__ != '' and int($oligo.bdiffs.__str__) > 0:
+    --bdiffs=$oligo.bdiffs
+   #end if
+   #if $oligo.pdiffs.__str__ != '' and int($oligo.pdiffs.__str__) > 0:
+    --pdiffs=$oligo.pdiffs
+   #end if
+   #if $oligo.tdiffs.__str__ != '' and int($oligo.tdiffs.__str__) > 0:
+    --tdiffs=$oligo.tdiffs
+   #end if
+   #if $oligo.ldiffs.__str__ != '' and int($oligo.ldiffs.__str__) > 0:
+    --ldiffs=$oligo.ldiffs
+   #end if
+   #if $oligo.sdiffs.__str__ != '' and int($oligo.sdiffs.__str__) > 0:
+    --sdiffs=$oligo.sdiffs
+   #end if
+   --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
+   --new_datasets='^\S+?\.(\S+\.flow)$:sff.flow'
+  #end if
+  $fasta
+  --processors=8
+ </command>
+ <inputs>
+  <param name="flow" type="data" format="sff.flow" label="flow - flowgram data" 
+         help="Use sffinfo to generate flow data from an sff file"/>
+
+  <conditional name="oligo">
+   <param name="add" type="select" label="Trim with an oligos file?" 
+    help="a file that can contain the sequences of the forward and reverse primers and barcodes and their sample identifier. 
+         Each line of the oligos file can start with the key words &quot;forward&quot;, &quot;reverse&quot;, 
+         and &quot;barcode&quot; or it can start with a &quot;#&quot; to tell mothur to ignore that line of the oligos file.  ">
+    <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 - barcodes and primers"/>
+    <param name="bdiffs" type="integer" value="0" label="bdiffs - number of differences to allow in the barcode (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="pdiffs" type="integer" value="0" label="pdiffs - number of differences to allow in the primer (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="tdiffs" type="integer" value="0" label="tdiffs - total number of differences to allow in primer and barcode (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="ldiffs" type="integer" value="0" optional="true" label="ldiffs - total number of differences to allow in linker sequence (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="sdiffs" type="integer" value="0" optional="true" label="sdiffs - total number of differences to allow in spacer sequence (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+   </when>
+  </conditional>
+
+  <param name="minflows" type="integer" value="" optional="true" label="minflows - Minimum number of flows that each sequence must contain to make it in to a &quot;trim&quot; file. (default 450)" help="(Quince uses 360)"/>
+  <param name="maxflows" type="integer" value="" optional="true" label="maxflows - Maximum number of flows after which all other flows should be ignored (default 450)" help="(Quince uses 360 for GSFLX and 720 for Titanium)"/>
+
+  <param name="maxhomop" type="integer" value="" optional="true" label="maxhomop - Maximum homopolymers" 
+         help=""/>
+
+  <param name="signal" type="float" value="" optional="true" label="signal - treat any intensity signal greater than this threshold as a real signal" 
+         help="default .5">
+   <validator type="in_range" message="signal between 0. and 1." min="0.0" max="1.0"/>
+  </param>
+  <param name="noise" type="float" value="" optional="true" label="noise - treat any intensity signal less than this threshold as noise" 
+         help="default .7">
+   <validator type="in_range" message="signal between 0. and 1." min="0.0" max="1.0"/>
+  </param>
+  <param name="order" type="text" value="" label="order - flow order for nucleotides in the sequencer" 
+         help="default is TACG"/>
+
+  <param name="fasta" type="boolean" truevalue="--fasta=true" falsevalue="" checked="false" label="fasta - translate the flowgram data to fasta sequence format"/>
+
+ </inputs>
+ <outputs>
+  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
+  <data format="sff.flow" name="trim_flow" label="${tool.name} on ${on_string}: trim.flow"/>
+  <data format="sff.flow" name="scrap_flow" label="${tool.name} on ${on_string}: scrap.flow"/>
+  <data format="tabular" name="flow_files" label="${tool.name} on ${on_string}: flow.files">
+   <filter>oligos != None</filter>
+  </data>
+  <data format_source="fasta" name="flow_fasta" label="${tool.name} on ${on_string}: flow.fasta">
+   <filter>fasta == 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 trim.flows_ command is analogous to the trim.seqs command, except that it uses the flowgram data that comes bundled in the sff file that is generated by 454 sequencing. It's primary usage is as a preliminary step to running shhh.seqs. Chris Quince has a series of perl scripts that fulfill a similar role [1]. This command will allow you to partition your flowgram data by sample based on the barcode, trim the flows to a specified length range, and cull sequences that are too short or have too many mismatches to barcodes and primers.
+
+.. _trim.flows: http://www.mothur.org/wiki/Trim.flows
+
+
+ </help>
+</tool>
--- a/mothur/tools/mothur/trim.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/trim.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,60 +1,84 @@
-<tool id="mothur_trim_seqs" name="Trim.seqs" version="1.19.0" force_history_refresh="True">
+<tool id="mothur_trim_seqs" name="Trim.seqs" version="1.24.0" force_history_refresh="True">
  <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:
+  #if int($minlength.__str__) > 0:
    --minlength=$minlength 
   #end if
-  #if $maxlength > 0:
+  #if int($maxlength.__str__) > 0:
    --maxlength=$maxlength 
   #end if
-  #if $maxambig >= 0:
+  #if int($maxambig.__str__) >= 0:
    --maxambig=$maxambig 
   #end if
-  #if $maxhomop > 0:
+  #if int($maxhomop.__str__) > 0:
    --maxhomop=$maxhomop 
   #end if
-  #if $keepfirst > 0:
+  #if int($keepfirst.__str__) > 0:
    --keepfirst=$keepfirst 
   #end if
-  #if $removelast > 0:
+  #if int($removelast.__str__) > 0:
    --removelast=$removelast 
   #end if
   #if $oligo.add == "yes":
    --oligos=$oligo.oligos
-   #if $oligo.bdiffs > 0:
+   #if $oligo.bdiffs.__str__ != '' and int($oligo.bdiffs.__str__) > 0:
     --bdiffs=$oligo.bdiffs
    #end if
-   #if $oligo.pdiffs > 0:
+   #if $oligo.pdiffs.__str__ != '' and int($oligo.pdiffs.__str__) > 0:
     --pdiffs=$oligo.pdiffs
    #end if
-   #if $oligo.tdiffs > 0:
+   #if $oligo.tdiffs.__str__ != '' and int($oligo.tdiffs.__str__) > 0:
     --tdiffs=$oligo.tdiffs
    #end if
-   $oligo.allfiles
-   #if $oligo.allfiles.value:
+   #if $oligo.ldiffs.__str__ != '' and int($oligo.ldiffs.__str__) > 0:
+    --ldiffs=$oligo.ldiffs
+   #end if
+   #if $oligo.sdiffs.__str__ != '' and int($oligo.sdiffs.__str__) > 0:
+    --sdiffs=$oligo.sdiffs
+   #end if
+   $oligo.keepforward
+   $oligo.allvalues
+   #if $oligo.allfiles == True:
     --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
-    --new_datasets='^\S+?\.(\S+\.fasta)$:fasta','^\S+?\.(\S+\.groups)$:groups'
+    --new_datasets='^\S+?\.(\S+\.fasta)$:${fasta.ext}','^\S+?\.(\S+\.groups)$:groups'
    #end if
   #end if
   #if $qual.add == "yes":
    --qfile=$qual.qfile
-   #if $qual.qaverage > 0:
+   #if int($qual.qaverage.__str__) > 0:
     --qaverage=$qual.qaverage
    #end if
-   #if $qual.qthreshold > 0:
+   #if int($qual.qthreshold.__str__) > 0:
     --qthreshold=$qual.qthreshold
    #end if
+   #if int($qual.qwindowaverage.__str__) > 0:
+    --qwindowaverage=$qual.qwindowaverage
+   #end if
+   #if int($qual.qwindowsize.__str__) > 0:
+    --qwindowsize=$qual.qwindowsize
+   #end if
+   #if int($qual.rollaverage.__str__) > 0:
+    --rollaverage=$qual.rollaverage
+   #end if
+   #if int($qual.qstepsize.__str__) > 0:
+    --qstepsize=$qual.qstepsize
+   #end if
    $qual.qtrim
   #end if
   $flip 
   --fasta=$fasta
+  #if $names.__str__ != "None" and len($names.__str__) > 0:
+   --name=$names
+  #end if
+  --processors=8
  </command>
  <inputs>
   <param name="fasta" type="data" format="fasta" label="fasta - Sequences"/>
+  <param name="names" type="data" format="name" optional="true" label="name - Sequence representative name list"/>
   <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)"/>
@@ -71,9 +95,22 @@
    <when value="no"/>
    <when value="yes">
     <param name="oligos" type="data" format="oligos" label="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)"/>
+    <param name="bdiffs" type="integer" value="0" label="bdiffs - number of differences to allow in the barcode (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="pdiffs" type="integer" value="0" label="pdiffs - number of differences to allow in the primer (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="tdiffs" type="integer" value="0" label="tdiffs - total number of differences to allow in primer and barcode (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="ldiffs" type="integer" value="0" optional="true" label="ldiffs - total number of differences to allow in linker sequence (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="sdiffs" type="integer" value="0" optional="true" label="sdiffs - total number of differences to allow in spacer sequence (default 0)">
+      <validator type="in_range" message="Number of differences can't be negative" min="0"/>
+    </param>
+    <param name="keepforward" type="boolean" truevalue="--keepforward=true" falsevalue="" checked="false" label="keepforward - keep the primer"/>
     <param name="allfiles" type="boolean" truevalue="--allfiles=true" falsevalue="" checked="false" label="allfiles - separate into file per barcode"/>
    </when>
   </conditional>
@@ -87,6 +124,10 @@
     <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="qwindowaverage" type="integer" value="0" label="qwindowaverage - remove sequences that have an average base quality below this value over a window (ignored if &#060; 1)"/>
+    <param name="qwindowsize" type="integer" value="50" label="qwindowsize - number of bases in a window. Default=50."/>
+    <param name="rollaverage" type="integer" value="0" label="rollaverage - remove sequences that have an average base quality below this value in a rolling window (ignored if &#060; 1)"/>
+    <param name="qstepsize" type="integer" value="1" label="qstepsize - number of bases to move the window over. Default=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>
@@ -95,11 +136,14 @@
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
   <data format_source="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">
+  <data format_source="names" name="trim_names" label="${tool.name} on ${on_string}: trim.names">
+   <filter>names != None</filter>
+  </data>
+  <data format_source="qfile" name="trim_qual" label="${tool.name} on ${on_string}: trim.qual">
    <filter>(qual['add'] == 'yes'  and len(qual['qfile'].__str__) > 0)</filter>
   </data>
-  <data format="fasta" name="scrap_fasta" label="${tool.name} on ${on_string}: scrap.fasta"/>
-  <data format="qual" name="scrap_qual" label="${tool.name} on ${on_string}: scrap.qual">
+  <data format_source="fasta" name="scrap_fasta" label="${tool.name} on ${on_string}: scrap.fasta"/>
+  <data format_source="qfile" name="scrap_qual" label="${tool.name} on ${on_string}: scrap.qual">
    <filter>(qual['add'] == 'yes'  and len(qual['qfile'].__str__) > 0)</filter>
   </data>
   <data format="groups" name="groups_file" label="${tool.name} on ${on_string}: groups">
--- a/mothur/tools/mothur/unifrac.unweighted.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/unifrac.unweighted.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,9 +1,16 @@
-<tool id="mothur_unifrac_unweighted" name="unifrac.unweighted" version="1.19.0">
+<tool id="mothur_unifrac_unweighted" name="unifrac.unweighted" version="1.25.0">
  <description>Describes whether two or more communities have the same structure</description>
  <command interpreter="python">
   mothur_wrapper.py 
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__, "'^\S+\.uwsummary$:'" + $summary.__str__]
+  #set results = $results + ["'^\S+\.unweighted$:'" + $unweighted.__str__]
+  #set results = $results + ["'^\S+\.unweighted\.(column\.|phylip\.)?dist$:'" + $dist.__str__]
+  #set results = $results + ["'^\S+\.unweighted\.ave\.dist$:'" + $ave_dist.__str__]
+  #set results = $results + ["'^\S+\.unweighted\.std\.dist$:'" + $std_dist.__str__]
+  #set results = $results + ["'^\S+\.unweighted\.cons\.tre$:'" + $cons_tree.__str__]
+  #set results = $results + ["'^\S+\.unweighted\.all\.tre$:'" + $all_tree.__str__]
   --cmd='unifrac.unweighted'
-  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.uwsummary$:'$summary,'^\S+\.unweighted\.(column\.|phylip\.)?dist$:'$dist,'^\S+\.unweighted$:'$unweighted
+  ## --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.uwsummary$:'$summary,'^\S+\.unweighted\.(column\.|phylip\.)?dist$:'$dist,'^\S+\.unweighted$:'$unweighted,'^\S+\.unweighted\.ave\.dist$:'$ave_dist,'^\S+\.unweighted\.std\.dist$:'$std_dist,'^\S+\.unweighted\.all\.tre$:'$all_tree,'^\S+\.unweighted\.cons\.tre$:'$cons_tree,
   --outputdir='$logfile.extra_files_path'
   --tree=$tree
   #if $group.__str__ != "None" and len($group.__str__) > 0:
@@ -18,28 +25,47 @@
   #if int($iters.__str__) > 0:
    --iters=$iters
   #end if
-  $random
+  #if $subsampling.use:
+   #if len($subsampling.subsample.__str__) > 0 and int($subsampling.subsample.__str__) > 0:
+    --subsample=$subsampling.subsample
+   #else
+    --subsample=T
+   #end if
+   $subsampling.consensus
+  #else
+   $random
+  #end if
   #if $distance.__str__ != "false":
    --distance=$distance
   #end if
   $root
-  --processors=2
+  --result=#echo ','.join($results)
+  --processors=1
  </command>
  <inputs>
-  <!-- list,group  or shared -->
   <param name="tree" type="data" format="tre" label="tree - Tree"/>
   <param name="group" type="data" format="groups" label="group - Group file for the tree"/>
   <param name="groups" type="select" label="groups - Select groups for pairwise comparisons" multiple="true">
    <help></help>
-   <options from_dataset="group">
-    <column name="name" index="1"/>
-    <column name="value" index="1"/>
-    <filter type="unique_value" name="unq_grp" column="1" />
+   <options>
+    <filter type="data_meta" ref="group" key="groups" />
    </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" />
+  <!-- NOTE: random cannot be used with subsample option, handle in command logic -->
+  <conditional name="subsampling">
+   <param name="use" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="use subsampling of groups"
+          help="(instead of randomly generated comparisons)"/>
+   <when value="yes">
+    <param name="subsample" type="integer" value="" optional="true" label="subsample - (defaults to the size of the smallest group)"
+           help="the size per group of the sample"/>
+    <param name="consensus" type="boolean" truevalue="--consensus=true" falsevalue="" checked="false" label="consensus - " 
+           help="The consensus parameter allows you to indicate you would like trees built from distance matrices created with the results of the subsampling, as well as a consensus tree built from these trees. Default=F"/>
+   </when>
+   <when value="no"/>
+  </conditional> <!-- subsampling -->
   <param name="distance" type="select" label="distance - Create a distance matrix for your history">
    <option value="false">None</option>
    <option value="lt">Phylip Lower Triangle Matrix</option>
@@ -53,7 +79,7 @@
   <data format="tabular" name="summary" label="${tool.name} on ${on_string}: summary">
   </data>
   <data format="tabular" name="unweighted" label="${tool.name} on ${on_string}: unweighted">
-   <filter>(random == True)</filter>
+   <filter>(random == True and subsampling['use'] == False)</filter>
   </data>
   <data format="lower.dist" name="dist" label="${tool.name} on ${on_string}: dist">
    <filter>distance != 'false'</filter>
@@ -62,6 +88,26 @@
     <when input="distance" value="column" format="pair.dist" />
    </change_format>
   </data>
+  <data format="lower.dist" name="ave_dist" label="${tool.name} on ${on_string}: ave.dist">
+   <filter>subsampling['use'] == True</filter>
+   <change_format>
+    <when input="distance" value="square" format="square.dist" />
+    <when input="distance" value="column" format="pair.dist" />
+   </change_format>
+  </data>
+  <data format="lower.dist" name="std_dist" label="${tool.name} on ${on_string}: std.dist">
+   <filter>subsampling['use'] == True</filter>
+   <change_format>
+    <when input="distance" value="square" format="square.dist" />
+    <when input="distance" value="column" format="pair.dist" />
+   </change_format>
+  </data>
+  <data format="tre" name="all_tree" label="${tool.name} on ${on_string}: all.tre">
+   <filter>(subsampling['use'] == True and subsampling['consensus'] == True)</filter>
+  </data>
+  <data format="tre" name="cons_tree" label="${tool.name} on ${on_string}: cons.tre">
+   <filter>(subsampling['use'] == True and subsampling['consensus'] == True)</filter>
+  </data>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/unifrac.weighted.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/unifrac.weighted.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,9 +1,16 @@
-<tool id="mothur_unifrac_weighted" name="unifrac.weighted" version="1.19.0">
+<tool id="mothur_unifrac_weighted" name="unifrac.weighted" version="1.25.0">
  <description>Describes whether two or more communities have the same structure</description>
  <command interpreter="python">
   mothur_wrapper.py 
+  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__, "'^\S+\.wsummary$:'" + $summary.__str__]
+  #set results = $results + ["'^\S+\.weighted$:'" + $weighted.__str__]
+  #set results = $results + ["'^\S+\.weighted\.(column\.|phylip\.)?dist$:'" + $dist.__str__]
+  #set results = $results + ["'^\S+\.weighted\.ave\.dist$:'" + $ave_dist.__str__]
+  #set results = $results + ["'^\S+\.weighted\.std\.dist$:'" + $std_dist.__str__]
+  #set results = $results + ["'^\S+\.weighted\.cons\.tre$:'" + $cons_tree.__str__]
+  #set results = $results + ["'^\S+\.weighted\.all\.tre$:'" + $all_tree.__str__]
   --cmd='unifrac.weighted'
-  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.wsummary$:'$summary,'^\S+\.weighted\.(column\.|phylip\.)?dist$:'$dist,'^\S+\.weighted$:'$weighted
+  ## --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.wsummary$:'$summary,'^\S+\.weighted\.(column\.|phylip\.)?dist$:'$dist,'^\S+\.weighted$:'$weighted
   --outputdir='$logfile.extra_files_path'
   --tree=$tree
   #if $group.__str__ != "None" and len($group.__str__) > 0:
@@ -18,28 +25,47 @@
   #if int($iters.__str__) > 0:
    --iters=$iters
   #end if
-  $random
+  #if $subsampling.use:
+   #if len($subsampling.subsample.__str__) > 0 and int($subsampling.subsample.__str__) > 0:
+    --subsample=$subsampling.subsample
+   #else
+    --subsample=T
+   #end if
+   $subsampling.consensus
+  #else
+   $random
+  #end if
   #if $distance.__str__ != "false":
    --distance=$distance
   #end if
   $root
-  --processors=2
+  --result=#echo ','.join($results)
+  --processors=8
  </command>
  <inputs>
   <param name="tree" type="data" format="tre" label="tree - Tree"/>
   <param name="group" type="data" format="groups" label="group - Group file for the tree"/>
   <param name="groups" type="select" label="groups - Select groups for pairwise comparisons" multiple="true">
    <help></help>
-   <options from_dataset="group">
-    <column name="name" index="1"/>
-    <column name="value" index="1"/>
-    <filter type="unique_value" name="unq_grp" column="1" />
+   <options>
+    <filter type="data_meta" ref="group" key="groups" />
    </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" />
+  <!-- NOTE: random cannot be used with subsample option, handle in command logic -->
+  <conditional name="subsampling">
+   <param name="use" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="use subsampling of groups"
+          help="(instead of randomly generated comparisons)"/>
+   <when value="yes">
+    <param name="subsample" type="integer" value="" optional="true" label="subsample - (defaults to the size of the smallest group)"
+           help="the size per group of the sample"/>
+    <param name="consensus" type="boolean" truevalue="--consensus=true" falsevalue="" checked="false" label="consensus - " 
+           help="The consensus parameter allows you to indicate you would like trees built from distance matrices created with the results of the subsampling, as well as a consensus tree built from these trees. Default=F"/>
+   </when>
+   <when value="no"/>
+  </conditional> <!-- subsampling -->
   <param name="distance" type="select" label="distance - Create a distance matrix for your history">
    <option value="false">None</option>
    <option value="lt">Phylip Lower Triangle Matrix</option>
@@ -53,7 +79,14 @@
   <data format="tabular" name="summary" label="${tool.name} on ${on_string}: summary">
   </data>
   <data format="tabular" name="weighted" label="${tool.name} on ${on_string}: weighted">
-   <filter>(random == True)</filter>
+   <filter>(random == True and subsampling['use'] == False)</filter>
+  </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>
   <data format="lower.dist" name="dist" label="${tool.name} on ${on_string}: dist">
    <filter>distance != 'false'</filter>
@@ -62,10 +95,26 @@
     <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 format="lower.dist" name="ave_dist" label="${tool.name} on ${on_string}: ave.dist">
+   <filter>subsampling['use'] == True</filter>
+   <change_format>
+    <when input="distance" value="square" format="square.dist" />
+    <when input="distance" value="column" format="pair.dist" />
+   </change_format>
   </data>
-  -->
+  <data format="lower.dist" name="std_dist" label="${tool.name} on ${on_string}: std.dist">
+   <filter>subsampling['use'] == True</filter>
+   <change_format>
+    <when input="distance" value="square" format="square.dist" />
+    <when input="distance" value="column" format="pair.dist" />
+   </change_format>
+  </data>
+  <data format="tre" name="all_tree" label="${tool.name} on ${on_string}: all.tre">
+   <filter>(subsampling['use'] == True and subsampling['consensus'] == True)</filter>
+  </data>
+  <data format="tre" name="cons_tree" label="${tool.name} on ${on_string}: cons.tre">
+   <filter>(subsampling['use'] == True and subsampling['consensus'] == True)</filter>
+  </data>
  </outputs>
  <requirements>
   <requirement type="binary">mothur</requirement>
--- a/mothur/tools/mothur/unique.seqs.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/unique.seqs.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_unique_seqs" name="Unique.seqs" version="1.19.0">
+<tool id="mothur_unique_seqs" name="Unique.seqs" version="1.20.0">
  <description>Return unique sequences</description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -16,7 +16,7 @@
  </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_source="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>
--- a/mothur/tools/mothur/venn.xml	Tue Jun 07 17:05:08 2011 -0400
+++ b/mothur/tools/mothur/venn.xml	Wed Sep 05 19:49:43 2012 -0500
@@ -1,4 +1,4 @@
-<tool id="mothur_venn" name="Venn" version="1.19.0"  force_history_refresh="True">
+<tool id="mothur_venn" name="Venn" version="1.23.0"  force_history_refresh="True">
  <description>Generate Venn diagrams for groups </description>
  <command interpreter="python">
   mothur_wrapper.py 
@@ -33,7 +33,9 @@
    #if $input.abund >= 5:
      --abund='$input.abund'
    #end if
-
+  #end if
+  #if 100 > $fontsize > 0:
+   --fontsize=$fontsize
   #end if
  </command>
  <inputs>
@@ -50,17 +52,13 @@
       <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"/>
-       <filter type="unique_value" name="unq_lbl" column="0" />
+      <options>
+       <filter type="data_meta" ref="otu" key="labels" />
       </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>
+       <filter type="data_meta" ref="otu" key="groups" />
       </options>
      </param>
    </when>
@@ -75,15 +73,15 @@
       <validator type="in_range" min="5" />
      </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>
+       <filter type="data_meta" ref="otu" key="labels" />
       </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"/>
+  <param name="fontsize" type="integer" value="24" label="fontsize - Fontsize (default is 24)"/>
   <param name="as_datasets" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Create a new history dataset for each image"/>
  </inputs>
  <outputs>