comparison picard_FilterSamReads.xml @ 0:5166ed57b1c4 draft

Uploaded version 1.135
author avowinkel
date Mon, 06 Jul 2015 14:46:32 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5166ed57b1c4
1 <tool name="FilterSamReads" id="picard_FilterSamReads" version="1.135">
2 <description>include or exclude aligned and unaligned reads and read lists</description>
3 <macros>
4 <import>picard_macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <command>
8 @java_options@
9
10 ##Sam Sorting is performed here because FilterSamReads requires input to be in query-sorted order
11
12 java -jar \$JAVA_JAR_PATH/picard.jar
13 SortSam
14 INPUT="${inputFile}"
15 OUTPUT=query_sorted_bam.bam
16 SORT_ORDER=queryname
17 VALIDATION_STRINGENCY=LENIENT
18 QUIET=true
19 VERBOSITY=ERROR
20
21 &amp;&amp;
22
23 java -jar \$JAVA_JAR_PATH/picard.jar
24 FilterSamReads
25 INPUT=query_sorted_bam.bam
26 FILTER="${filter_type.filter}"
27
28 #if ( str( $filter_type.filter ) == "includeReadList" or str( $filter_type.filter ) == "excludeReadList" ):
29 READ_LIST_FILE="${filter_type.read_list_file}"
30 #end if
31
32 OUTPUT="${outFile}"
33 SORT_ORDER=coordinate
34 VALIDATION_STRINGENCY="${validation_stringency}"
35 QUIET=true
36 VERBOSITY=ERROR
37
38 </command>
39 <inputs>
40 <param name="inputFile" type="data" format="sam,bam" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset"/>
41 <conditional name="filter_type">
42 <param name="filter" type="select" label="Select filtering type" help="FILTER; see Help for deatiled info">
43 <option value="includeAligned">Include aligned</option>
44 <option value="excludeAligned">Exclude aligned</option>
45 <option value="includeReadList">Include read list</option>
46 <option value="excludeReadList">Exclude read list</option>
47 </param>
48 <when value="includeAligned"/> <!-- do nothing -->
49 <when value="excludeAligned"/> <!-- do nothing -->
50 <when value="includeReadList">
51 <param name="read_list_file" type="data" format="tabular" label="Dataset containing read names that will be INCLUDED in the output" help="READ_LIST_FILE"/>
52 </when>
53 <when value="excludeReadList">
54 <param name="read_list_file" type="data" format="tabular" label="Dataset containing read names that will be EXCLUDED in the output" help="READ_LIST_FILE"/>
55 </when>
56 </conditional>
57
58 <expand macro="VS" />
59
60 </inputs>
61
62 <outputs>
63 <data format="bam" name="outFile" label="${tool.name} on ${on_string}: filtered BAM"/>
64 </outputs>
65
66 <tests>
67 <test>
68 <param name="inputFile" value="picard_FilterSamReads.bam" ftype="bam"/>
69 <param name="filter" value="includeReadList"/>
70 <param name="read_list_file" value="picard_FilterSamReads_read_list_file.tab" ftype="tabular"/>
71 <param name="validation_stringency" value="LENIENT"/>
72 <output name="outFile" file="picard_FilterSamReads_include_reads_test1.bam" ftype="bam" lines_diff="2"/>
73 </test>
74 <test>
75 <param name="inputFile" value="picard_FilterSamReads.bam" ftype="bam"/>
76 <param name="filter" value="excludeReadList"/>
77 <param name="read_list_file" value="picard_FilterSamReads_read_list_file.tab" ftype="tabular"/>
78 <param name="validation_stringency" value="LENIENT"/>
79 <output name="outFile" file="picard_FilterSamReads_exclude_reads_test2.bam" ftype="bam" lines_diff="2"/>
80 </test>
81 </tests>
82
83 <stdio>
84 <exit_code range="1:" level="fatal"/>
85 </stdio>
86
87 <help>
88
89 **Purpose**
90
91 Computes a number of metrics that are useful for evaluating coverage and performance of whole genome sequencing experiments.
92
93 ------
94
95 .. class:: warningmark
96
97 **Warning on using this tool on BWA-MEM output**
98
99 This tool will likely fail on BAM datasets generated by BWA MEM as it generates partial read alignemnts.
100
101 @dataset_collections@
102
103 @description@
104
105 FILTER=Filter Filter. Required. Possible values:
106 includeAligned [OUTPUT SAM/BAM will contain aligned
107 reads only. (Note that *both* first and
108 second of paired reads must be aligned to be included
109 in the OUTPUT SAM or BAM)],
110
111 excludeAligned [OUTPUT SAM/BAM will contain un-mapped reads only.
112 (Note that *both* first and second of pair must be aligned to be
113 excluded from the OUTPUT SAM or BAM)]
114
115 includeReadList [OUTPUT SAM/BAM will contain reads
116 that are supplied in the READ_LIST_FILE file]
117
118 excludeReadList [OUTPUT bam will contain
119 reads that are *not* supplied in the READ_LIST_FILE file]}
120
121 READ_LIST_FILE=File
122 RLF=File Read List File containing reads that will be included or excluded from the OUTPUT SAM or
123 BAM file. Default value: null.
124
125 @more_info@
126
127 </help>
128 </tool>
129
130