comparison filter_contigs.xml @ 2:1442e77ee8e9 draft default tip

Uploaded
author greg
date Tue, 25 Apr 2023 12:59:47 +0000
parents 2c61adbbdbdb
children
comparison
equal deleted inserted replaced
1:2c61adbbdbdb 2:1442e77ee8e9
1 <tool id="filter_contigs" name="PIMA: filter contigs" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> 1 <tool id="filter_contigs" name="Filter contigs" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>from an assembled FASTA file</description> 2 <description>from an assembled FASTA file</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
8 #if $input.is_of_type('fasta.gz'): 8 #if $input.is_of_type('fasta.gz'):
9 gunzip -c '$input' > 'input.fasta' && 9 gunzip -c '$input' > 'input.fasta' &&
10 #else: 10 #else:
11 ln -s '$input' 'input.fasta' && 11 ln -s '$input' 'input.fasta' &&
12 #end if 12 #end if
13 faidx -i chromsizes 'input.fasta' | awk '($2 <= $max_len) {print $1}' | parallel -n1 -n1 \$(which faidx) 'input.fasta' > '$output' 13 #if str($max_min_cond.max_min) == 'max':
14 faidx -i chromsizes 'input.fasta' | awk '($2 <= $max_min_cond.max_len) {print $1}' | parallel -n1 -n1 \$(which faidx) 'input.fasta' > '$output'
15 #else:
16 faidx -i chromsizes 'input.fasta' | awk '($2 > $max_min_cond.min_len) {print $1}' | parallel -n1 -n1 \$(which faidx) 'input.fasta' > '$output'
17 #end if
18
14 ]]></command> 19 ]]></command>
15 <inputs> 20 <inputs>
16 <param name="input" type="data" format="fasta,fasta.gz" label="Assembled FASTA file"/> 21 <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"/> 22 <conditional name="max_min_cond">
23 <param name="max_min" type="select" label="Use minimum or maximum contig length when filtering?">
24 <option value="max" selected="true">Maximum - contigs shorter than or equal to this length will be filtered</option>
25 <option value="min">Minimum - contigs longer than this length will be filtered</option>
26 </param>
27 <when value="max">
28 <param name="max_len" type="integer" value="1500000" min="0" label="Maximum contig length"/>
29 </when>
30 <when value="min">
31 <param name="min_len" type="integer" value="1000" min="0" label="Maximum contig length"/>
32 </when>
33 </conditional>
18 </inputs> 34 </inputs>
19 <outputs> 35 <outputs>
20 <data name="output" format="fasta"/> 36 <data name="output" format="fasta"/>
21 </outputs> 37 </outputs>
22 <tests> 38 <tests>