view collectorcurve/collectorcurve.xml @ 5:a982565cd37e draft

Uploaded
author qfab
date Fri, 30 May 2014 03:42:21 -0400
parents a8f9ab5c18d5
children
line wrap: on
line source

<tool id="mothur_collect_single" name="Collector Curve" version="1.0" force_history_refresh="True">
 <description>Calculate and plot collector's curves for OTUs</description>
 <requirements>
   <requirement type="binary">@BINARY@</requirement>
   <requirement type="package" version="1.30.2-1.33.3">mothur</requirement>
 </requirements>
 <command interpreter="bash">
  collectorcurve.sh   
  #if isinstance($otu.datatype, $__app__.datatypes_registry.get_datatype_by_extension('shared').__class__):
   shared
  #elif isinstance($otu.datatype, $__app__.datatypes_registry.get_datatype_by_extension('rabund').__class__):
   rabund
  #elif isinstance($otu.datatype, $__app__.datatypes_registry.get_datatype_by_extension('sabund').__class__):
   sabund
  #elif isinstance($otu.datatype, $__app__.datatypes_registry.get_datatype_by_extension('list').__class__):
   list
  #end if
  $otu
  $label
  $output
  $output.id 
  $__new_file_path__
  #if $calc.__str__ != "None" and len($calc.__str__) > 0:
     $calc
  #end if
  $advancedoption.advanced
  #if $advancedoption.advanced:
    $advancedoption.abundoption.cabund
    #if $advancedoption.abundoption.cabund:
      $advancedoption.abundoption.abund
    #else
     ''
    #end if
    $advancedoption.sizeoption.csize
    #if $advancedoption.sizeoption.csize:
      $advancedoption.sizeoption.size
    #else
     ''
    #end if
    $advancedoption.freqoption.cfreq
    #if $advancedoption.freqoption.cfreq:
      $advancedoption.freqoption.freq
    #else
      ''
    #end if
  #end if
 </command>
 <inputs>
  <param name="otu" type="data" format="rabund,sabund,list,shared" label="OTU list (rabund, sabund, list or shared format)" help="The rabund output from the 'Map Reads to OTU' tool"/>
  <param name="label" type="select" label="Labels - OTU labels" multiple="true" help="Select one or more labels to calculate the collector's curve for. By default all labels are selected" >
   <options>
    <filter type="data_meta" ref="otu" key="labels" />
   </options>
  </param>
  <param name="calc" type="select" label="Calculators" multiple="true" help="Select one or more calculators for collector's curve generation. By default chao, invsimpson and npshannon are selected. Please see the description for information on the calculators.">
   <option value="ace">ace</option>
   <option value="bootstrap">bootstrap</option>
   <option value="chao" selected="true">chao</option>
   <option value="jack">jack</option>
   <option value="sobs">sobs</option>
   <option value="simpsoneven">simpsoneven</option>
   <option value="shannoneven">shannoneven</option>
   <option value="heip">heip</option>
   <option value="smithwilson">smithwilson</option>
   <option value="bergerparker">bergerparker</option>
   <option value="coverage">coverage</option>
   <option value="goodscoverage">goodscoverage</option>
   <option value="simpson">simpson</option>
   <option value="invsimpson" selected="true">invsimpson</option>
   <option value="qstat">qstat</option>
   <option value="shannon">shannon</option>
   <option value="npshannon" selected="true">npshannon</option>
   <option value="boneh">boneh</option>
   <option value="efron">efron</option>
   <option value="shen">shen</option>
   <option value="solow">solow</option>
   <option value="logseries">logseries</option>
   <option value="geometric">geometric</option>
   <option value="bstick">bstick</option>
   <option value="nseqs">nseqs</option>
  </param>
  <conditional name="advancedoption">
    <param name="advanced" type="boolean" value="true" label="Please select to show and specify advanced option" help="Advanced options including specification of ACE Estimator threshold for abundant versus rare OTUs, sample size for OTU predicition and frequency for output."/>
    <when value="true">
  	<conditional name="abundoption">
    	   <param name="cabund" type="boolean" value="true" label="Select, if you would like to specify the ACE Estimator threshold for abundant versus rare OTUs" help=""/>
    	   <when value="true">
    	      <param name="abund" type="integer" value="10" label="Abund - ACE estimator threshold for abundant versus rare OTUs (default 10)"/>
    	   </when>
  	</conditional>
  	<conditional name="sizeoption">
  	   <param name="csize" type="boolean" value="true" label="Select, if you would like to specify the sample size for OTU prediction" help=""/>
  	   <when value="true">
    	      <param name="size" type="integer" value="1" 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"/>
           </when>
  	</conditional>
  	<conditional name="freqoption">
  	   <param name="cfreq" type="boolean" value="true" label="Select, if you would like to specify the frequency for output" help=""/>
  	   <when value="true">
  	      <param name="freq" type="float" value="0.1" label="Frequency - frequency for output (the default setting is to output data every 100 sequences)"
  	          help="Use a decimal between 0 and 1 to set the frequency as a percentage of the number of sequences"/>  	     
           </when>
  	</conditional>
     </when>
  </conditional>
 </inputs>
 <outputs>
  <data format="tabular" name="output" label="${tool.name} on ${on_string}: tab" />
 </outputs>
 <help>
===========
Description
===========

Collector's curve calculation based on mothur's collect.single command.

Collector's curves can be calculated using calculators, that describe the richness, diversity, and other features of individual samples. Collector's curves describe how richness or diversity change as you sample additional individuals. If a collector's curve becomes parallel to the x-axis, you can be reasonably confident that you have done a good job of sampling and can trust the last value in the curve. Otherwise, you need to keep sampling.  
For calculator parameter choices see: mothur_wiki_

.. _mothur_wiki: http://www.mothur.org/wiki/Calculators

-----

----------
Input
----------

OTU list
  rabund,
  sabund,
  list or
  shared format 

----------
Parameters
----------

Labels - OTU labels
  Select labels you want the collector's curve calculated for (e.g. lines labelled 0.03)
  by default collector's curves will be calculated for all labels listed

Calculators 
  Find following the list of available calculators (see mothur_wiki_ for a more detailed description)
  and select calculators for calculating collector's curves .
  Default selection: chao - Community richness, npshannon (non-parametric) and invsimpson - Community diversity 
  
  +---------------+-----------------------------------------------------------------------------------------------+
  | chao          | Community richness the Chao1 estimator                                                        |
  +---------------+-----------------------------------------------------------------------------------------------+
  | invsimpson    | Community diversity the Simpson index                                                         |
  +---------------+-----------------------------------------------------------------------------------------------+
  | npshannon     | Community diversity the non-parametric Shannon index                                          |
  +---------------+-----------------------------------------------------------------------------------------------+
  | ace           | Community richness the ACE estimator                                                          |
  +---------------+-----------------------------------------------------------------------------------------------+
  | bootstrap     | Community richness the bootstrap estimator                                                    |
  +---------------+-----------------------------------------------------------------------------------------------+
  | jack          | Community richness the jackknife estimator                                                    |
  +---------------+-----------------------------------------------------------------------------------------------+
  | sobs          | Community richness the observed richness                                                      |
  +---------------+-----------------------------------------------------------------------------------------------+
  | simpsoneven   | Community evenness a Simpson index-based measure of evenness                                  |
  +---------------+-----------------------------------------------------------------------------------------------+
  | shannoneven   | Community evenness a Shannon index-based measure of evenness                                  |
  +---------------+-----------------------------------------------------------------------------------------------+
  | heip          | Community evenness Heip's metric of community evenness                                        |
  +---------------+-----------------------------------------------------------------------------------------------+
  | smithwilson   | Community evenness Smith and Wilson's metric of community evenness                            |
  +---------------+-----------------------------------------------------------------------------------------------+
  | bergerparker  | Community diversity the Berger-Parker index                                                   |
  +---------------+-----------------------------------------------------------------------------------------------+
  | coverage      | Community diversity the sampling coverage                                                     |
  +---------------+-----------------------------------------------------------------------------------------------+
  | goodscoverage | Community diversity the Good's estimate of sampling coverage                                  |
  +---------------+-----------------------------------------------------------------------------------------------+
  | simpson       | Community diversity the Simpson index                                                         |
  +---------------+-----------------------------------------------------------------------------------------------+
  | qstat         | Community diversity the Q statistic                                                           |
  +---------------+-----------------------------------------------------------------------------------------------+
  | shannon       | Community diversity the Shannon index                                                         |
  +---------------+-----------------------------------------------------------------------------------------------+
  | boneh         | Estimator Boneh's estimator                                                                   |
  +---------------+-----------------------------------------------------------------------------------------------+
  | efron         | Estimator Efron's estimator                                                                   |
  +---------------+-----------------------------------------------------------------------------------------------+
  | shen          | Estimator Shen's estimator                                                                    |
  +---------------+-----------------------------------------------------------------------------------------------+
  | solow         | Estimator Solow's estimator                                                                   |
  +---------------+-----------------------------------------------------------------------------------------------+
  | logseries     | Statistical distribution tests whether observed data follow the log series distribution       |
  +---------------+-----------------------------------------------------------------------------------------------+
  | geometric     | Statistical distribution tests whether observed data follow the geometric series distribution |
  +---------------+-----------------------------------------------------------------------------------------------+
  | bstick        | Statistical distribution tests whether observed data follow the broken stick distribution     |
  +---------------+-----------------------------------------------------------------------------------------------+
  | nseqs         | Utility the number of sequences in a sample                                                   |
  +---------------+-----------------------------------------------------------------------------------------------+


----------------------------
Optional advanced parameters
----------------------------

ACE estimator threshold
  By default the ACE estimator uses 10 as the cutoff between OTUs that are rare and abundant. So if an OTU has more than 10 individuals in it, then it is considered abundant. This is really just an empirical decision and we are merely following the lead of Anne Chao and others who implement 10 in their software. If you would like to use a different cutoff, you can use the abund option.

Size - Sample Size
  Within the suite of calculators available in mothur are a set that will predict the number of additional OTUs that will be observed for a given sample size. By default these calculators will base the prediction on a sample that is the same size as the initial sampling. If you would like to use a different sample size, use the size option.
  The value of size should be between 1 and the size of the initial sampling.   

Frequency
  For larger datasets you might not be interested in obtaining all of the data for the number of sequences sampled. For instance, if you have 100,000 sequences, you may only want to output the data every 100 sequences. Alternatively, if you only have 100 sequences, you may only want to output all of the data. 
  The default setting is to output data every 100 sequences.

------
Output
------

.. class:: warningmark

Please note, the number of outputs is depending on the number of selected calculators. Each selected calculator will result in an extra output, which is indicated by the calculator name in brackets at the end of the output's filename. In case the outputs for the selected calculators are **not** showing in the History panel, refresh your history by clicking on the refresh icon.


(A) A summary file in table format containing the following fields, number of sequences, the sample coverage, the number of observed OTUs, the chao richness estimate, the invsimpson diversity estimate, and the npshannon non-parametric diversity estimate. The summary gives results for each of the listed fields when all available data is used.

(B) Followed by a file for each calculator selected (indicated by the calculator's name in brackets at the end of the output's filename) which can be plotted as collector's curve and used to evaluate how the results of the calculator change with sampling effort.

.. class:: infomark


Use Galaxy's integrated visualization tool to plot the collector's curve. The visualization tool is accessible via the 'Visualize' icon in the extended dataset information area. After having launched the integrated visualization tool select the 'Data Controls' tab. In the 'Data Controls' tab select column 1 (number sampled) as 'Data column for X' and use column 2 (minimum identity, according to select labels) as 'Data column for Y'.

-----

=========
Resources
=========

mothur_

.. _mothur: http://www.mothur.org

**Author**

Patrick D. Schloss (pschloss@umich.edu)

**Wrapper Author**

QFAB Bioinformatics (support@qfab.org)
based on jjohnson mothur_toolsuite wrapper
 </help>
 <tests>
  <test>
    <param name="otu" value="reads2otus.rabund"/>
    <param name="label" value="0.03" />
    <param name="advanced" value="FALSE" />
    <param name="calc" value="chao,invsimpson,npshannon" />
    <output name="output" file="output.tabular" ftype="tabular" lines_diff="10" />
  </test>
 </tests>
</tool>