5
|
1 <tool name="MarkDuplicatesWithMateCigar" id="picard_MarkDuplicatesWithMateCigar" 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 MarkDuplicatesWithMateCigar
|
|
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
|
|
25 MINIMUM_DISTANCE="${minimum_distance}"
|
|
26 SKIP_PAIRS_WITH_NO_MATE_CIGAR="${skip_pairs_with_no_mate_cigar}"
|
|
27
|
|
28
|
|
29 REMOVE_DUPLICATES="${remove_duplicates}"
|
|
30 ASSUME_SORTED="${assume_sorted}"
|
|
31
|
|
32 DUPLICATE_SCORING_STRATEGY="${duplicate_scoring_strategy}"
|
|
33
|
6
|
34 #import pipes
|
|
35 READ_NAME_REGEX=${ pipes.quote( str( $read_name_regex ) ) or "''" }
|
5
|
36 OPTICAL_DUPLICATE_PIXEL_DISTANCE="${optical_duplicate_pixel_distance}"
|
|
37
|
|
38
|
|
39 BLOCK_SIZE=100000
|
|
40 VALIDATION_STRINGENCY="${validation_stringency}"
|
|
41 QUIET=true
|
|
42 VERBOSITY=ERROR
|
|
43
|
|
44 </command>
|
|
45 <inputs>
|
|
46 <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"/>
|
|
47 <param name="comment" type="text" size="50" label="Add this comment to BAM dataset"/>
|
|
48
|
|
49 <param name="minimum_distance" type="integer" value="-1" label="The minimum distance to buffer records to account for clipping on the 5' end of the records" help="MINIMUM_DISTANCE; Set this number to -1 to use twice the first read's read length (or 100, whichever is smaller); default=-1"/>
|
|
50 <param name="skip_pairs_with_no_mate_cigar" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Skip record pairs with no mate cigar and include them in the output" help="SKIP_PAIRS_WITH_NO_MATE_CIGAR; default=True"/>
|
|
51 <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"/>
|
|
52 <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"/>
|
|
53
|
|
54 <param name="duplicate_scoring_strategy" type="select" label="The scoring strategy for choosing the non-duplicate among candidates" help="DUPLICATE_SCORING_STRATEGY; default=TOTAL_MAPPED_REFERENCE_LENGTH">
|
|
55 <option value="TOTAL_MAPPED_REFERENCE_LENGTH" select="True">TOTAL_MAPPED_REFERENCE_LENGTH</option>
|
|
56 <option value="SUM_OF_BASE_QUALITIES">SUM_OF_BASE_QUALITIES</option>
|
|
57 </param>
|
|
58
|
|
59
|
|
60 <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]+).*.">
|
|
61 <sanitizer>
|
|
62 <valid initial="string.printable">
|
|
63 </valid>
|
|
64 </sanitizer>
|
|
65 </param>
|
|
66 <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"/>
|
|
67
|
|
68 <expand macro="VS" />
|
|
69
|
|
70 </inputs>
|
|
71
|
|
72 <outputs>
|
|
73 <data format="txt" name="metrics_file" label="${tool.name} on ${on_string}: MarkDuplicate metrics"/>
|
|
74 <data format="bam" name="outFile" label="${tool.name} on ${on_string}: MarkDuplicates BAM output"/>
|
|
75 </outputs>
|
|
76
|
|
77 <tests>
|
|
78 <test>
|
|
79 <param name="inputFile" value="picard_MarkDuplicatesWithMateCigar.bam" ftype="bam"/>
|
|
80 <param name="minimum_distance" value="-1"/>
|
|
81 <param name="skip_pairs_with_no_mate_cigar" value="True"/>
|
|
82 <param name="comment" value="test-run"/>
|
|
83 <param name="assume_sorted" value="True"/>
|
|
84 <param name="remove_duplicates" value="False"/>
|
|
85 <param name="read_name_regex" value="[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*."/>
|
|
86 <param name="optical_duplicate_pixel_distance" value="100"/>
|
|
87 <param name="duplicate_scoring_strategy" value="TOTAL_MAPPED_REFERENCE_LENGTH"/>
|
|
88 <param name="validation_stringency" value="LENIENT"/>
|
|
89 <output name="outFile" file="picard_MarkDuplicatesWithMateCigar_test1.bam" ftype="bam" lines_diff="4"/>
|
|
90 </test>
|
|
91 </tests>
|
|
92
|
|
93 <stdio>
|
|
94 <exit_code range="1:" level="fatal"/>
|
|
95 </stdio>
|
|
96
|
|
97 <help>
|
|
98
|
|
99 **Purpose**
|
|
100
|
|
101 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.
|
|
102
|
|
103 ------
|
|
104
|
|
105 .. class:: warningmark
|
|
106
|
|
107 On the difference between **MarkDuplicates** and **picard_MarkDuplicatesWithMateCigar**
|
|
108
|
|
109 From Samtools Announce MailingList_:
|
|
110
|
|
111 This tool can replace MarkDuplicates if the input SAM/BAM has Mate CIGAR (MC) optional tags pre-computed
|
|
112 (see the tools RevertOriginalBaseQualitiesAndAddMateCigar and FixMateInformation). This allows the new tool
|
|
113 to perform a streaming duplicate marking routine (i.e. a single-pass). This tool cannot be used with
|
|
114 alignments that have large gaps or reference skips, which happens frequently in RNA-seq data.
|
|
115
|
|
116 .. _MailingList: http://sourceforge.net/p/samtools/mailman/message/32910359/
|
|
117
|
|
118 @dataset_collections@
|
|
119
|
|
120 @description@
|
|
121
|
|
122 MINIMUM_DISTANCE=Integer The minimum distance to buffer records to account for clipping on the 5' end of the
|
|
123 records.Set this number to -1 to use twice the first read's read length (or 100,
|
|
124 whichever is smaller). Default value: -1. This option can be set to 'null' to clear the
|
|
125 default value.
|
|
126
|
|
127 SKIP_PAIRS_WITH_NO_MATE_CIGAR=Boolean
|
|
128 Skip record pairs with no mate cigar and include them in the output. Default value:
|
|
129 true. This option can be set to 'null' to clear the default value. Possible values:
|
|
130 {true, false}
|
|
131
|
|
132 COMMENT=String
|
|
133 CO=String Comment(s) to include in the output file's header. This option may be specified 0 or
|
|
134 more times.
|
|
135
|
|
136 REMOVE_DUPLICATES=Boolean If true do not write duplicates to the output file instead of writing them with
|
|
137 appropriate flags set. Default value: false.
|
|
138
|
|
139 READ_NAME_REGEX=String Regular expression that can be used to parse read names in the incoming SAM file. Read
|
|
140 names are parsed to extract three variables: tile/region, x coordinate and y coordinate.
|
|
141 These values are used to estimate the rate of optical duplication in order to give a more
|
|
142 accurate estimated library size. Set this option to null to disable optical duplicate
|
|
143 detection. The regular expression should contain three capture groups for the three
|
|
144 variables, in order. It must match the entire read name. Note that if the default regex
|
|
145 is specified, a regex match is not actually done, but instead the read name is split on
|
|
146 colon character. For 5 element names, the 3rd, 4th and 5th elements are assumed to be
|
|
147 tile, x and y values. For 7 element names (CASAVA 1.8), the 5th, 6th, and 7th elements
|
|
148 are assumed to be tile, x and y values. Default value:
|
|
149 [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.
|
|
150
|
|
151 DUPLICATE_SCORING_STRATEGY=ScoringStrategy
|
|
152 DS=ScoringStrategy The scoring strategy for choosing the non-duplicate among candidates. Default value:
|
|
153 TOTAL_MAPPED_REFERENCE_LENGTH. Possible values: {SUM_OF_BASE_QUALITIES, TOTAL_MAPPED_REFERENCE_LENGTH}
|
|
154
|
|
155 OPTICAL_DUPLICATE_PIXEL_DISTANCE=Integer
|
|
156 The maximum offset between two duplicte clusters in order to consider them optical
|
|
157 duplicates. This should usually be set to some fairly small number (e.g. 5-10 pixels)
|
|
158 unless using later versions of the Illumina pipeline that multiply pixel values by 10, in
|
|
159 which case 50-100 is more normal. Default value: 100.
|
|
160
|
|
161 @more_info@
|
|
162
|
|
163 </help>
|
|
164 </tool>
|
|
165
|
|
166
|