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