Mercurial > repos > nml > spades
comparison spades.xml @ 10:b8d633fbf5f5 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/spades commit 033c31f9e41c2869e195c66e5bf6cc2286062bd9
author | iuc |
---|---|
date | Tue, 11 Dec 2018 13:36:00 -0500 |
parents | 24fffa4fee40 |
children | 1796ea206dec |
comparison
equal
deleted
inserted
replaced
9:24fffa4fee40 | 10:b8d633fbf5f5 |
---|---|
1 <tool id="spades" name="SPAdes" version="@TOOL_VERSION@"> | 1 <tool id="spades" name="SPAdes" version="@TOOL_VERSION@+galaxy1"> |
2 <description>genome assembler for regular and single-cell projects</description> | 2 <description>genome assembler for regular and single-cell projects</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <requirements> | 6 <requirements> |
18 description="Out of memory error occurred" /> | 18 description="Out of memory error occurred" /> |
19 </stdio> | 19 </stdio> |
20 <command> | 20 <command> |
21 <![CDATA[ | 21 <![CDATA[ |
22 ## A real command looks like: spades.py -k 21,33,55,77,99,127 --careful -1 Y.fastq.gz -2 X.fastq.gz -t 24 -o output | 22 ## A real command looks like: spades.py -k 21,33,55,77,99,127 --careful -1 Y.fastq.gz -2 X.fastq.gz -t 24 -o output |
23 | 23 |
24 if [[ -n \$GALAXY_MEMORY_MB ]]; then | 24 if [[ -n \$GALAXY_MEMORY_MB ]]; then |
25 GALAXY_MEMORY_GB=\$(( GALAXY_MEMORY_MB / 1024 )); | 25 GALAXY_MEMORY_GB=\$(( GALAXY_MEMORY_MB / 1024 )); |
26 fi && | 26 fi && |
27 | 27 |
28 spades.py -o . --disable-gzip-output $sc $onlyassembler $careful -t \${GALAXY_SLOTS:-16} -m \${GALAXY_MEMORY_GB:-250} | 28 spades.py -o . --disable-gzip-output $sc $onlyassembler $careful -t \${GALAXY_SLOTS:-16} -m \${GALAXY_MEMORY_GB:-250} |
47 #set prefix = 'hqmp' | 47 #set prefix = 'hqmp' |
48 #end if | 48 #end if |
49 --$prefix$i-$library.orientation | 49 --$prefix$i-$library.orientation |
50 #for $file in $library.files | 50 #for $file in $library.files |
51 #if $file.file_type.type == "separate" | 51 #if $file.file_type.type == "separate" |
52 --$prefix$i-1 $file.file_type.fwd_reads.extension:$file.file_type.fwd_reads | 52 --$prefix$i-1 $file.file_type.fwd_reads.extension.replace('fastqsanger', 'fastq'):$file.file_type.fwd_reads |
53 --$prefix$i-2 $file.file_type.fwd_reads.extension:$file.file_type.rev_reads | 53 --$prefix$i-2 $file.file_type.fwd_reads.extension.replace('fastqsanger', 'fastq'):$file.file_type.rev_reads |
54 #elif $file.file_type.type == "interleaved" | 54 #elif $file.file_type.type == "interleaved" |
55 --$prefix$i-12 $file.file_type.interleaved_reads.extension:$file.file_type.interleaved_reads | 55 --$prefix$i-12 $file.file_type.interleaved_reads.extension.replace('fastqsanger', 'fastq'):$file.file_type.interleaved_reads |
56 #elif $file.file_type.type == "merged" | 56 #elif $file.file_type.type == "merged" |
57 --$prefix$i-m $file.file_type.merged_reads.extension:$file.file_type.merged_reads | 57 --$prefix$i-m $file.file_type.merged_reads.extension.replace('fastqsanger', 'fastq'):$file.file_type.merged_reads |
58 #elif $file.file_type.type == "unpaired" | 58 #elif $file.file_type.type == "unpaired" |
59 --$prefix$i-s $file.file_type.unpaired_reads.extension:$file.file_type.unpaired_reads | 59 --$prefix$i-s $file.file_type.unpaired_reads.extension.replace('fastqsanger', 'fastq'):$file.file_type.unpaired_reads |
60 #elif $file.file_type.type == "paired-collection" | 60 #elif $file.file_type.type == "paired-collection" |
61 --$prefix$i-1 $file.file_type.fastq_collection.forward.extension:$file.file_type.fastq_collection.forward | 61 --$prefix$i-1 $file.file_type.fastq_collection.forward.extension.replace('fastqsanger', 'fastq'):$file.file_type.fastq_collection.forward |
62 --$prefix$i-2 $file.file_type.fastq_collection.reverse.extension:$file.file_type.fastq_collection.reverse | 62 --$prefix$i-2 $file.file_type.fastq_collection.reverse.extension.replace('fastqsanger', 'fastq'):$file.file_type.fastq_collection.reverse |
63 #end if | 63 #end if |
64 #end for | 64 #end for |
65 #end for | 65 #end for |
66 #for $read in $pacbio_reads: | 66 #for $read in $pacbio_reads: |
67 #if $read: | 67 #if $read: |
73 --nanopore fastq:$read | 73 --nanopore fastq:$read |
74 #end if | 74 #end if |
75 #end for | 75 #end for |
76 #for $read in $sanger_reads: | 76 #for $read in $sanger_reads: |
77 #if $read: | 77 #if $read: |
78 --sanger $read.extension:$read | 78 --sanger $read.extension.replace('fastqsanger', 'fastq'):$read |
79 #end if | 79 #end if |
80 #end for | 80 #end for |
81 #for $contig in $trusted_contigs: | 81 #for $contig in $trusted_contigs: |
82 #if $contig: | 82 #if $contig: |
83 --trusted-contigs $contig.extension:$contig | 83 --trusted-contigs $contig.extension.replace('fastqsanger', 'fastq'):$contig |
84 #end if | 84 #end if |
85 #end for | 85 #end for |
86 #for $contig in $untrusted_contigs: | 86 #for $contig in $untrusted_contigs: |
87 #if $contig: | 87 #if $contig: |
88 --untrusted-contigs $contig.extension:$contig | 88 --untrusted-contigs $contig.extension.replace('fastqsanger', 'fastq'):$contig |
89 #end if | 89 #end if |
90 #end for | 90 #end for |
91 && python '$write_tsv_script' < contigs.fasta > '$out_contig_stats' | 91 && python '$write_tsv_script' < contigs.fasta > '$out_contig_stats' |
92 && python '$write_tsv_script' < scaffolds.fasta > '$out_scaffold_stats' | 92 && python '$write_tsv_script' < scaffolds.fasta > '$out_scaffold_stats' |
93 ]]> | 93 ]]> |
94 </command> | 94 </command> |
95 | 95 |
96 <configfiles> | 96 <configfiles> |
97 <configfile name="write_tsv_script"><![CDATA[#!/usr/bin/env python | 97 <configfile name="write_tsv_script"><![CDATA[#!/usr/bin/env python |
98 import sys,re | 98 import sys,re |
99 search_str = r'^>(NODE|\S+)_(\d+)(?:_|\s)length_(\d+)_cov_(\d+\.*\d*).*\$' | 99 search_str = r'^>(NODE|\S+)_(\d+)(?:_|\s)length_(\d+)_cov_(\d+\.*\d*).*\$' |
100 replace_str = r'\1_\2\t\3\t\4' | 100 replace_str = r'\1_\2\t\3\t\4' |
104 if cmd.match(line): | 104 if cmd.match(line): |
105 sys.stdout.write(cmd.sub(replace_str,line)) | 105 sys.stdout.write(cmd.sub(replace_str,line)) |
106 ]]> | 106 ]]> |
107 </configfile> | 107 </configfile> |
108 </configfiles> | 108 </configfiles> |
109 | 109 |
110 <inputs> | 110 <inputs> |
111 <param argument="--sc" falsevalue="" help="This option is required for MDA (single-cell) data." label="Single-cell?" name="sc" truevalue="--sc" type="boolean"> | 111 <param argument="--sc" falsevalue="" help="This option is required for MDA (single-cell) data." label="Single-cell?" name="sc" truevalue="--sc" type="boolean"> |
112 <option value="false">No</option> | 112 <option value="false">No</option> |
113 <option value="true">Yes</option> | 113 <option value="true">Yes</option> |
114 </param> | 114 </param> |
115 <param argument="--only-assembler" checked="False" falsevalue="" label="Run only assembly? (without read error correction)" name="onlyassembler" truevalue="--only-assembler" type="boolean" /> | 115 <param argument="--only-assembler" checked="False" falsevalue="" label="Run only assembly? (without read error correction)" name="onlyassembler" truevalue="--only-assembler" type="boolean" /> |
116 <param argument="----careful" checked="True" falsevalue="" help="Tries to reduce number of mismatches and short indels. Also runs MismatchCorrector – a post processing tool, which uses BWA tool (comes with SPAdes)." label="Careful correction?" name="careful" truevalue="--careful" type="boolean" /> | 116 <param argument="--careful" checked="True" falsevalue="" help="Tries to reduce number of mismatches and short indels. Also runs MismatchCorrector – a post processing tool, which uses BWA tool (comes with SPAdes)." label="Careful correction?" name="careful" truevalue="--careful" type="boolean" /> |
117 <conditional name="kmer_choice"> | 117 <conditional name="kmer_choice"> |
118 <param checked="False" falsevalue="false" help="k-mer choices can be chosen by SPAdes instead of being entered manually" label="Automatically choose k-mer values" name="auto_kmer_choice" truevalue="true" type="boolean" /> | 118 <param checked="False" falsevalue="false" help="k-mer choices can be chosen by SPAdes instead of being entered manually" label="Automatically choose k-mer values" name="auto_kmer_choice" truevalue="true" type="boolean" /> |
119 <when value="false"> | 119 <when value="false"> |
120 <param help="Comma-separated list of k-mer sizes to be used (all values must be odd, less than 128, listed in ascending order, and smaller than the read length). The default value is 21,33,55." label="K-mers to use, separated by commas" name="kmers" type="text" value="21,33,55" /> | 120 <param help="Comma-separated list of k-mer sizes to be used (all values must be odd, less than 128, listed in ascending order, and smaller than the read length). The default value is 21,33,55." label="K-mers to use, separated by commas" name="kmers" type="text" value="21,33,55" /> |
121 </when> | 121 </when> |
217 <assert_contents> | 217 <assert_contents> |
218 <has_text_matching expression="NODE_1\t1000"/> | 218 <has_text_matching expression="NODE_1\t1000"/> |
219 </assert_contents> | 219 </assert_contents> |
220 </output> | 220 </output> |
221 </test> | 221 </test> |
222 <test> <!-- Test 1 - basic test with k=33 fasta input --> | 222 <test> <!-- Test 2 - basic test with k=33 fasta input --> |
223 <param name="sc" value="false" /> | 223 <param name="sc" value="false" /> |
224 <param name="onlyassembler" value="true"/> | 224 <param name="onlyassembler" value="true"/> |
225 <param name="careful" value="false" /> | 225 <param name="careful" value="false" /> |
226 <param name="kmers" value="33" /> | 226 <param name="kmers" value="33" /> |
227 <param name="lib_type" value="paired_end" /> | 227 <param name="lib_type" value="paired_end" /> |
232 <assert_contents> | 232 <assert_contents> |
233 <has_text_matching expression="NODE_1\t1000"/> | 233 <has_text_matching expression="NODE_1\t1000"/> |
234 </assert_contents> | 234 </assert_contents> |
235 </output> | 235 </output> |
236 </test> | 236 </test> |
237 <test> <!-- Test 1 - basic test with k=33 and gzipped input --> | 237 <test> <!-- Test 3 - basic test with k=33 and gzipped input --> |
238 <param name="sc" value="false" /> | 238 <param name="sc" value="false" /> |
239 <param name="careful" value="false" /> | 239 <param name="careful" value="false" /> |
240 <param name="kmers" value="33" /> | 240 <param name="kmers" value="33" /> |
241 <param name="lib_type" value="paired_end" /> | 241 <param name="lib_type" value="paired_end" /> |
242 <param ftype="fastq.gz" name="fwd_reads" value="ecoli_1K_1.fq.gz" /> | 242 <param ftype="fastq.gz" name="fwd_reads" value="ecoli_1K_1.fq.gz" /> |
246 <assert_contents> | 246 <assert_contents> |
247 <has_text_matching expression="NODE_1\t1000"/> | 247 <has_text_matching expression="NODE_1\t1000"/> |
248 </assert_contents> | 248 </assert_contents> |
249 </output> | 249 </output> |
250 </test> | 250 </test> |
251 <test> <!-- Test 2 - auto k --> | 251 <test> <!-- Test 4 - auto k --> |
252 <param name="sc" value="false" /> | 252 <param name="sc" value="false" /> |
253 <param name="careful" value="false" /> | 253 <param name="careful" value="false" /> |
254 <param name="auto_kmer_choice" value="true" /> | 254 <param name="auto_kmer_choice" value="true" /> |
255 <param name="lib_type" value="paired_end" /> | 255 <param name="lib_type" value="paired_end" /> |
256 <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" /> | 256 <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" /> |
257 <param ftype="fastq" name="rev_reads" value="ecoli_1K_2.fq" /> | 257 <param ftype="fastq" name="rev_reads" value="ecoli_1K_2.fq" /> |
258 <output compare="re_match" file="auto_kmer_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" /> | 258 <output compare="re_match" file="auto_kmer_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" /> |
259 </test> | 259 </test> |
260 <test> <!-- Test 3 - k=77 --> | 260 <test> <!-- Test 5 - k=77 --> |
261 <param name="sc" value="false" /> | 261 <param name="sc" value="false" /> |
262 <param name="careful" value="false" /> | 262 <param name="careful" value="false" /> |
263 <param name="kmers" value="77" /> | 263 <param name="kmers" value="77" /> |
264 <param name="lib_type" value="paired_end" /> | 264 <param name="lib_type" value="paired_end" /> |
265 <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" /> | 265 <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" /> |
266 <param ftype="fastq" name="rev_reads" value="ecoli_1K_2.fq" /> | 266 <param ftype="fastq" name="rev_reads" value="ecoli_1K_2.fq" /> |
267 <output compare="re_match" file="kmer_77_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" /> | 267 <output compare="re_match" file="kmer_77_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" /> |
268 </test> | 268 </test> |
269 <test> <!-- Test 4 - test for extra graph outputs --> | 269 <test> <!-- Test 6 - test for extra graph outputs --> |
270 <param name="sc" value="false" /> | 270 <param name="sc" value="false" /> |
271 <param name="careful" value="false" /> | 271 <param name="careful" value="false" /> |
272 <param name="kmers" value="33" /> | 272 <param name="kmers" value="33" /> |
273 <param name="lib_type" value="paired_end" /> | 273 <param name="lib_type" value="paired_end" /> |
274 <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" /> | 274 <param ftype="fastq" name="fwd_reads" value="ecoli_1K_1.fq" /> |
287 </assert_contents> | 287 </assert_contents> |
288 </output> | 288 </output> |
289 <output name="scaffold_graph"> | 289 <output name="scaffold_graph"> |
290 <assert_contents> | 290 <assert_contents> |
291 <has_text text="NODE_"/> | 291 <has_text text="NODE_"/> |
292 </assert_contents> | |
293 </output> | |
294 </test> | |
295 <test> <!-- Test 7 - basic test with k=33 and fastsanger input --> | |
296 <param name="sc" value="false" /> | |
297 <param name="careful" value="false" /> | |
298 <param name="kmers" value="33" /> | |
299 <param name="lib_type" value="paired_end" /> | |
300 <param ftype="fastqsanger" name="fwd_reads" value="ecoli_1K_1.fq" /> | |
301 <param ftype="fastqsanger" name="rev_reads" value="ecoli_1K_2.fq" /> | |
302 <output compare="re_match" file="kmer_33_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" /> | |
303 <output name="out_contig_stats"> | |
304 <assert_contents> | |
305 <has_text_matching expression="NODE_1\t1000"/> | |
306 </assert_contents> | |
307 </output> | |
308 </test> | |
309 <test> <!-- Test 8 - basic test with k=33 and fastsanger.gz input --> | |
310 <param name="sc" value="false" /> | |
311 <param name="careful" value="false" /> | |
312 <param name="kmers" value="33" /> | |
313 <param name="lib_type" value="paired_end" /> | |
314 <param ftype="fastqsanger.gz" name="fwd_reads" value="ecoli_1K_1.fq.gz" /> | |
315 <param ftype="fastqsanger.gz" name="rev_reads" value="ecoli_1K_2.fq.gz" /> | |
316 <output compare="re_match" file="kmer_33_output.fa" ftype="fasta" lines_diff="1" name="out_contigs" /> | |
317 <output name="out_contig_stats"> | |
318 <assert_contents> | |
319 <has_text_matching expression="NODE_1\t1000"/> | |
292 </assert_contents> | 320 </assert_contents> |
293 </output> | 321 </output> |
294 </test> | 322 </test> |
295 </tests> | 323 </tests> |
296 <help> | 324 <help> |