changeset 0:ccdc5e9238fc draft

Uploaded
author qfab
date Sun, 01 Jun 2014 19:46:00 -0400
parents
children 6cc245ac2ba9
files rarefaction/README.txt rarefaction/rarefactionCurve.sh rarefaction/rarefactionCurve.xml rarefaction/repository_dependencies.xml rarefaction/test-data/rarefaction.tabular rarefaction/test-data/reads2otus.rabund rarefaction/tool_dependencies.xml
diffstat 7 files changed, 181 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rarefaction/README.txt	Sun Jun 01 19:46:00 2014 -0400
@@ -0,0 +1,36 @@
+Galaxy wrappers for mothurs's Rarefaction Tool 
+======================================================================
+
+The Rarefaction Tool will calculate the intra-sample rarefaction curves 
+using a re-sampling without replacement approach.
+
+
+Installation
+======================================================================
+
+Galaxy will automatically install the required dependencies:
+- executable mothur (please note for OSX 64-bit mothur 1.30.2 will be
+installed, due to issues with the required Readline library and compilers)
+- metagenomics datatypes
+
+
+Disclaimer
+======================================================================
+
+This source code is provided by QFAB Bioinformatics "as is", in the hope 
+that it will be useful, and any express or implied warranties, including, 
+but not limited to, the implied warranties of merchantability and fitness 
+for a particular purpose are disclaimed.
+IN NO EVENT SHALL QFAB BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
+THIS SOURCE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+License
+======================================================================
+
+This work by QFAB Bioinformatics (as part of the GVL project
+http://genome.edu.au) is licensed under a Creative Commons 
+Attribution-NonCommercial-ShareAlike 4.0 International License.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rarefaction/rarefactionCurve.sh	Sun Jun 01 19:46:00 2014 -0400
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+echo $@
+
+filetype=$1
+input=$2
+pctIdent=$3
+label=0$(bc <<< "scale=2; 1-$pctIdent")
+output=$4
+pngOutput=$5
+
+## use Mothur rarefaction.single to calculate rarefaction
+mothur "#rarefaction.single($filetype=$input, label=$label)" 2>1
+
+## get filename only remove the extension and copy to galaxy output file
+file="${input%.*}"
+echo `cp $file.rarefaction $output`
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rarefaction/rarefactionCurve.xml	Sun Jun 01 19:46:00 2014 -0400
@@ -0,0 +1,100 @@
+<tool id='rarefaction' name='Rarefaction' version='1.1'>
+  <description>Calculate and plot rarefaction curves</description>
+  <requirements>
+     <requirement type="binary">@BINARY@</requirement>
+     <requirement type="package" version="1.33.2">mothur</requirement>
+  </requirements>
+  <command interpreter="bash">
+   rarefactionCurve.sh $ifile.filetype $input $pctIdent $output
+  </command>
+
+  <inputs>
+    <conditional name='ifile'>
+    <param name='filetype' type='select' label='Input file format' 
+           help="Based on the formats used in mothur's rarefaction.single">
+      <option value='rabund' selected="true">rabund</option>
+      <option value='sabund'>sabund</option>
+    </param>
+    <when value='rabund'>
+    <param name='input' type='data' format='rabund' label='OTU list (rabund or sabund format)'
+           help="The rabund output from the 'Map Reads to OTU' tool."/>
+    </when>
+    <when value='sabund'>
+    <param name='input' type='data' format='sabund' label='OTU list (rabund or sabund format)'
+           help="File in sabund format used by mothur"/>
+    </when>
+   </conditional>
+    <param name='pctIdent' type='float' value='0.97' label='Minimum identity used in OTU clustering' help='Between 0 - 1.0'/>
+  </inputs>
+
+  <outputs>
+    <data name='output' format='tabular' label="${tool.name} on ${on_string}:rarefaction" />
+  </outputs>
+
+  <help>
+===========
+Description
+===========
+
+Rarefaction calculation based on mothur_'s rarefaction.single command, which will calculate the intra-sample rarefaction curves using a re-sampling without replacement approach.
+
+Rarefaction curves provide a way of comparing the richness observed in different samples. Roughly speaking you get the number of OTUs, on average, that you would have been expected to have observed if you hadn't sampled as many individuals. Although a formula exists to generate a rarefaction curve, mothur uses a randomization procedure. It can also help you to assess your sampling intensity. If a rarefaction 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 observed level of richness. Otherwise, you need to keep sampling. Rarefaction is actually a better measure of diversity than it is of richness.
+
+-----
+
+----------
+Input
+----------
+
+OTU list
+ rabund or sabund format 
+
+----------
+Parameters
+----------
+
+Input file format
+  rabund (default) or
+  sabund
+
+Minimum identity used in OTU clustering
+  Used for plot generation
+
+------
+Output
+------
+
+(A) Tab delimited file containing the resultes of the rarefaction analysis. The first column 'numsampled' indicates the level of sampling intensity, by default this information is provided every 100 individuals. This would typically be plotted on the x-axis. The second column is the average number of OTUs that were observed for that sampling intensity based on the number of iterations, which is 1000 by default. This would represent the data for the y-axis for the corresponding minimum identity (default 0.03, which corresponds to 97%). The columns 'lci' and 'hci' represent the confidence intervals.
+
+.. class:: infomark
+
+Use Galaxy's integrated visualization tool to plot the rarefaction 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*) 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="filetype" value="rabund" />
+        <param name="input" value="reads2otus.rabund" />
+        <param name="pctIdent" value="0.97" />
+        <output name="output" file="rarefaction.tabular" ftype="tabular" lines_diff="10" />
+    </test>
+  </tests>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rarefaction/repository_dependencies.xml	Sun Jun 01 19:46:00 2014 -0400
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<repositories description="This requires the metagenomics datatype definitions (e.g. the rabund format).">
+	<repository changeset_revision="ccba8612695e" name="metagenomics_datatypes" owner="qfab" toolshed="http://toolshed.g2.bx.psu.edu/" />
+</repositories> 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rarefaction/test-data/rarefaction.tabular	Sun Jun 01 19:46:00 2014 -0400
@@ -0,0 +1,16 @@
+numsampled	0.03	lci	hci
+1	1.0000	1.0000	1.0000
+100	73.0000	65.0000	81.0000
+200	129.0000	118.0000	140.0000
+300	178.0000	165.0000	192.0000
+400	222.0000	208.0000	237.0000
+500	263.0000	248.0000	278.0000
+600	301.0000	285.0000	317.0000
+700	337.0000	321.0000	353.0000
+800	371.0000	354.0000	386.0000
+900	404.0000	389.0000	419.0000
+1000	436.0000	423.0000	449.0000
+1100	467.0000	456.0000	479.0000
+1200	497.0000	488.0000	508.0000
+1300	527.0000	522.0000	532.0000
+1331	536.0000	536.0000	536.0000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rarefaction/test-data/reads2otus.rabund	Sun Jun 01 19:46:00 2014 -0400
@@ -0,0 +1,1 @@
+0.03	536	60	4	3	8	14	1	1	28	2	1	1	17	6	4	1	1	12	7	1	2	7	5	9	1	154	4	1	2	1	7	1	6	1	1	7	7	19	7	1	17	2	2	2	3	4	2	1	4	2	1	7	3	1	5	1	1	3	1	1	2	1	1	1	1	2	10	1	1	1	3	3	11	4	2	1	1	8	4	1	1	20	6	1	1	6	2	7	2	3	28	4	6	6	2	8	10	1	5	4	1	32	1	2	3	1	1	1	13	1	1	1	1	1	1	1	1	2	4	3	2	2	1	1	1	2	6	1	7	4	1	1	1	7	1	3	1	14	1	2	1	1	7	1	5	1	4	2	1	1	1	2	1	1	1	1	1	1	1	2	1	4	1	1	1	1	1	1	1	3	1	1	4	1	1	3	1	1	3	1	1	4	1	1	1	1	1	4	1	1	1	2	2	7	1	2	1	1	1	1	1	1	1	8	2	1	2	1	1	2	1	1	3	2	2	1	3	1	3	1	1	1	1	2	1	1	5	1	1	1	3	1	3	2	2	1	2	2	1	1	1	2	1	2	1	1	4	1	1	1	1	1	1	1	1	2	2	1	2	5	1	1	1	1	3	1	1	1	1	3	1	1	1	1	1	2	1	4	1	1	4	1	2	1	3	1	1	5	1	1	1	1	1	1	1	4	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	4	1	1	2	1	1	1	1	2	1	2	2	1	1	1	1	2	1	1	1	1	1	1	1	1	1	1	2	1	1	1	1	1	1	7	1	1	1	1	1	1	1	1	1	5	1	1	1	5	2	2	2	1	1	1	1	1	2	1	1	1	1	1	1	1	1	1	1	1	1	1	1	4	1	1	1	1	1	1	1	1	1	1	1	2	1	1	1	1	2	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	2	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	2	1	2	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	2	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rarefaction/tool_dependencies.xml	Sun Jun 01 19:46:00 2014 -0400
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<tool_dependency>
+  <package name="mothur" version="1.30.2-1.33.3">
+    <repository changeset_revision="150982d8fd53" name="package_mothur" owner="qfab" toolshed="http://toolshed.g2.bx.psu.edu/" />
+  </package>
+</tool_dependency>
+