view mothur/tools/mothur/pre.cluster.xml @ 35:95d75b35e4d2

Updated tools to use Mothur 1.33. Added some misc. fixes and updates (blast repository, tool fixes)
author certain cat
date Fri, 31 Oct 2014 15:09:32 -0400
parents 49058b1f8d3f
children
line wrap: on
line source

<tool id="mothur_pre_cluster" name="Pre.cluster" version="1.24.0">
 <description>Remove sequences due to pyrosequencing errors</description>
 <command interpreter="python">
  mothur_wrapper.py 
  #import re, os.path
  #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
  ## 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 isinstance($name.datatype, $__app__.datatypes_registry.get_datatype_by_extension('name').__class__):
   --name=$name
 #else 
 	--count=$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
	--topdown
 </command>
 <inputs>
  <param name="fasta" type="data" format="fasta" label="fasta - Sequence Fasta"/>
  <param name="name" type="data" format="names,count_table" 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)"/>
<param name="topdown" type="boolean" truevalue="--topdown=true" falsevalue="" checked="false" label="allows you to specify whether to cluster from largest abundance to smallest or vice versa. Default =T, which is largest to smallest"/>
 </inputs>
 <outputs>
  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
  <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="package" version="1.33">mothur</requirement>
 </requirements>
 <tests>
 </tests>
 <help>
**Mothur Overview**

Mothur_, initiated by Dr. Patrick Schloss and his software development team
in the Department of Microbiology and Immunology at The University of Michigan,
provides bioinformatics for the microbial ecology community.

.. _Mothur: http://www.mothur.org/wiki/Main_Page

**Command Documenation**

The pre.cluster_ command implements a pseudo-single linkage algorithm with the goal of removing sequences that are likely due to pyrosequencing errors. The basic idea is that abundant sequences are more likely to generate erroneous sequences than rare sequences. With that in mind, the algorithm proceeds by ranking sequences in order of their abundance. Then we walk through the list of sequences looking for rarer sequences that are within some threshold of the original sequence. Those that are within the threshold are merged with the larger sequence. The original Huse method performs this task on a distance matrix, whereas we do it based on the original sequences. The advantage of our approach is that the algorithm works on aligned sequences instead of a distance matrix. This is advantageous because by pre-clustering you remove a large number of sequences making the distance calculation much faster.

.. _pre.cluster: http://www.mothur.org/wiki/Pre.cluster

v1.24.0: Updated to mothur 1.33, added count and topdown parameter

 </help>
</tool>