0
|
1 <tool id="qualityFilter" name="Filter nucleotides" version="1.0.1">
|
|
2 <description> based on quality scores</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="0.7.1">bx-python</requirement>
|
|
5 <requirement type="package" version="1.7.1">numpy</requirement>
|
|
6 </requirements>
|
|
7 <command interpreter="python">
|
|
8 quality_filter.py
|
|
9 $input
|
|
10 $out_file1
|
|
11 $primary_species
|
|
12 $mask_species
|
|
13 $score
|
|
14 $mask_char
|
|
15 ${mask_region.region}
|
|
16 #if $mask_region.region == "3"
|
|
17 ${mask_region.lengthr},${mask_region.lengthl}
|
|
18 #elif $mask_region.region == "0"
|
|
19 1
|
|
20 #else
|
|
21 ${mask_region.length}
|
|
22 #end if
|
|
23 ${GALAXY_DATA_INDEX_DIR}/quality_scores.loc
|
|
24 </command>
|
|
25 <inputs>
|
|
26 <param format="maf" name="input" type="data" label="Select data"/>
|
|
27 <param name="primary_species" type="select" label="Use quality scores of" display="checkboxes" multiple="true">
|
|
28 <options>
|
|
29 <filter type="data_meta" ref="input" key="species" />
|
|
30 </options>
|
|
31 </param>
|
|
32 <param name="mask_species" type="select" label="Mask Species" display="checkboxes" multiple="true">
|
|
33 <options>
|
|
34 <filter type="data_meta" ref="input" key="species" />
|
|
35 </options>
|
|
36 </param>
|
|
37 <param name="score" size="10" type="integer" value="20" label="Quality score cut-off" help="Cut-off value of 20 means mask all nucleotides having quality score less than or equal to 20"/>
|
|
38 <param name="mask_char" size="5" type="select" label="Mask character">
|
|
39 <option value="0" selected="true">#</option>
|
|
40 <option value="1">$</option>
|
|
41 <option value="2">^</option>
|
|
42 <option value="3">*</option>
|
|
43 <option value="4">?</option>
|
|
44 <option value="5">N</option>
|
|
45 </param>
|
|
46 <conditional name="mask_region">
|
|
47 <param name="region" type="select" label="Mask region">
|
|
48 <option value="0" selected="true">Only the corresponding nucleotide </option>
|
|
49 <option value="1">Corresponding column + right-side neighbors</option>
|
|
50 <option value="2">Corresponding column + left-side neighbors</option>
|
|
51 <option value="3">Corresponding column + neighbors on both sides</option>
|
|
52 </param>
|
|
53 <when value="0">
|
|
54 </when>
|
|
55 <when value="1">
|
|
56 <param name="length" size="10" type="integer" value="2" label="Number of right-side neighbors"/>
|
|
57 </when>
|
|
58 <when value="2">
|
|
59 <param name="length" size="10" type="integer" value="2" label="Number of left-side neighbors"/>
|
|
60 </when>
|
|
61 <when value="3">
|
|
62 <param name="lengthr" size="10" type="integer" value="2" label="Number of neighbors on right-side" />
|
|
63 <param name="lengthl" size="10" type="integer" value="2" label="Number of neighbors on left-side" />
|
|
64 </when>
|
|
65 </conditional>
|
|
66 </inputs>
|
|
67 <outputs>
|
|
68 <data format="maf" name="out_file1" metadata_source="input"/>
|
|
69 </outputs>
|
|
70 <requirements>
|
|
71 <requirement type="python-module">numpy</requirement>
|
|
72 </requirements>
|
|
73 <tests>
|
|
74 <test>
|
|
75 <param name="input" value="6.maf"/>
|
|
76 <param name="primary_species" value="panTro2"/>
|
|
77 <param name="mask_species" value="hg18"/>
|
|
78 <param name="score" value="50"/>
|
|
79 <param name="mask_char" value="0"/>
|
|
80 <param name="region" value="0" />
|
|
81 <output name="out_file1" file="6_quality_filter.maf"/>
|
|
82 </test>
|
|
83 </tests>
|
|
84 <help>
|
|
85
|
|
86 .. class:: infomark
|
|
87
|
|
88 **What it does**
|
|
89
|
|
90 This tool takes a MAF file as input and filters nucleotides in every alignment block of the MAF file based on their quality/PHRED scores.
|
|
91
|
|
92 -----
|
|
93
|
|
94 .. class:: warningmark
|
|
95
|
|
96 **Note**
|
|
97
|
|
98 Any block/s not containing the primary species (species whose quality scores is to be used), will be omitted.
|
|
99 Also, any primary species whose quality scores are not available in Galaxy will be considered as a non-primary species. This info will appear as a message in the job history panel.
|
|
100
|
|
101 -----
|
|
102
|
|
103 **Example**
|
|
104
|
|
105 - For the following alignment block::
|
|
106
|
|
107 a score=4050.0
|
|
108 s hg18.chrX 3719221 48 - 154913754 tattttacatttaaaataaatatgtaaatatatattttatatttaaaa
|
|
109 s panTro2.chrX 3560945 48 - 155361357 tattttatatttaaaataaagatgtaaatatatattttatatttaaaa
|
|
110
|
|
111 - running this tool with **Primary species as panTro2**, **Mask species as hg18, panTro2**, **Quality cutoff as 20**, **Mask character as #** and **Mask region as only the corresponding position** will return::
|
|
112
|
|
113 a score=4050.0
|
|
114 s hg18.chrX 3719221 48 - 154913754 ###tttac#####a###a#atatgtaaat###tattt#####ttaaaa
|
|
115 s panTro2.chrX 3560945 48 - 155361357 ###tttat#####a###a#agatgtaaat###tattt#####ttaaaa
|
|
116
|
|
117 where, the positions containing # represent panTro2 nucleotides having quality scores less than 20.
|
|
118 </help>
|
|
119 </tool>
|