comparison picard_FilterSamReads.xml @ 5:3d4f1fa26f0e draft

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