annotate filter_contigs.xml @ 0:222fb7dc2286 draft

Uploaded
author greg
date Fri, 06 Jan 2023 15:52:31 +0000
parents
children 2c61adbbdbdb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
222fb7dc2286 Uploaded
greg
parents:
diff changeset
1 <tool id="filter_contigs" name="Filter contigs" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
222fb7dc2286 Uploaded
greg
parents:
diff changeset
2 <description>from an assembled FASTA file</description>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
3 <macros>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
4 <import>macros.xml</import>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
5 </macros>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
6 <expand macro="requirements"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
7 <command detect_errors="exit_code"><![CDATA[
222fb7dc2286 Uploaded
greg
parents:
diff changeset
8 #if $input.is_of_type('fasta.gz'):
222fb7dc2286 Uploaded
greg
parents:
diff changeset
9 gunzip -c '$input' > 'input.fasta' &&
222fb7dc2286 Uploaded
greg
parents:
diff changeset
10 #else:
222fb7dc2286 Uploaded
greg
parents:
diff changeset
11 ln -s '$input' 'input.fasta' &&
222fb7dc2286 Uploaded
greg
parents:
diff changeset
12 #end if
222fb7dc2286 Uploaded
greg
parents:
diff changeset
13 faidx -i chromsizes 'input.fasta' | awk '($2 <= $max_len) {print $1}' | parallel -n1 -n1 \$(which faidx) 'input.fasta' > '$output'
222fb7dc2286 Uploaded
greg
parents:
diff changeset
14 ]]></command>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
15 <inputs>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
16 <param name="input" type="data" format="fasta,fasta.gz" label="Assembled FASTA file"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
17 <param name="max_len" type="integer" value="1500000" min="0" label="Maximum contig length"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
18 </inputs>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
19 <outputs>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
20 <data name="output" format="fasta"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
21 </outputs>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
22 <tests>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
23 <test>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
24 <param name="input" value="input.fasta.gz" ftype="fasta.gz"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
25 <param name="max_len" value="30000"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
26 <output name="output" ftype="fasta">
222fb7dc2286 Uploaded
greg
parents:
diff changeset
27 <assert_contents>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
28 <has_size value="51690"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
29 <has_text text=">contig_10"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
30 <has_text text=">contig_7"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
31 </assert_contents>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
32 </output>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
33 </test>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
34 <test>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
35 <param name="input" value="input2.fasta" ftype="fasta"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
36 <param name="max_len" value="30000"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
37 <output name="output" ftype="fasta">
222fb7dc2286 Uploaded
greg
parents:
diff changeset
38 <assert_contents>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
39 <has_size value="28492"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
40 <has_text text=">contig_7"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
41 </assert_contents>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
42 </output>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
43 </test>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
44 </tests>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
45 <help>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
46 **What it does**
222fb7dc2286 Uploaded
greg
parents:
diff changeset
47
222fb7dc2286 Uploaded
greg
parents:
diff changeset
48 Filters contigs from an assembled fasta file that are longer than the specified length.
222fb7dc2286 Uploaded
greg
parents:
diff changeset
49 </help>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
50 <expand macro="citations"/>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
51 </tool>
222fb7dc2286 Uploaded
greg
parents:
diff changeset
52