5
|
1 <tool name="EstimateLibraryComplexity" id="picard_EstimateLibraryComplexity" version="1.126.0">
|
|
2 <description>assess sequence library complexity from read sequences</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 EstimateLibraryComplexity
|
|
16
|
|
17 INPUT="${inputFile}"
|
|
18 OUTPUT="${outFile}"
|
|
19
|
|
20 MIN_IDENTICAL_BASES="${min_identical_bases}"
|
|
21 MAX_DIFF_RATE="${max_diff_rate}"
|
|
22 MIN_MEAN_QUALITY="${min_mean_quality}"
|
|
23 MAX_GROUP_RATIO="${max_group_ratio}"
|
6
|
24 #import pipes
|
|
25 READ_NAME_REGEX=${ pipes.quote( str( $read_name_regex ) ) or "''" }
|
5
|
26 OPTICAL_DUPLICATE_PIXEL_DISTANCE="${optical_duplicate_pixel_distance}"
|
|
27
|
|
28 VALIDATION_STRINGENCY="${validation_stringency}"
|
|
29 QUIET=true
|
|
30 VERBOSITY=ERROR
|
|
31
|
|
32 </command>
|
|
33 <inputs>
|
|
34 <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" />
|
|
35 <param name="min_identical_bases" type="integer" value="5" label="The minimum number of bases at the starts of reads that must be identical for reads to be grouped together for duplicate detection" help="MIN_IDENTICAL_BASES; In effect total_reads / 4^max_id_bases reads will be compared at a time, so lower numbers will produce more accurate results but consume exponentially more memory and CPU; default=5"/>
|
|
36 <param name="max_diff_rate" type="float" value="0.03" label="The maximum rate of differences between two reads to call them identical" help="MAX_DIFF_RATE; default=0.03"/>
|
|
37 <param name="min_mean_quality" type="integer" min="0" max="93" value="20" label="The minimum mean quality of the bases in a read pair for the read to be analyzed" help="MIN_MEAN_QUALITY; Reads with lower average quality are filtered out and not considered in any calculations; default=20"/>
|
|
38 <param name="max_group_ratio" type="integer" value="500" label="Do not process self-similar groups that are this many times over the mean expected group size" help="MAX_GROUP_RATIO; I.e. if the input contains 10m read pairs and MIN_IDENTICAL_BASES is set to 5, then the mean expected group size would be approximately 10 reads; default-500"/>
|
|
39
|
|
40 <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]+).*.">
|
|
41 <sanitizer>
|
|
42 <valid initial="string.printable">
|
|
43 </valid>
|
|
44 </sanitizer>
|
|
45 </param>
|
|
46 <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"/>
|
|
47
|
|
48 <expand macro="VS" />
|
|
49
|
|
50 </inputs>
|
|
51
|
|
52 <outputs>
|
|
53 <data format="tabular" name="outFile" label="${tool.name} on ${on_string}: Library complexity report"/>
|
|
54 </outputs>
|
|
55
|
|
56 <tests>
|
|
57 <test>
|
|
58 <param name="inputFile" value="picard_EstimateLibraryComplexity.bam" ftype="bam"/>
|
|
59 <param name="min_identical_bases" value="5"/>
|
|
60 <param name="max_diff_rate" value="0.03"/>
|
|
61 <param name="min_mean_quality" value="20"/>
|
|
62 <param name="read_name_regex" value="[a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*."/>
|
|
63 <param name="optical_duplicate_pixel_distance" value="100"/>
|
|
64 <param name="max_group_ratio" value="500"/>
|
|
65 <param name="validation_stringency" value="LENIENT"/>
|
|
66 <output name="outFile" file="picard_EstimateLibraryComplexity_test1.tab" ftype="tabular" lines_diff="4"/>
|
|
67 </test>
|
|
68 </tests>
|
|
69
|
|
70 <stdio>
|
|
71 <exit_code range="1:" level="fatal"/>
|
|
72 </stdio>
|
|
73
|
|
74 <help>
|
|
75
|
|
76 **Purpose**
|
|
77
|
|
78 Attempts to estimate library complexity from sequence of read pairs alone. Does so by sorting all reads by the first N bases (5 by default)
|
|
79 of each read and then comparing reads with the first N bases identical to each other for duplicates. Reads are considered to be duplicates
|
|
80 if they match each other with no gaps and an overall mismatch rate less than or equal to MAX_DIFF_RATE (0.03 by default).
|
|
81
|
|
82 Reads of poor quality are filtered out so as to provide a more accurate estimate. The filtering removes reads with any no-calls in the first
|
|
83 N bases or with a mean base quality lower than MIN_MEAN_QUALITY across either the first or second read.
|
|
84
|
|
85 Unpaired reads are ignored in this computation.
|
|
86 The algorithm attempts to detect optical duplicates separately from PCR duplicates and excludes these in the calculation of library size.
|
|
87
|
|
88 Also, since there is no alignment to screen out technical reads one further filter is applied on the data. After examining all reads a Histogram
|
|
89 is built of [#reads in duplicate set -> #of duplicate sets]; all bins that contain exactly one duplicate set are then removed from the Histogram
|
|
90 as outliers before library size is estimated.
|
|
91
|
|
92 @dataset_collections@
|
|
93
|
|
94 @description@
|
|
95
|
|
96 MIN_IDENTICAL_BASES=Integer The minimum number of bases at the starts of reads that must be identical for reads to be
|
|
97 grouped together for duplicate detection. In effect total_reads / 4^max_id_bases reads
|
|
98 will be compared at a time, so lower numbers will produce more accurate results but
|
|
99 consume exponentially more memory and CPU. Default value: 5.
|
|
100
|
|
101 MAX_DIFF_RATE=Double The maximum rate of differences between two reads to call them identical. Default value:
|
|
102 0.03.
|
|
103
|
|
104 MIN_MEAN_QUALITY=Integer The minimum mean quality of the bases in a read pair for the read to be analyzed. Reads
|
|
105 with lower average quality are filtered out and not considered in any calculations.
|
|
106 Default value: 20.
|
|
107
|
|
108 MAX_GROUP_RATIO=Integer Do not process self-similar groups that are this many times over the mean expected group
|
|
109 size. I.e. if the input contains 10m read pairs and MIN_IDENTICAL_BASES is set to 5, then
|
|
110 the mean expected group size would be approximately 10 reads. Default value: 500.
|
|
111
|
|
112 READ_NAME_REGEX=String Regular expression that can be used to parse read names in the incoming SAM file. Read
|
|
113 names are parsed to extract three variables: tile/region, x coordinate and y coordinate.
|
|
114 These values are used to estimate the rate of optical duplication in order to give a more
|
|
115 accurate estimated library size. Set this option to null to disable optical duplicate
|
|
116 detection. The regular expression should contain three capture groups for the three
|
|
117 variables, in order. It must match the entire read name. Note that if the default regex
|
|
118 is specified, a regex match is not actually done, but instead the read name is split on
|
|
119 colon character. For 5 element names, the 3rd, 4th and 5th elements are assumed to be
|
|
120 tile, x and y values. For 7 element names (CASAVA 1.8), the 5th, 6th, and 7th elements
|
|
121 are assumed to be tile, x and y values. Default value:
|
|
122 [a-zA-Z0-9]+:[0-9]:([0-9]+):([0-9]+):([0-9]+).*.
|
|
123
|
|
124 OPTICAL_DUPLICATE_PIXEL_DISTANCE=Integer
|
|
125 The maximum offset between two duplicte clusters in order to consider them optical
|
|
126 duplicates. This should usually be set to some fairly small number (e.g. 5-10 pixels)
|
|
127 unless using later versions of the Illumina pipeline that multiply pixel values by 10, in
|
|
128 which case 50-100 is more normal. Default value: 100.
|
|
129
|
|
130
|
|
131 @more_info@
|
|
132
|
|
133 </help>
|
|
134 </tool>
|
|
135
|
|
136
|