5
|
1 <tool name="MarkDuplicates" id="picard_MarkDuplicates" version="1.126.0">
|
|
2 <description>examine aligned records in BAM datasets to locate duplicate molecules</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 java -jar \$JAVA_JAR_PATH/picard.jar
|
|
15 MarkDuplicates
|
|
16
|
|
17 INPUT="${inputFile}"
|
|
18 OUTPUT="${outFile}"
|
|
19
|
|
20 METRICS_FILE="${metrics_file}"
|
|
21 #for $element in $comments:
|
|
22 COMMENT="${element.comment}"
|
|
23 #end for
|
|
24 REMOVE_DUPLICATES="${remove_duplicates}"
|
|
25 ASSUME_SORTED="${assume_sorted}"
|
|
26
|
|
27 DUPLICATE_SCORING_STRATEGY="${duplicate_scoring_strategy}"
|
|
28
|
6
|
29 #import pipes
|
|
30 READ_NAME_REGEX=${ pipes.quote( str( $read_name_regex ) ) or "''" }
|
5
|
31 OPTICAL_DUPLICATE_PIXEL_DISTANCE="${optical_duplicate_pixel_distance}"
|
|
32
|
|
33 VALIDATION_STRINGENCY="${validation_stringency}"
|
|
34 QUIET=true
|
|
35 VERBOSITY=ERROR
|
|
36
|
|
37 </command>
|
|
38 <inputs>
|
|
39 <param format="bam" name="inputFile" type="data" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset"/>
|
|
40 <repeat name="comments" title="Comment" min="0" help="You can provide multiple comments">
|
|
41 <param name="comment" type="text" size="50" label="Add this comment to BAM dataset"/>
|
|
42 </repeat>
|
|
43 <param name="remove_duplicates" type="boolean" label="If true do not write duplicates to the output file instead of writing them with appropriate flags set" help="REMOVE_DUPLICATES; default=False"/>
|
|
44 <param name="assume_sorted" type="boolean" label="Assume the input file is already sorted" checked="true" truevalue="true" falsevalue="false" help="ASSUME_SORTED; default=True"/>
|
|
45
|
|
46 <param name="duplicate_scoring_strategy" type="select" label="The scoring strategy for choosing the non-duplicate among candidates" help="DUPLICATE_SCORING_STRATEGY; default=SUM_OF_BASE_QUALITIES">
|
|
47 <option value="SUM_OF_BASE_QUALITIES">SUM_OF_BASE_QUALITIES</option>
|
|
48 <option value="TOTAL_MAPPED_REFERENCE_LENGTH">TOTAL_MAPPED_REFERENCE_LENGTH</option>
|
|
49 </param>
|
|
50
|
|
51
|
|
52 <param name="read_name_regex" type="text" size="40" value="[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*." label="Regular expression that can be used to parse read names in the incoming SAM/BAM dataset" help="READ_NAME_REGEX; Read names are parsed to extract three variables: tile/region, x coordinate and y coordinate. These values are used to estimate the rate of optical duplication in order to give a more accurate estimated library size. See help below for more info; default=[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.">
|
|
53 <sanitizer>
|
|
54 <valid initial="string.printable">
|
|
55 </valid>
|
|
56 </sanitizer>
|
|
57 </param>
|
|
58 <param name="optical_duplicate_pixel_distance" type="integer" value="100" min="0" max="500" label="The maximum offset between two duplicte clusters in order to consider them optical duplicates" help="OPTICAL_DUPLICATE_PIXEL_DISTANCE; default=100"/>
|
|
59
|
|
60 <expand macro="VS" />
|
|
61
|
|
62 </inputs>
|
|
63
|
|
64 <outputs>
|
|
65 <data format="txt" name="metrics_file" label="${tool.name} on ${on_string}: MarkDuplicate metrics"/>
|
|
66 <data format="bam" name="outFile" label="${tool.name} on ${on_string}: MarkDuplicates BAM output"/>
|
|
67 </outputs>
|
|
68
|
|
69 <tests>
|
|
70 <test>
|
|
71 <param name="inputFile" value="picard_MarkDuplicates.bam" ftype="bam"/>
|
|
72 <param name="comment" value="test-run"/>
|
|
73 <param name="assume_sorted" value="True"/>
|
|
74 <param name="remove_duplicates" value="True"/>
|
|
75 <param name="read_name_regex" value="[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*."/>
|
|
76 <param name="optical_duplicate_pixel_distance" value="100"/>
|
|
77 <param name="duplicate_scoring_strategy" value="SUM_OF_BASE_QUALITIES"/>
|
|
78 <param name="validation_stringency" value="LENIENT"/>
|
|
79 <output name="outFile" file="picard_MarkDuplicates_test1.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 Examines aligned records in the supplied SAM or BAM dataset to locate duplicate molecules. All records are then written to the output file with the duplicate records flagged.
|
|
92
|
|
93 @dataset_collections@
|
|
94
|
|
95 @description@
|
|
96
|
|
97 COMMENT=String
|
|
98 CO=String Comment(s) to include in the output file's header. This option may be specified 0 or
|
|
99 more times.
|
|
100
|
|
101 REMOVE_DUPLICATES=Boolean If true do not write duplicates to the output file instead of writing them with
|
|
102 appropriate flags set. Default value: false.
|
|
103
|
|
104 READ_NAME_REGEX=String Regular expression that can be used to parse read names in the incoming SAM file. Read
|
|
105 names are parsed to extract three variables: tile/region, x coordinate and y coordinate.
|
|
106 These values are used to estimate the rate of optical duplication in order to give a more
|
|
107 accurate estimated library size. Set this option to null to disable optical duplicate
|
|
108 detection. The regular expression should contain three capture groups for the three
|
|
109 variables, in order. It must match the entire read name. Note that if the default regex
|
|
110 is specified, a regex match is not actually done, but instead the read name is split on
|
|
111 colon character. For 5 element names, the 3rd, 4th and 5th elements are assumed to be
|
|
112 tile, x and y values. For 7 element names (CASAVA 1.8), the 5th, 6th, and 7th elements
|
|
113 are assumed to be tile, x and y values. Default value:
|
|
114 [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.
|
|
115
|
|
116 DUPLICATE_SCORING_STRATEGY=ScoringStrategy
|
|
117 DS=ScoringStrategy The scoring strategy for choosing the non-duplicate among candidates. Default value:
|
|
118 SUM_OF_BASE_QUALITIES. Possible values: {SUM_OF_BASE_QUALITIES, TOTAL_MAPPED_REFERENCE_LENGTH}
|
|
119
|
|
120 OPTICAL_DUPLICATE_PIXEL_DISTANCE=Integer
|
|
121 The maximum offset between two duplicte clusters in order to consider them optical
|
|
122 duplicates. This should usually be set to some fairly small number (e.g. 5-10 pixels)
|
|
123 unless using later versions of the Illumina pipeline that multiply pixel values by 10, in
|
|
124 which case 50-100 is more normal. Default value: 100.
|
|
125
|
|
126 @more_info@
|
|
127
|
|
128 </help>
|
|
129 </tool>
|
|
130
|
|
131
|