Mercurial > repos > rhpvorderman > fast_fastq_filter
comparison fast_fastq_filter.xml @ 1:6ee24ca51829 draft default tip
"planemo upload for repository https://github.com/LUMC/fastq-filter/tree/develop/galaxy commit a4a3ab70c61a5ea14719002eb72a34a02b5d89e3"
author | rhpvorderman |
---|---|
date | Wed, 08 Jun 2022 07:49:43 +0000 |
parents | 5f0d949db99e |
children |
comparison
equal
deleted
inserted
replaced
0:5f0d949db99e | 1:6ee24ca51829 |
---|---|
1 <tool id="fast_fastq_filter" name="fastq-filter" version="0.1.0" python_template_version="3.5" profile="16.04"> | 1 <tool id="fast_fastq_filter" name="fastq-filter" version="0.3.0" python_template_version="3.5" profile="16.04"> |
2 <description>filter FASTQ reads fast</description> | 2 <description>filter FASTQ reads fast</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="0.1.0">fastq-filter</requirement> | 4 <requirement type="package" version="0.3.0">fastq-filter</requirement> |
5 <!-- TODO: Remove this once biocontainer is published --> | 5 <!-- TODO: Remove this once biocontainer is published --> |
6 <container type="docker">quay.io/rhpvorderman/fastq-filter:0.1.0</container> | 6 <container type="docker">quay.io/rhpvorderman/fastq-filter:0.3.0</container> |
7 </requirements> | 7 </requirements> |
8 <command detect_errors="exit_code"><![CDATA[ | 8 <command detect_errors="exit_code"><![CDATA[ |
9 #set all_filters = [str(filter['filter']) + ":" + str(filter['filter_threshold']) for filter in $filters] | 9 set -e; |
10 fastq-filter -o '$output1' | 10 fastq-filter |
11 #echo "'" + "|".join($all_filters) + "'" | 11 #if str($filters.minimum_length.enabled) == "true" |
12 '$input1' | 12 --min-length $filters.minimum_length.threshold |
13 #end if | |
14 #if str($filters.maximum_length.enabled) == "true" | |
15 --max-length $filters.maximum_length.threshold | |
16 #end if | |
17 #if str($filters.average_error_rate.enabled) == "true" | |
18 --average-error-rate $filters.average_error_rate.threshold | |
19 #end if | |
20 #if str($filters.mean_quality.enabled) == "true" | |
21 --mean-quality $filters.mean_quality.threshold | |
22 #end if | |
23 #if str($filters.median_quality.enabled) == "true" | |
24 --median-quality $filters.median_quality.threshold | |
25 #end if | |
26 --verbose | |
27 -o '${output1}.gz' | |
28 #if str($library.type) == "paired": | |
29 -o ${output2}.gz | |
30 #end if | |
31 | |
32 '$library.input_1' | |
33 #if str($library.type) == "paired": | |
34 '$library.input_2' | |
35 #end if | |
36 ; | |
37 | |
38 mv '${output1}.gz' '$output1'; | |
39 #if str($library.type) == "paired": | |
40 mv '${output2}.gz' '$output2'; | |
41 #end if | |
13 ]]></command> | 42 ]]></command> |
14 <inputs> | 43 <inputs> |
15 <param type="data" name="input1" label="Input FASTQ file" format="fastqsanger,fastqsanger.gz" /> | 44 <conditional name="library"> |
16 <repeat name="filters" title="Filter" min="1"> | 45 <param name="type" type="select" label="Single-end or Paired-end reads?"> |
17 <param name="filter" type="select" label="Filter on"> | 46 <option value="single">Single-end</option> |
18 <option value="min_length">minimum length</option> | 47 <option value="paired">Paired-end</option> |
19 <option value="max_length">maximum length</option> | |
20 <option value="mean_quality" selected="true">mean quality</option> | |
21 <option value="median_quality">median quality</option> | |
22 </param> | 48 </param> |
23 <param name="filter_threshold" type="integer" label="Filter threshold" value="20"/> | 49 <when value="single"> |
24 </repeat> | 50 <param type="data" name="input_1" label="Input FASTQ file" format="fastqsanger,fastqsanger.gz" /> |
51 </when> | |
52 <when value="paired"> | |
53 <param type="data" name="input_1" label="Input FASTQ file #1" format="fastqsanger,fastqsanger.gz" /> | |
54 <param type="data" name="input_2" label="Input FASTQ file #2" format="fastqsanger,fastqsanger.gz" /> | |
55 </when> | |
56 </conditional> | |
57 <section name="filters" title="Filters" expanded="true"> | |
58 <conditional name="minimum_length"> | |
59 <param name="enabled" type="boolean" label="Minimum length" | |
60 help="The minimum length for a read."/> | |
61 <when value="true"> | |
62 <param name="threshold" type="integer" label="Threshold" | |
63 value="20" min="1"/> | |
64 </when> | |
65 <when value="false"/> | |
66 </conditional> | |
67 <conditional name="maximum_length"> | |
68 <param name="enabled" type="boolean" label="Maximum length" | |
69 help="The maximum length for a read."/> | |
70 <when value="true"> | |
71 <param name="threshold" type="integer" label="Threshold" | |
72 value="1000" min="1"/> | |
73 </when> | |
74 <when value="false"/> | |
75 </conditional> | |
76 <conditional name="average_error_rate"> | |
77 <param name="enabled" type="boolean" label="Average error rate" | |
78 help="The minimum average per base error rate."/> | |
79 <when value="true"> | |
80 <param name="threshold" type="float" label="Threshold" | |
81 value="0.001" min="0"/> | |
82 </when> | |
83 <when value="false"/> | |
84 </conditional> | |
85 <conditional name="mean_quality"> | |
86 <param name="enabled" type="boolean" label="Mean quality"> | |
87 <help> | |
88 Average quality. Same as the 'Average error rate' option but | |
89 specified with a phred score. I.e a mean quality of 30 is | |
90 equivalent to an average error rate of 0.001'. | |
91 </help> | |
92 </param> | |
93 <when value="true"> | |
94 <param name="threshold" type="integer" label="Threshold" | |
95 value="30" min="0"/> | |
96 </when> | |
97 <when value="false"/> | |
98 </conditional> | |
99 <conditional name="median_quality"> | |
100 <param name="enabled" type="boolean" label="Median quality"> | |
101 <help> | |
102 DEPRECATED: The minimum median phred score. This is not as | |
103 informative as the average error rate. It is also slower to | |
104 calculate. This filter is only included for backwards | |
105 compatibility reasons. | |
106 </help> | |
107 </param> | |
108 <when value="true"> | |
109 <param name="threshold" type="integer" label="Threshold" | |
110 value="30" min="0"/> | |
111 </when> | |
112 <when value="false"/> | |
113 </conditional> | |
114 </section> | |
25 </inputs> | 115 </inputs> |
26 <outputs> | 116 <outputs> |
27 <!--Fastqsanger format for now. For conditionally applying fastqsanger.gz the tool needs | 117 <data name="output1" format="fastqsanger.gz" /> |
28 to be updated. An option is using format auto_detect, so we do not have to conditionally set | 118 <data name="output2" format="fastqsanger.gz"> |
29 fastqsanger or fastqsanger.gz--> | 119 <filter>library['type'] == 'paired'</filter> |
30 <data name="output1" format="fastqsanger" /> | 120 </data> |
31 <!--When the tool is updated for paired input, the optional paired output can probably be | |
32 found in the cutadapt wrapper --> | |
33 </outputs> | 121 </outputs> |
34 <tests> | |
35 <test> | |
36 <param name="input1" value="input.fastq.gz"/> | |
37 <output name="output1" file="output.fastq.gz"/> | |
38 </test> | |
39 </tests> | |
40 <help><![CDATA[ | 122 <help><![CDATA[ |
41 The following filters are available: | 123 When paired FASTQ data is given, fastq-filter makes sure the output is in |
124 sync. The filters behave as follows for paired-end data: | |
42 | 125 |
43 + mean_quality:<quality> The mean quality of the FASTQ record is equal or above the given quality value. | 126 + average error rate: The average of the combined phred scores is used. |
44 + median_quality:<quality> The median quality of the FASTQ record is equal or above the given quality value. | 127 + median quality: The median of the combined phred scores is used. |
45 + min_length:<length> The length of the sequence in the FASTQ record is at least min_length | 128 + Minimum length: at least one of the records of the pair must meet the minimum length. |
46 + max_length:<length> The length of the sequence in the FASTQ record is at most max_length | 129 + Maximum length: None of the records in the pair must exceed the maximum length. |
130 | |
131 The rationale for the length filters is that R1 and R2 both sequence the same | |
132 molecule and the canonical length is the longest of both. | |
47 | 133 |
48 ]]></help> | 134 ]]></help> |
49 <citations> | 135 <citations> |
50 <citation type="bibtex"> | 136 <citation type="bibtex"> |
51 @misc{githubfastq-filter, | 137 @misc{githubfastq-filter, |