annotate samtool_filter2.xml @ 16:160964255888 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit a97efd3ee05c6e27ff8294f66ea975445966d9c4
author devteam
date Thu, 05 Oct 2017 10:31:25 -0400
parents 1ea3b8a4c2fe
children 3263a2b5d9f0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
aa8dc5cf70be planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit d02925461fc5d6188099a60c1996c671a0bde828
devteam
parents: 12
diff changeset
1 <tool id="samtool_filter2" name="Filter SAM or BAM, output SAM or BAM" version="1.1.2">
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
2 <description>files on FLAG MAPQ RG LN or by region</description>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
3 <requirements>
13
aa8dc5cf70be planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit d02925461fc5d6188099a60c1996c671a0bde828
devteam
parents: 12
diff changeset
4 <requirement type="package" version="1.2">samtools</requirement>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
5 </requirements>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
6 <stdio>
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
7 <exit_code range="1:" />
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
8 </stdio>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
9 <command>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
10 <![CDATA[
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
11 ##set up input files, regions requires input.bam and input.bai
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
12 #if $input1.is_of_type('bam')
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
13 #set $input = 'input.bam'
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
14 ln -s '$input1' $input &&
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
15 ln -s '$input1.metadata.bam_index' input.bai &&
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
16 #elif $input1.is_of_type('sam')
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
17 #set $input = 'input.sam'
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
18 ln -s '$input1' $input &&
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
19 #end if
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
20 samtools view $possibly_select_inverse '$output1' $header
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
21
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
22 #if $input1.is_of_type('sam')
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
23 -S
5b175699dd41 Uploaded
devteam
parents:
diff changeset
24 #end if
5b175699dd41 Uploaded
devteam
parents:
diff changeset
25
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
26 #if str($outputtype) == 'bam'
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
27 -b
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
28 #end if
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
29
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
30 #if str($mapq)
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
31 -q $mapq
5b175699dd41 Uploaded
devteam
parents:
diff changeset
32 #end if
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
33 #if $flag.filter == 'yes'
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
34 #if str($flag.reqBits) != 'None'
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
35 #set $reqs = str($flag.reqBits).split(',')
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
36 #set $reqFlag = 0
5b175699dd41 Uploaded
devteam
parents:
diff changeset
37 #for $xn in $reqs:
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
38 #set $reqFlag += int($xn, 16)
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
39 #end for
5b175699dd41 Uploaded
devteam
parents:
diff changeset
40 -f $hex($reqFlag)
5b175699dd41 Uploaded
devteam
parents:
diff changeset
41 #end if
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
42 #if str($flag.skipBits) != 'None'
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
43 #set $skips = str($flag.skipBits).split(',')
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
44 #set $skipFlag = 0
5b175699dd41 Uploaded
devteam
parents:
diff changeset
45 #for $xn in $skips:
5b175699dd41 Uploaded
devteam
parents:
diff changeset
46 #set $skipFlag += int(xn,16)
5b175699dd41 Uploaded
devteam
parents:
diff changeset
47 #end for
5b175699dd41 Uploaded
devteam
parents:
diff changeset
48 -F $hex($skipFlag)
5b175699dd41 Uploaded
devteam
parents:
diff changeset
49 #end if
5b175699dd41 Uploaded
devteam
parents:
diff changeset
50 #end if
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
51 #if str($read_group).strip()
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
52 -r '$read_group'
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
53 #end if
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
54 #if str($library).strip()
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
55 -l '$library'
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
56 #end if
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
57 #if $bed_file
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
58 -L '$bed_file'
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
59 #end if
5b175699dd41 Uploaded
devteam
parents:
diff changeset
60 $input
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
61 #if str($regions).strip() and $input1.is_of_type('bam')
16
160964255888 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit a97efd3ee05c6e27ff8294f66ea975445966d9c4
devteam
parents: 15
diff changeset
62 #for region in str($regions).split():
160964255888 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit a97efd3ee05c6e27ff8294f66ea975445966d9c4
devteam
parents: 15
diff changeset
63 '$region'
160964255888 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit a97efd3ee05c6e27ff8294f66ea975445966d9c4
devteam
parents: 15
diff changeset
64 #end for
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
65 #end if
5b175699dd41 Uploaded
devteam
parents:
diff changeset
66 ## need to redirect stderr message so galaxy does not think this failed
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
67 2>&1
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
68 ]]>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
69 </command>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
70 <inputs>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
71 <param name="input1" type="data" format="sam,bam" label="SAM or BAM file to filter" />
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
72 <param name="header" type="select" label="Header in output">
5b175699dd41 Uploaded
devteam
parents:
diff changeset
73 <option value="-h">Include Header</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
74 <option value="">Exclude Header</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
75 <option value="-H">Only the Header</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
76 </param>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
77 <param name="mapq" type="integer" value="" optional="true" label="Minimum MAPQ quality score" help="(-q)">
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
78 <validator type="in_range" message="The MAPQ quality score can't be negative" min="0"/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
79 </param>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
80 <conditional name="flag">
5b175699dd41 Uploaded
devteam
parents:
diff changeset
81 <param name="filter" type="select" label="Filter on bitwise flag">
5b175699dd41 Uploaded
devteam
parents:
diff changeset
82 <option value="no">no</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
83 <option value="yes">yes</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
84 </param>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
85 <when value="no"/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
86 <when value="yes">
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
87 <param name="reqBits" type="select" multiple="true" display="checkboxes" label="Only output alignments with all of these flag bits set" help="(-f)">
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
88 <option value="0x0001">Read is paired</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
89 <option value="0x0002">Read is mapped in a proper pair</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
90 <option value="0x0004">The read is unmapped</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
91 <option value="0x0008">The mate is unmapped</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
92 <option value="0x0010">Read strand</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
93 <option value="0x0020">Mate strand</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
94 <option value="0x0040">Read is the first in a pair</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
95 <option value="0x0080">Read is the second in a pair</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
96 <option value="0x0100">The alignment or this read is not primary</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
97 <option value="0x0200">The read fails platform/vendor quality checks</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
98 <option value="0x0400">The read is a PCR or optical duplicate</option>
14
cc2b231ab5e1 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 47865f133813c9e61ffc63d70aad1ff782c645ac
devteam
parents: 13
diff changeset
99 <option value="0x0800">Supplementary alignment</option>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
100 </param>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
101 <param name="skipBits" type="select" multiple="true" display="checkboxes" label="Skip alignments with any of these flag bits set" help="(-F)">
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
102 <option value="0x0001">Read is paired</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
103 <option value="0x0002">Read is mapped in a proper pair</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
104 <option value="0x0004">The read is unmapped</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
105 <option value="0x0008">The mate is unmapped</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
106 <option value="0x0010">Read strand</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
107 <option value="0x0020">Mate strand</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
108 <option value="0x0040">Read is the first in a pair</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
109 <option value="0x0080">Read is the second in a pair</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
110 <option value="0x0100">The alignment or this read is not primary</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
111 <option value="0x0200">The read fails platform/vendor quality checks</option>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
112 <option value="0x0400">The read is a PCR or optical duplicate</option>
14
cc2b231ab5e1 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 47865f133813c9e61ffc63d70aad1ff782c645ac
devteam
parents: 13
diff changeset
113 <option value="0x0800">Supplementary alignment</option>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
114 </param>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
115 </when>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
116 </conditional>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
117 <param name="library" type="text" value="" label="Select alignments from Library"
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
118 help="(-l) Requires headers in the input SAM or BAM, otherwise no alignments will be output"/>
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
119 <param name="read_group" type="text" value="" label="Select alignments from Read Group"
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
120 help="(-r) Requires headers in the input SAM or BAM, otherwise no alignments will be output"/>
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
121 <param name="bed_file" type="data" format="bed" optional="true" label="Output alignments overlapping the regions in the BED FILE" help="(-L)"/>
13
aa8dc5cf70be planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit d02925461fc5d6188099a60c1996c671a0bde828
devteam
parents: 12
diff changeset
122 <param name="possibly_select_inverse" checked="false" label="Use inverse selection" type="boolean" truevalue="-U" falsevalue="-o" help="Select the opposite of the listed chromosomes" />
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
123 <param name="regions" type="text" value="" label="Select regions (only used when the input is in BAM format)"
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
124 help="region should be presented in one of the following formats: `chr1', `chr2:1,000' and `chr3:1000-2,000'"/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
125 <param name="outputtype" type="select" label="Select the output format">
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
126 <option value="bam">BAM (-b)</option>
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
127 <option value="sam">SAM</option>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
128 </param>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
129 </inputs>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
130 <outputs>
11
a2b5298e7239 Uploaded from GH
devteam
parents: 10
diff changeset
131 <data name="output1" format="sam" label="${tool.name} on ${on_string}: ${outputtype}">
9
ce2ed9f2d811 added test data from samtools_filter, renamed xml file, fixed tests, changed changeset revision of dependency
Dorine <dorine@bx.psu.edu>
parents: 8
diff changeset
132 <change_format>
ce2ed9f2d811 added test data from samtools_filter, renamed xml file, fixed tests, changed changeset revision of dependency
Dorine <dorine@bx.psu.edu>
parents: 8
diff changeset
133 <when input="outputtype" value="bam" format="bam" />
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
134 </change_format>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
135 </data>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
136 </outputs>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
137 <tests>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
138 <test>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
139 <param name="input1" value="bam_to_sam_in2.sam" ftype="sam" />
5b175699dd41 Uploaded
devteam
parents:
diff changeset
140 <param name="header" value=""/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
141 <param name="filter" value="yes"/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
142 <param name="reqBits" value="0x0080"/>
9
ce2ed9f2d811 added test data from samtools_filter, renamed xml file, fixed tests, changed changeset revision of dependency
Dorine <dorine@bx.psu.edu>
parents: 8
diff changeset
143 <param name="outputtype" value="sam"/>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
144 <output name="output1">
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
145 <assert_contents>
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
146 <has_text text="141" />
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
147 <not_has_text text="77" />
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
148 </assert_contents>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
149 </output>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
150 </test>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
151 <test>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
152 <param name="input1" value="bam_to_sam_in2.sam" ftype="sam" />
5b175699dd41 Uploaded
devteam
parents:
diff changeset
153 <param name="header" value=""/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
154 <param name="filter" value="no"/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
155 <param name="read_group" value="rg1"/>
9
ce2ed9f2d811 added test data from samtools_filter, renamed xml file, fixed tests, changed changeset revision of dependency
Dorine <dorine@bx.psu.edu>
parents: 8
diff changeset
156 <param name="outputtype" value="sam"/>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
157 <output name="output1">
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
158 <assert_contents>
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
159 <has_text text="rg1" />
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
160 <not_has_text text="rg2" />
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
161 </assert_contents>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
162 </output>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
163 </test>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
164 <test>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
165 <param name="input1" value="bam_to_sam_in1.sam" ftype="sam" />
5b175699dd41 Uploaded
devteam
parents:
diff changeset
166 <param name="header" value=""/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
167 <param name="filter" value="yes"/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
168 <param name="skipBits" value="0x0008"/>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
169 <param name="mapq" value="250"/>
9
ce2ed9f2d811 added test data from samtools_filter, renamed xml file, fixed tests, changed changeset revision of dependency
Dorine <dorine@bx.psu.edu>
parents: 8
diff changeset
170 <param name="outputtype" value="sam"/>
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
171 <output name="output1">
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
172 <assert_contents>
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
173 <has_text text="both_reads_align_clip_marked" />
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
174 <not_has_text text="both_reads_present_only_first_aligns" />
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
175 </assert_contents>
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
176 </output>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
177 </test>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
178 </tests>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
179 <help>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
180 **What it does**
5b175699dd41 Uploaded
devteam
parents:
diff changeset
181
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
182 This tool uses the samtools view command in SAMtools_ toolkit to filter a SAM or BAM file on the MAPQ (mapping quality), FLAG bits, Read Group, Library, or region.
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
183
5b175699dd41 Uploaded
devteam
parents:
diff changeset
184 **Input**
5b175699dd41 Uploaded
devteam
parents:
diff changeset
185
5b175699dd41 Uploaded
devteam
parents:
diff changeset
186 Input is either a SAM or BAM file.
5b175699dd41 Uploaded
devteam
parents:
diff changeset
187
5b175699dd41 Uploaded
devteam
parents:
diff changeset
188 **Output**
5b175699dd41 Uploaded
devteam
parents:
diff changeset
189
5b175699dd41 Uploaded
devteam
parents:
diff changeset
190 The output file will be SAM or BAM (depending on the chosen option), filtered by the selected options.
5b175699dd41 Uploaded
devteam
parents:
diff changeset
191
5b175699dd41 Uploaded
devteam
parents:
diff changeset
192 **Options**
5b175699dd41 Uploaded
devteam
parents:
diff changeset
193
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
194 Filtering by read group or library requires headers in the input SAM or BAM file.
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
195
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
196 If regions are specified, only alignments overlapping the specified regions will be output. An alignment may be given multiple times if it is overlapping several regions.
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
197 A region can be presented, for example, in the following format::
5b175699dd41 Uploaded
devteam
parents:
diff changeset
198
5b175699dd41 Uploaded
devteam
parents:
diff changeset
199 chr2 (the whole chr2)
12
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
200 chr2:1000000 (region starting from 1,000,000bp)
543405859e60 planemo upload commit 33927a87ba2eee9bf0ecdd376a66241b17b3d734
devteam
parents: 11
diff changeset
201 chr2:1,000,000-2,000,000 (region between 1,000,000 and 2,000,000bp including the end points).
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
202
5b175699dd41 Uploaded
devteam
parents:
diff changeset
203 Note: The coordinate is 1-based.
5b175699dd41 Uploaded
devteam
parents:
diff changeset
204
5b175699dd41 Uploaded
devteam
parents:
diff changeset
205 Multiple regions may be specified, separated by a space character::
5b175699dd41 Uploaded
devteam
parents:
diff changeset
206
5b175699dd41 Uploaded
devteam
parents:
diff changeset
207 chr2:1000000-2000000 chr2:1,000,000-2,000,000 chrX
5b175699dd41 Uploaded
devteam
parents:
diff changeset
208
5b175699dd41 Uploaded
devteam
parents:
diff changeset
209
5b175699dd41 Uploaded
devteam
parents:
diff changeset
210
15
1ea3b8a4c2fe planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/samtool_filter2 commit 94a7407227beb0139c49d92c7f922499dc7f0cd1
devteam
parents: 14
diff changeset
211 .. _SAMtools: http://www.htslib.org/
7
5b175699dd41 Uploaded
devteam
parents:
diff changeset
212
5b175699dd41 Uploaded
devteam
parents:
diff changeset
213 </help>
5b175699dd41 Uploaded
devteam
parents:
diff changeset
214 </tool>