comparison picard_FilterSamReads.xml @ 0:4419e9980172 draft

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