diff stacks_pstacks.xml @ 0:0146d9d89e21 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit f3a59c91c231cc1582479109e776d05602b7f24d-dirty
author iuc
date Tue, 14 Jun 2016 14:07:49 -0400
parents
children fede8a808d36
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stacks_pstacks.xml	Tue Jun 14 14:07:49 2016 -0400
@@ -0,0 +1,157 @@
+<tool id="stacks_pstacks" name="Stacks: pstacks" version="@WRAPPER_VERSION@.0">
+    <description>find stacks from short reads mapped to a reference genome</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <expand macro="stdio"/>
+    <command><![CDATA[
+        #from os.path import splitext
+        #import re
+
+        mkdir stacks_inputs stacks_outputs
+
+        &&
+
+        #if $sample.ext == "sam":
+            #set $data_path = splitext($sample.name)[0]
+            #set $data_path = re.sub(r'\.1$', '', $data_path)
+            #set $data_path = "stacks_inputs/" + $data_path + ".sam"
+            #set inputype = "sam"
+        #else:
+            #set $data_path = splitext($sample.name)[0]
+            #set $data_path = re.sub(r'\.1$', '', $data_path)
+            #set $data_path = "stacks_inputs/" + $data_path + ".bam"
+            #set inputype = "bam"
+        #end if
+
+        ln -s "${sample}" "${data_path}"
+
+        &&
+
+        pstacks
+
+            -p \${GALAXY_SLOTS:-1}
+
+            -f $data_path
+
+            -t $inputype
+
+            ## Batch description
+            -i $sample_id
+
+            -m $m
+
+            ## snp_model
+            #if str( $snp_options.select_model.model_type) == "bounded":
+                --model_type bounded
+                --bound_low $snp_options.select_model.bound_low
+                --bound_high $snp_options.select_model.bound_high
+                --alpha $snp_options.select_model.alpha
+            #else if str( $snp_options.select_model.model_type) == "snp":
+                --model_type snp
+                --alpha $snp_options.select_model.alpha
+            #else
+                --model_type fixed
+                --bc_err_freq $bc_err_freq
+            #end if
+
+            -o stacks_outputs
+
+            ## If input is in bam format, stacks will output gzipped files (no option to control this)
+            && gunzip stacks_outputs/*.gz
+    ]]></command>
+
+    <inputs>
+        <param name="sample" argument="-f" format="fastqsanger,fasta" type="data" label="Input short reads from an individual" />
+
+        <param name="sample_id" argument="-i" type="integer" value="" label="Give a unique numeric ID to this sample"/>
+
+        <param name="m" argument="-m" type="integer" value="1" label="Minimum depth of coverage required to create a stack"/>
+
+
+        <!-- SNP Model options -->
+        <section name="snp_options" title="SNP Model Options (pstacks options)" expanded="False">
+            <expand macro="snp_options_full"/>
+        </section>
+    </inputs>
+
+    <outputs>
+        <collection name="tabs" type="list" label="Stacks from ${on_string}">
+            <discover_datasets pattern="(?P&lt;name&gt;.+\.tags)\.tsv" ext="tabular" directory="stacks_outputs" />
+            <discover_datasets pattern="(?P&lt;name&gt;.+\.snps)\.tsv" ext="tabular" directory="stacks_outputs" />>
+            <discover_datasets pattern="(?P&lt;name&gt;.+\.alleles)\.tsv" ext="tabular" directory="stacks_outputs" />
+            <discover_datasets pattern="(?P&lt;name&gt;.+\.models)\.tsv" ext="tabular" directory="stacks_outputs" />
+        </collection>
+    </outputs>
+
+    <tests>
+        <test>
+            <param name="sample" value="refmap/PopA_01.bam" ftype="bam" />
+            <param name="sample_id" value="4" />
+
+            <output_collection name="tabs">
+                <element name="PopA_01.tags">
+                    <assert_contents>
+                        <has_text text="generated on " />
+                    </assert_contents>
+                </element>
+                <element name="PopA_01.snps">
+                    <assert_contents>
+                        <has_text text="generated on " />
+                    </assert_contents>
+                </element>
+                <element name="PopA_01.alleles">
+                    <assert_contents>
+                        <has_text text="generated on " />
+                    </assert_contents>
+                </element>
+                <element name="PopA_01.models">
+                    <assert_contents>
+                        <has_text text="generated on " />
+                    </assert_contents>
+                </element>
+            </output_collection>
+        </test>
+    </tests>
+
+    <help>
+<![CDATA[
+.. class:: infomark
+
+**What it does**
+
+Similar to ustacks, except this program will extract stacks that have been aligned to a reference genome by a program such as Bowtie and identify SNPs. These stacks can then be processed with cstacks or sstacks.
+
+--------
+
+**Input files**
+
+- SAM, BAM (e.g. from bowtie or bwa)
+
+**Output files**
+
+- XXX.tags.tsv file:
+
+See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
+
+Notes: For the tags file, each stack will start in the file with a consensus sequence for the entire stack followed by the flags for that stack. Then, each individual read that was merged into that stack will follow. The next stack will start with another consensus sequence.
+
+
+- XXX.snps.tsv file:
+
+See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
+
+Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.
+
+
+- XXX.alleles.tsv file:
+
+See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
+
+@STACKS_INFOS@
+]]>
+    </help>
+    <expand macro="citation" />
+</tool>
+