root/galaxy-central/tools/fastq/fastq_trimmer_by_quality.xml

リビジョン 2, 7.1 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1<tool id="fastq_quality_trimmer" name="FASTQ Quality Trimmer" version="1.0.0">
2  <description>by sliding window</description>
3  <command interpreter="python">fastq_trimmer_by_quality.py '$input_file' '$output_file' -f '${input_file.extension[len( 'fastq' ):]}' -s '$window_size'
4    -t '$step_size' -e '$trim_ends' -a '$aggregation_action' -x '$exclude_count' -c '$score_comparison' -q '$quality_score'
5    #if $keep_zero_length.value:
6        -k
7    #end if
8  </command>
9  <inputs>
10    <param name="input_file" type="data" format="fastqsanger,fastqcssanger" label="FASTQ File"/>
11    <param name="keep_zero_length" label="Keep reads with zero length" type="boolean" truevalue="keep_zero_length" falsevalue="exclude_zero_length" selected="False"/>
12    <param name="trim_ends" type="select" label="Trim ends">
13      <option value="53" selected="True">5' and 3'</option>
14      <option value="5">5' only</option>
15      <option value="3">3' only</option>
16    </param>
17    <param name="window_size" type="integer" value="1" label="Window size"/>
18    <param name="step_size" type="integer" value="1" label="Step Size" />
19    <param name="exclude_count" label="Maximum number of bases to exclude from the window during aggregation" value="0" type="integer" />
20    <param name="aggregation_action" type="select" label="Aggregate action for window">
21      <option value="min" selected="True">min score</option>
22      <option value="max">max score</option>
23      <option value="sum">sum of scores</option>
24      <option value="mean">mean of scores</option>
25    </param>
26    <param name="score_comparison" type="select" label="Trim until aggregate score is">
27      <sanitizer>
28        <valid initial="none">
29            <add value="&lt;&gt;=!"/> <!-- only allow lt, gt, e, le, ge, ne for this parameter; will be single-quote escaped on commandline -->
30        </valid>
31      </sanitizer>
32      <option value="&gt;">&gt;</option>
33      <option value="&gt;=" selected="true">&gt;=</option>
34      <option value="==">==</option>
35      <option value="!=">!=</option>
36      <option value="&lt;">&lt;</option>
37      <option value="&lt;=">&lt;=</option>
38    </param>
39    <param name="quality_score" label="Quality Score" value="0" type="float" />
40  </inputs>
41  <outputs>
42    <data name="output_file" format="input" />
43  </outputs>
44  <tests>
45    <test>
46      <!-- Trim until window size 1 >= 20;both ends -->
47      <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
48      <param name="keep_zero_length" value="exclude_zero_length" />
49      <param name="trim_ends" value="53"/>
50      <param name="window_size" value="1"/>
51      <param name="step_size" value="1"/>
52      <param name="exclude_count" value="0"/>
53      <param name="aggregation_action" value="min"/>
54      <param name="score_comparison" value="&gt;="/>
55      <param name="quality_score" value="20"/>
56      <output name="output_file" file="sanger_full_range_quality_trimmed_out_1.fastqsanger" />
57    </test>
58    <test>
59      <!-- Trim until window size 1 >= 20; 5' end only -->
60      <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
61      <param name="keep_zero_length" value="exclude_zero_length" />
62      <param name="trim_ends" value="5"/>
63      <param name="window_size" value="1"/>
64      <param name="step_size" value="1"/>
65      <param name="exclude_count" value="0"/>
66      <param name="aggregation_action" value="min"/>
67      <param name="score_comparison" value="&gt;="/>
68      <param name="quality_score" value="20"/>
69      <output name="output_file" file="sanger_full_range_quality_trimmed_out_2.fastqsanger" />
70    </test>
71    <test>
72      <!-- Trim until window size 1 >= 20; 3' end only -->
73      <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
74      <param name="keep_zero_length" value="exclude_zero_length" />
75      <param name="trim_ends" value="3"/>
76      <param name="window_size" value="1"/>
77      <param name="step_size" value="1"/>
78      <param name="exclude_count" value="0"/>
79      <param name="aggregation_action" value="min"/>
80      <param name="score_comparison" value="&gt;="/>
81      <param name="quality_score" value="20"/>
82      <output name="output_file" file="sanger_full_range_quality_trimmed_out_3.fastqsanger" />
83    </test>
84    <test>
85      <!-- Trim until window size 2 >= 1;both ends, 1 deviant score -->
86      <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
87      <param name="keep_zero_length" value="exclude_zero_length" />
88      <param name="trim_ends" value="53"/>
89      <param name="window_size" value="2"/>
90      <param name="step_size" value="1"/>
91      <param name="exclude_count" value="1"/>
92      <param name="aggregation_action" value="min"/>
93      <param name="score_comparison" value="&gt;="/>
94      <param name="quality_score" value="1"/>
95      <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" />
96    </test>
97    <test>
98      <!-- Trim entire sequences; keep empty reads -->
99      <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
100      <param name="keep_zero_length" value="true" />
101      <param name="trim_ends" value="53"/>
102      <param name="window_size" value="1"/>
103      <param name="step_size" value="1"/>
104      <param name="exclude_count" value="0"/>
105      <param name="aggregation_action" value="min"/>
106      <param name="score_comparison" value="&gt;="/>
107      <param name="quality_score" value="999"/>
108      <output name="output_file" file="sanger_full_range_empty_reads.fastqsanger" />
109    </test>
110    <test>
111      <!-- Trim entire sequences; discard empty reads -->
112      <param name="input_file" value="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />
113      <param name="keep_zero_length"/>
114      <param name="trim_ends" value="53"/>
115      <param name="window_size" value="1"/>
116      <param name="step_size" value="1"/>
117      <param name="exclude_count" value="0"/>
118      <param name="aggregation_action" value="min"/>
119      <param name="score_comparison" value="&gt;="/>
120      <param name="quality_score" value="999"/>
121      <output name="output_file" file="empty_file.dat" />
122    </test>
123  </tests>
124  <help>
125This tool allows you to trim the ends of reads based upon the aggregate value of quality scores found within a sliding window; a sliding window of size 1 is equivalent to 'simple' trimming of the ends.
126
127The user specifies the aggregating action (min, max, sum, mean) to perform on the quality score values found within the sliding window to be used with the user defined comparison operation and comparison value.
128
129The user can provide a maximum count of bases that can be excluded from the aggregation within the window. When set, this tool will first check the aggregation of the entire window, then after removing 1 value, then after removing 2 values, up to the number declared. Setting this value to be equal to or greater than the window size will cause no trimming to occur.
130
131-----
132
133.. class:: warningmark
134
135Trimming a color space read will cause any adapter base to be lost.
136
137  </help>
138</tool>
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。