Mercurial > repos > iuc > stacks_assembleperead
comparison stacks_assembleperead.xml @ 0:e3ca198820a8 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:05:40 -0400 |
parents | |
children | ee52d9cfaffc |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e3ca198820a8 |
---|---|
1 <tool id="stacks_assembleperead" name="Stacks: assemble read pairs by locus" version="@WRAPPER_VERSION@.0"> | |
2 <description>run the STACKS sort_read_pairs.pl and exec_velvet.pl wrappers</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements"/> | |
7 <expand macro="stdio"/> | |
8 <command><![CDATA[ | |
9 | |
10 mkdir stacks_inputs reads stacks_outputs | |
11 | |
12 && | |
13 | |
14 #for $input_file in $stacks_col: | |
15 #set $ext = "" | |
16 #if not str($input_file.name).endswith('.tsv'): | |
17 #set $ext = ".tsv" | |
18 #end if | |
19 ln -s "${input_file}" "stacks_inputs/${input_file.name}${ext}" && | |
20 #end for | |
21 | |
22 #for $input_file in $reads: | |
23 #set $name = str($input_file.name) | |
24 #if $name.endswith('.2.fq'): | |
25 ## sort_read_pairs is expecting strange fastq names... | |
26 #set $name = $name[:-5]+".fq_2" | |
27 #end if | |
28 ln -s "${input_file}" "reads/${name}" && | |
29 #end for | |
30 | |
31 sort_read_pairs.pl | |
32 -p stacks_inputs | |
33 -s 'reads' | |
34 | |
35 #if $whitelist: | |
36 -w '$whitelist' | |
37 #end if | |
38 | |
39 #if $threshold: | |
40 -r $threshold | |
41 #end if | |
42 | |
43 -o stacks_outputs | |
44 | |
45 #if $velvet.use_velvet: | |
46 ## remove possible empty files | |
47 && find stacks_outputs -type f -size 0 -delete | |
48 | |
49 && | |
50 mkdir assembled | |
51 && | |
52 velvet_path=`which velveth` && velvet_path=`dirname "\$velvet_path"` | |
53 && | |
54 exec_velvet.pl -s stacks_outputs -o assembled -c -M ${velvet.contig_length} -e "\$velvet_path" | |
55 #end if | |
56 | |
57 ]]></command> | |
58 <inputs> | |
59 <param name="stacks_col" argument="-p" format="tabular,txt" type="data_collection" collection_type="list" label="Output from previous Stacks pipeline steps (e.g. denovo_map or refmap)" /> | |
60 <param name="reads" argument="-s" format="fastqsanger" type="data" multiple="true" label="Files containing sequences" help="Files containing parent sequences from a mapping cross" /> | |
61 | |
62 <param name="whitelist" argument="-w" format="txt,tabular" type="data" optional="true" label="White list of catalog IDs to include" /> | |
63 <param name="threshold" argument="-r" type="integer" value="" optional="true" label="Minimum number of reads by locus"/> | |
64 | |
65 <conditional name="velvet"> | |
66 <param name="use_velvet" type="boolean" checked="false" label="Perform assembly with Velvet" help="If not selected, the tool will only produce of collection of fasta files (one per locus) containing reads ready to assemble." /> | |
67 <when value="false"></when> | |
68 <when value="true"> | |
69 <param name="contig_length" type="integer" value="200" label="Minimum length for asssembled contigs"/> | |
70 </when> | |
71 </conditional> | |
72 </inputs> | |
73 <outputs> | |
74 <collection name="collated" type="list" label="Collated FASTA files per locus on ${on_string}"> | |
75 <discover_datasets pattern="(?P<name>.+)\.fa(sta)?" ext="fasta" directory="stacks_outputs" /> | |
76 </collection> | |
77 | |
78 <data format="fasta" name="contigs" label="Assembled contigs on ${on_string}" from_work_dir="assembled/collated.fa"> | |
79 <filter>velvet['use_velvet']</filter> | |
80 </data> | |
81 </outputs> | |
82 | |
83 <tests> | |
84 <test> | |
85 <param name="stacks_col"> | |
86 <collection type="list"> | |
87 <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" /> | |
88 <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" /> | |
89 <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" /> | |
90 <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" /> | |
91 <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" /> | |
92 <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" /> | |
93 <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" /> | |
94 <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" /> | |
95 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" /> | |
96 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" /> | |
97 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" /> | |
98 </collection> | |
99 </param> | |
100 <param name="reads" value="demultiplexed/PopA_01.2.fq,demultiplexed/PopA_02.2.fq" ftype="fastqsanger" /> | |
101 | |
102 <output_collection name="collated"> | |
103 <element name="1"> | |
104 <assert_contents> | |
105 <has_text text="CCGATCAGCATCAGTAGTTTTCAACGAGCTGGCCCAATGGTGTATAACTATGTGGTAGAGAGAAACTGCTGCTATCACTCACGATATAAGCCCTCTGACG" /> | |
106 </assert_contents> | |
107 </element> | |
108 </output_collection> | |
109 </test> | |
110 <test> | |
111 <param name="stacks_col"> | |
112 <collection type="list"> | |
113 <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" /> | |
114 <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" /> | |
115 <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" /> | |
116 <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" /> | |
117 <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" /> | |
118 <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" /> | |
119 <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" /> | |
120 <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" /> | |
121 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" /> | |
122 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" /> | |
123 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" /> | |
124 </collection> | |
125 </param> | |
126 <param name="reads" value="demultiplexed/PopA_01.2.fq,demultiplexed/PopA_02.2.fq" ftype="fastqsanger" /> | |
127 <param name="velvet|use_velvet" value="true" /> | |
128 <param name="velvet|contig_length" value="20" /> | |
129 | |
130 <output_collection name="collated"> | |
131 <element name="1"> | |
132 <assert_contents> | |
133 <has_text text="CCGATCAGCATCAGTAGTTTTCAACGAGCTGGCCCAATGGTGTATAACTATGTGGTAGAGAGAAACTGCTGCTATCACTCACGATATAAGCCCTCTGACG" /> | |
134 </assert_contents> | |
135 </element> | |
136 </output_collection> | |
137 | |
138 <output name="contigs"> | |
139 <assert_contents> | |
140 <has_text text="TGTATTCTCCCATGCGACAGCAGGACATCCCATCCCCCTCTGATGTTATCAATCATAAGA" /> | |
141 </assert_contents> | |
142 </output> | |
143 </test> | |
144 </tests> | |
145 | |
146 <help> | |
147 <![CDATA[ | |
148 .. class:: infomark | |
149 | |
150 **What it does** | |
151 | |
152 This program will run each of the Stacks sort_read_pairs.pl and exec_velvet.pl utilities to assemble pair-end reads from STACKS pipeline results | |
153 | |
154 -------- | |
155 | |
156 **Input file** | |
157 | |
158 Output from denovo_map or ref_map | |
159 | |
160 | |
161 **Output file** | |
162 | |
163 A collated.fa file containing assembled contigs for each locus | |
164 | |
165 @STACKS_INFOS@ | |
166 ]]> | |
167 </help> | |
168 <expand macro="citation" /> | |
169 </tool> |