view mothur/tools/mothur/trim.seqs.xml @ 2:e990ac8a0f58

Migrated tool version 1.19.0 from old tool shed archive to new tool shed repository
author jjohnson
date Tue, 07 Jun 2011 17:39:06 -0400
parents fcc0778f6987
children 5265aa9067e0
line wrap: on
line source

<tool id="mothur_trim_seqs" name="Trim.seqs" version="1.19.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:
   --minlength=$minlength 
  #end if
  #if $maxlength > 0:
   --maxlength=$maxlength 
  #end if
  #if $maxambig >= 0:
   --maxambig=$maxambig 
  #end if
  #if $maxhomop > 0:
   --maxhomop=$maxhomop 
  #end if
  #if $keepfirst > 0:
   --keepfirst=$keepfirst 
  #end if
  #if $removelast > 0:
   --removelast=$removelast 
  #end if
  #if $oligo.add == "yes":
   --oligos=$oligo.oligos
   #if $oligo.bdiffs > 0:
    --bdiffs=$oligo.bdiffs
   #end if
   #if $oligo.pdiffs > 0:
    --pdiffs=$oligo.pdiffs
   #end if
   #if $oligo.tdiffs > 0:
    --tdiffs=$oligo.tdiffs
   #end if
   $oligo.allfiles
   #if $oligo.allfiles.value:
    --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
    --new_datasets='^\S+?\.(\S+\.fasta)$:fasta','^\S+?\.(\S+\.groups)$:groups'
   #end if
  #end if
  #if $qual.add == "yes":
   --qfile=$qual.qfile
   #if $qual.qaverage > 0:
    --qaverage=$qual.qaverage
   #end if
   #if $qual.qthreshold > 0:
    --qthreshold=$qual.qthreshold
   #end if
   $qual.qtrim
  #end if
  $flip 
  --fasta=$fasta
 </command>
 <inputs>
  <param name="fasta" type="data" format="fasta" label="fasta - Sequences"/>
  <param name="minlength" type="integer" value="0" label="minlength - Minimum Sequence Length (default 0, ignored if &#060; 1 )"/>
  <param name="maxlength" type="integer" value="0" label="maxlength - Maximum Sequence Length (default 0, ignored if &#060; 1)"/>
  <param name="maxambig" type="integer" value="-1" label="maxambig - Maximum ambiguous bases (default -1, ignored if &#060; 0)"/>
  <param name="maxhomop" type="integer" value="0" label="maxhomop - Maximum homopolymers (default 0, ignored if &#060; 1)"/>
  <param name="keepfirst" type="integer" value="0" label="keepfirst - ignored if &#060; 0)" 
         help="trims the sequence to the first keepfirst number of bases after the barcode or primers are removed, before the sequence is checked to see if it meets the other requirements"/>
  <param name="removelast" type="integer" value="0" label="removelast - ignored if &#060; 0)" 
         help="removes the last removelast number of bases after the barcode or primers are removed, before the sequence is checked to see if it meets the other requirements."/>
  <conditional name="oligo">
   <param name="add" type="select" label="Trim with an oligos file?" help="">
    <option value="no">no</option>
    <option value="yes">yes</option>
   </param>
   <when value="no"/>
   <when value="yes">
    <param name="oligos" type="data" format="oligos" label="oligos - 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="allfiles" type="boolean" truevalue="--allfiles=true" falsevalue="" checked="false" label="allfiles - separate into file per barcode"/>
   </when>
  </conditional>
  <conditional name="qual">
   <param name="add" type="select" label="Trim based on a quality file?" help="">
    <option value="no">no</option>
    <option value="yes">yes</option>
   </param>
   <when value="no"/>
   <when value="yes">
    <param name="qfile" type="data" format="qual454" label="qfile - 454 quality file"/>
    <param name="qaverage" type="integer" value="0" label="qaverage - remove sequences that have an average base quality below this value (ignored if &#060; 1)"/>
    <param name="qthreshold" type="integer" value="0" label="qthreshold - remove sequences that have any base quality below this value (ignored if &#060; 1)"/>
    <param name="qtrim" type="boolean" truevalue="--qtrim=true" falsevalue="" checked="false" label="qtrim - trim sequences below qthreshold and put in trim output, else put in scrap "/>
   </when>
  </conditional>
  <param name="flip" type="boolean" truevalue="--flip=true" falsevalue="" checked="false" label="flip - reverse complement the trimmed sequences"/>
 </inputs>
 <outputs>
  <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
  <data format_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">
   <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">
   <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">
   <filter>(oligo['add'] == 'yes' and len(oligo['oligos']) > 0)</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.seqs_ command provides the preprocessing features needed to screen and sort pyrosequences.  The command will enable you to trim off primer sequences and barcodes, use the barcode information to generate a group file and split a fasta file into sub-files, screen sequences based on the qual file that comes from 454 sequencers, cull sequences based on sequence length and the presence of ambiguous bases and get the reverse complement of your sequences. While this analysis is clearly geared towards pyrosequencing collections, it can also be used with traditional Sanger sequences. 

.. _trim.seqs: http://www.mothur.org/wiki/Trim.seqs


 </help>
</tool>