comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:0146d9d89e21
1 <tool id="stacks_pstacks" name="Stacks: pstacks" version="@WRAPPER_VERSION@.0">
2 <description>find stacks from short reads mapped to a reference genome</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="stdio"/>
8 <command><![CDATA[
9 #from os.path import splitext
10 #import re
11
12 mkdir stacks_inputs stacks_outputs
13
14 &&
15
16 #if $sample.ext == "sam":
17 #set $data_path = splitext($sample.name)[0]
18 #set $data_path = re.sub(r'\.1$', '', $data_path)
19 #set $data_path = "stacks_inputs/" + $data_path + ".sam"
20 #set inputype = "sam"
21 #else:
22 #set $data_path = splitext($sample.name)[0]
23 #set $data_path = re.sub(r'\.1$', '', $data_path)
24 #set $data_path = "stacks_inputs/" + $data_path + ".bam"
25 #set inputype = "bam"
26 #end if
27
28 ln -s "${sample}" "${data_path}"
29
30 &&
31
32 pstacks
33
34 -p \${GALAXY_SLOTS:-1}
35
36 -f $data_path
37
38 -t $inputype
39
40 ## Batch description
41 -i $sample_id
42
43 -m $m
44
45 ## snp_model
46 #if str( $snp_options.select_model.model_type) == "bounded":
47 --model_type bounded
48 --bound_low $snp_options.select_model.bound_low
49 --bound_high $snp_options.select_model.bound_high
50 --alpha $snp_options.select_model.alpha
51 #else if str( $snp_options.select_model.model_type) == "snp":
52 --model_type snp
53 --alpha $snp_options.select_model.alpha
54 #else
55 --model_type fixed
56 --bc_err_freq $bc_err_freq
57 #end if
58
59 -o stacks_outputs
60
61 ## If input is in bam format, stacks will output gzipped files (no option to control this)
62 && gunzip stacks_outputs/*.gz
63 ]]></command>
64
65 <inputs>
66 <param name="sample" argument="-f" format="fastqsanger,fasta" type="data" label="Input short reads from an individual" />
67
68 <param name="sample_id" argument="-i" type="integer" value="" label="Give a unique numeric ID to this sample"/>
69
70 <param name="m" argument="-m" type="integer" value="1" label="Minimum depth of coverage required to create a stack"/>
71
72
73 <!-- SNP Model options -->
74 <section name="snp_options" title="SNP Model Options (pstacks options)" expanded="False">
75 <expand macro="snp_options_full"/>
76 </section>
77 </inputs>
78
79 <outputs>
80 <collection name="tabs" type="list" label="Stacks from ${on_string}">
81 <discover_datasets pattern="(?P&lt;name&gt;.+\.tags)\.tsv" ext="tabular" directory="stacks_outputs" />
82 <discover_datasets pattern="(?P&lt;name&gt;.+\.snps)\.tsv" ext="tabular" directory="stacks_outputs" />>
83 <discover_datasets pattern="(?P&lt;name&gt;.+\.alleles)\.tsv" ext="tabular" directory="stacks_outputs" />
84 <discover_datasets pattern="(?P&lt;name&gt;.+\.models)\.tsv" ext="tabular" directory="stacks_outputs" />
85 </collection>
86 </outputs>
87
88 <tests>
89 <test>
90 <param name="sample" value="refmap/PopA_01.bam" ftype="bam" />
91 <param name="sample_id" value="4" />
92
93 <output_collection name="tabs">
94 <element name="PopA_01.tags">
95 <assert_contents>
96 <has_text text="generated on " />
97 </assert_contents>
98 </element>
99 <element name="PopA_01.snps">
100 <assert_contents>
101 <has_text text="generated on " />
102 </assert_contents>
103 </element>
104 <element name="PopA_01.alleles">
105 <assert_contents>
106 <has_text text="generated on " />
107 </assert_contents>
108 </element>
109 <element name="PopA_01.models">
110 <assert_contents>
111 <has_text text="generated on " />
112 </assert_contents>
113 </element>
114 </output_collection>
115 </test>
116 </tests>
117
118 <help>
119 <![CDATA[
120 .. class:: infomark
121
122 **What it does**
123
124 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.
125
126 --------
127
128 **Input files**
129
130 - SAM, BAM (e.g. from bowtie or bwa)
131
132 **Output files**
133
134 - XXX.tags.tsv file:
135
136 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
137
138 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.
139
140
141 - XXX.snps.tsv file:
142
143 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
144
145 Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.
146
147
148 - XXX.alleles.tsv file:
149
150 See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_
151
152 @STACKS_INFOS@
153 ]]>
154 </help>
155 <expand macro="citation" />
156 </tool>
157