Mercurial > repos > iuc > stacks_assembleperead
comparison stacks_assembleperead.xml @ 8:e6919d8ae34d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit dc23703c260d004a28fe24a2a7c00cb4371bc32e
author | iuc |
---|---|
date | Thu, 27 Apr 2017 04:18:45 -0400 |
parents | ae705d244e28 |
children | 0c741f364d18 |
comparison
equal
deleted
inserted
replaced
7:e194abc415a6 | 8:e6919d8ae34d |
---|---|
9 | 9 |
10 mkdir stacks_inputs reads stacks_outputs | 10 mkdir stacks_inputs reads stacks_outputs |
11 | 11 |
12 && | 12 && |
13 | 13 |
14 #for $input_file in $stacks_col: | 14 #for $input_file in $stacks_col |
15 #set $ext = "" | 15 #set $ext = "" |
16 #if not str($input_file.element_identifier).endswith('.tsv'): | 16 #if not str($input_file.element_identifier).endswith('.tsv') |
17 #set $ext = ".tsv" | 17 #set $ext = ".tsv" |
18 #end if | 18 #end if |
19 ln -s "${input_file}" "stacks_inputs/${input_file.element_identifier}${ext}" && | 19 ln -s '${input_file}' 'stacks_inputs/${input_file.element_identifier}${ext}' && |
20 #end for | 20 #end for |
21 | 21 |
22 #for $input_file in $reads: | 22 #for $input_file in $reads |
23 #set $name = str($input_file.element_identifier) | 23 #set $name = str($input_file.element_identifier) |
24 ## sort_read_pairs is expecting strange fastq names: <sample_name>.fq_2 | 24 ## sort_read_pairs is expecting strange fastq names: <sample_name>.fq_2 |
25 #if $name.endswith('.1.fq'): | 25 #if $name.endswith('.1.fq') |
26 ## handle a common case | 26 ## handle a common case |
27 #set $name = $name[:-5]+".fq_1" | 27 #set $name = $name[:-5]+".fq_1" |
28 #else if $name.endswith('.2.fq'): | 28 #else if $name.endswith('.2.fq') |
29 ## handle a common case | 29 ## handle a common case |
30 #set $name = $name[:-5]+".fq_2" | 30 #set $name = $name[:-5]+".fq_2" |
31 #else if not $name.endswith('.fq') and not $name.endswith('.fq_2'): | 31 #else if not $name.endswith('.fq') and not $name.endswith('.fq_2') |
32 ## no extension, consider it's a fq_2 file | 32 ## no extension, consider it's a fq_2 file |
33 #set $name = $name + ".fq_2" | 33 #set $name = $name + ".fq_2" |
34 #end if | 34 #end if |
35 ln -s "${input_file}" "reads/${name}" && | 35 ln -s '${input_file}' 'reads/${name}' && |
36 #end for | 36 #end for |
37 | 37 |
38 sort_read_pairs.pl | 38 sort_read_pairs.pl |
39 -p stacks_inputs | 39 -p stacks_inputs |
40 -s 'reads' | 40 -s 'reads' |
41 | 41 |
42 #if $whitelist: | 42 #if $whitelist |
43 -w '$whitelist' | 43 -w '$whitelist' |
44 #end if | 44 #end if |
45 | 45 |
46 #if $threshold: | 46 #if $threshold |
47 -r $threshold | 47 -r $threshold |
48 #end if | 48 #end if |
49 | 49 |
50 -o stacks_outputs | 50 -o stacks_outputs |
51 | 51 |
52 #if $velvet.use_velvet: | 52 #if $velvet.use_velvet == "yes" |
53 ## remove possible empty files | 53 ## remove possible empty files |
54 && find stacks_outputs -type f -size 0 -delete | 54 && find stacks_outputs -type f -size 0 -delete |
55 | 55 |
56 && | 56 && |
57 mkdir assembled | 57 mkdir assembled |
68 | 68 |
69 <param name="whitelist" argument="-w" format="txt,tabular" type="data" optional="true" label="White list of catalog IDs to include" /> | 69 <param name="whitelist" argument="-w" format="txt,tabular" type="data" optional="true" label="White list of catalog IDs to include" /> |
70 <param name="threshold" argument="-r" type="integer" value="" optional="true" label="Minimum number of reads by locus"/> | 70 <param name="threshold" argument="-r" type="integer" value="" optional="true" label="Minimum number of reads by locus"/> |
71 | 71 |
72 <conditional name="velvet"> | 72 <conditional name="velvet"> |
73 <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." /> | 73 <param name="use_velvet" type="select" 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."> |
74 <when value="false"></when> | 74 <option value="no" selected="true">No</option> |
75 <when value="true"> | 75 <option value="yes">Yes</option> |
76 </param> | |
77 <when value="no"/> | |
78 <when value="yes"> | |
76 <param name="contig_length" type="integer" value="200" label="Minimum length for asssembled contigs"/> | 79 <param name="contig_length" type="integer" value="200" label="Minimum length for asssembled contigs"/> |
77 </when> | 80 </when> |
78 </conditional> | 81 </conditional> |
79 </inputs> | 82 </inputs> |
80 <outputs> | 83 <outputs> |
81 <collection name="collated" type="list" label="Collated FASTA files per locus on ${on_string}"> | 84 <collection name="collated" type="list" label="Collated FASTA files per locus on ${on_string}"> |
82 <filter>not velvet['use_velvet']</filter> | 85 <filter>velvet['use_velvet'] == "no"</filter> |
83 <discover_datasets pattern="(?P<name>.+)\.fa(sta)?$" ext="fasta" directory="stacks_outputs" /> | 86 <discover_datasets pattern="(?P<name>.+)\.fa(sta)?$" ext="fasta" directory="stacks_outputs" /> |
84 </collection> | 87 </collection> |
85 | 88 |
86 <data format="fasta" name="contigs" label="Assembled contigs on ${on_string}" from_work_dir="assembled/collated.fa"> | 89 <data format="fasta" name="contigs" label="Assembled contigs on ${on_string}" from_work_dir="assembled/collated.fa"> |
87 <filter>velvet['use_velvet']</filter> | 90 <filter>velvet['use_velvet'] == "yes"</filter> |
88 </data> | 91 </data> |
89 </outputs> | 92 </outputs> |
90 | 93 |
91 <tests> | 94 <tests> |
92 <test> | 95 <test> |
130 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" /> | 133 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" /> |
131 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" /> | 134 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" /> |
132 </collection> | 135 </collection> |
133 </param> | 136 </param> |
134 <param name="reads" value="demultiplexed/PopA_01.2.fq,demultiplexed/PopA_02.2.fq" ftype="fastqsanger" /> | 137 <param name="reads" value="demultiplexed/PopA_01.2.fq,demultiplexed/PopA_02.2.fq" ftype="fastqsanger" /> |
135 <param name="velvet|use_velvet" value="true" /> | 138 <param name="velvet|use_velvet" value="yes" /> |
136 <param name="velvet|contig_length" value="20" /> | 139 <param name="velvet|contig_length" value="20" /> |
137 | 140 |
138 <output name="contigs"> | 141 <output name="contigs"> |
139 <assert_contents> | 142 <assert_contents> |
140 <has_text text="TGTATTCTCCCATGCGACAGCAGGACATCCCATCCCCCTCTGATGTTATCAATCATAAGA" /> | 143 <has_text text="|NODE_" /> |
141 </assert_contents> | 144 </assert_contents> |
142 </output> | 145 </output> |
143 </test> | 146 </test> |
144 </tests> | 147 </tests> |
145 | 148 |