Source code

Download source archive ↓

upstream-extended/iuc/tools/seqtk/seqtk_trimfq.xml

1<?xml version="1.0"?>
2<tool id="seqtk_trimfq" name="seqtk_trimfq" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05">
3    <description>trim FASTQ using the Phred algorithm</description>
4    <macros>
5        <import>macros.xml</import>
6    </macros>
7    <expand macro="bio_tools"/>
8    <expand macro="requirements"/>
9    <expand macro="stdio"/>
10    <command><![CDATA[
11seqtk trimfq
12#if $mode.mode_select == "quality":
13    -q $mode.q
14    -l $mode.l
15#else:
16    -b $mode.b
17    -e $mode.e
18#end if
19'$in_file'
20@CONDITIONAL_GZIP_OUT@
21    ]]></command>
22    <inputs>
23        <expand macro="in_faq"/>
24        <conditional name="mode">
25            <param name="mode_select" type="select" label="Mode for trimming FASTQ File">
26                <option value="quality">Quality</option>
27                <option value="position">Length/Position</option>
28            </param>
29            <when value="quality">
30                <param argument="-q" type="float" value="0.05" label="Error rate threshold" />
31                <param argument="-l" type="integer" value="30" label="Maximally trim down to INT bp" />
32            </when>
33            <when value="position">
34                <param argument="-b" type="integer" value="0" label="Trim INT bp from left" />
35                <param argument="-e" type="integer" value="0" label="Trim INT bp from right" />
36            </when>
37        </conditional>
38    </inputs>
39    <outputs>
40        <data name="default" format_source="in_file" label="${tool.name} on ${on_string}: trimmed"/>
41    </outputs>
42    <tests>
43        <test>
44            <param name="in_file" value="seqtk_trimfq.fq" ftype="fastqsanger"/>
45            <conditional name="mode">
46                <param name="mode_select" value="quality"/>
47                <param name="q" value="0.05"/>
48                <param name="l" value="30"/>
49            </conditional>
50            <output name="default" file="seqtk_trimfq_default.fq" ftype="fastqsanger"/>
51        </test>
52        <test>
53            <param name="in_file" value="seqtk_trimfq.fq" ftype="fastqsanger"/>
54            <conditional name="mode">
55                <param name="mode_select" value="position"/>
56                <param name="b" value="5"/>
57                <param name="e" value="5"/>
58            </conditional>
59            <output name="default" file="seqtk_trimfq_be.fq" ftype="fastqsanger"/>
60        </test>
61        <test>
62            <param name="in_file" value="seqtk_trimfq.fq.gz" ftype="fastqsanger.gz"/>
63            <conditional name="mode">
64                <param name="mode_select" value="position"/>
65                <param name="b" value="5"/>
66                <param name="e" value="5"/>
67            </conditional>
68            <output name="default" file="seqtk_trimfq_be.fq.gz" ftype="fastqsanger.gz"/>
69        </test>
70    </tests>
71    <help><![CDATA[
72**What it does**
73
74Trim a fastq file based on Phred scores, or by length
75
76@ATTRIBUTION@
77    ]]></help>
78    <expand macro="citation" />
79</tool>