5
|
1 <tool name="CollectInsertSizeMetrics" id="picard_CollectInsertSizeMetrics" version="1.126.0">
|
|
2 <description>plots distribution of insert sizes</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 ##set up input files
|
|
14
|
|
15 #set $reference_fasta_filename = "localref.fa"
|
|
16
|
|
17 #if str( $reference_source.reference_source_selector ) == "history":
|
|
18 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &&
|
|
19 #else:
|
|
20 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
|
|
21 #end if
|
|
22
|
|
23 java -jar \$JAVA_JAR_PATH/picard.jar
|
|
24 CollectInsertSizeMetrics
|
|
25 INPUT="${inputFile}"
|
|
26 OUTPUT="${outFile}"
|
|
27 HISTOGRAM_FILE="${histFile}"
|
|
28 DEVIATIONS="${deviations}"
|
|
29
|
|
30 #if str( $hist_width ):
|
|
31 HISTOGRAM_WIDTH="${hist_width}"
|
|
32 #end if
|
|
33
|
|
34 MINIMUM_PCT="${min_pct}"
|
|
35 REFERENCE_SEQUENCE="${reference_fasta_filename}"
|
|
36 ASSUME_SORTED="${assume_sorted}"
|
|
37 METRIC_ACCUMULATION_LEVEL="${metric_accumulation_level}"
|
|
38
|
|
39 VALIDATION_STRINGENCY="${validation_stringency}"
|
|
40 QUIET=true
|
|
41 VERBOSITY=ERROR
|
|
42
|
|
43 </command>
|
|
44 <inputs>
|
|
45 <param format="sam,bam" name="inputFile" type="data" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset."/>
|
|
46 <conditional name="reference_source">
|
|
47 <param name="reference_source_selector" type="select" label="Load reference genome from">
|
|
48 <option value="cached">Local cache</option>
|
|
49 <option value="history">History</option>
|
|
50 </param>
|
|
51 <when value="cached">
|
|
52 <param name="ref_file" type="select" label="Using reference genome" help="REFERENCE_SEQUENCE">
|
|
53 <options from_data_table="all_fasta">
|
|
54 </options>
|
|
55 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
|
|
56 </param>
|
|
57 </when>
|
|
58 <when value="history">
|
|
59 <param name="ref_file" type="data" format="fasta" label="Use the folloing dataset as the reference sequence" help="REFERENCE_SEQUENCE; You can upload a FASTA sequence to the history and use it as reference" />
|
|
60 </when>
|
|
61 </conditional>
|
|
62 <param name="deviations" type="float" value="10.0" label="Generate mean, sd and plots by trimming the data down to MEDIAN + DEVIATIONS*MEDIAN_ABSOLUTE_DEVIATION" help="DEVIATIONS; This option is offered because insert size data typically includes enough anomalous values from chimeras and other artifacts to make the mean and SD grossly misleading regarding the real distribution. default=10.0"/>
|
|
63 <param name="hist_width" type="integer" optional="True" label="Explicitly sets the Histogram width, overriding automatic truncation of Histogram tail" help="HISTOGRAM_WIDTH; optional"/>
|
|
64 <param name="min_pct" type="float" value="0.05" label="When generating the Histogram, discard any data categories (out of FR, TANDEM, RF) that have fewer than this percentage of overall reads" help="MINIMUM_PCT; (Range: 0 to 1). default=0.05. "/>
|
|
65 <param name="assume_sorted" type="boolean" label="Assume the input file is already sorted" checked="true" truevalue="true" falsevalue="false" help="ASSUME_SORTED"/>
|
|
66 <param name="metric_accumulation_level" type="select" label="The level(s) at which to accumulate metrics" multiple="true" help="METRIC_ACCUMULATION_LEVEL">
|
|
67 <option value="ALL_READS" selected="True">All reads</option>
|
|
68 <option value="SAMPLE">Sample</option>
|
|
69 <option value="LIBRARY">Library</option>
|
|
70 <option value="READ_GROUP">Read group</option>
|
|
71 </param>
|
|
72
|
|
73 <expand macro="VS" />
|
|
74
|
|
75 </inputs>
|
|
76
|
|
77 <outputs>
|
|
78 <data format="tabular" name="outFile"/>
|
|
79 <data format="pdf" name="histFile"/>
|
|
80 </outputs>
|
|
81
|
|
82 <tests>
|
|
83 <test>
|
|
84 <param name="metric_accumulation_level" value="ALL_READS"/>
|
|
85 <param name="deviations" value="10.0" />
|
|
86 <param name="hist_width" value="500" />
|
|
87 <param name="min_pct" value="0.05" />
|
|
88 <param name="assume_sorted" value="true" />
|
|
89 <param name="reference_source_selector" value="history" />
|
|
90 <param name="ref_file" value="picard_CollectInsertSizeMetrics_ref.fa" />
|
|
91 <param name="inputFile" value="picard_CollectInsertSizeMetrics.bam" ftype="bam" />
|
|
92 <output name="outFile" file="picard_CollectInsertSizeMetrics_test1.tab" ftype="tabular" lines_diff="4"/>
|
|
93 </test>
|
|
94 </tests>
|
|
95
|
|
96 <stdio>
|
|
97 <exit_code range="1:" level="fatal"/>
|
|
98 </stdio>
|
|
99
|
|
100 <help>
|
|
101
|
|
102 .. class:: infomark
|
|
103
|
|
104 **Purpose**
|
|
105
|
|
106 Reads a SAM or BAM dataset and writes a file containing metrics about the statistical distribution of insert size (excluding duplicates) and generates a Histogram plot.
|
|
107
|
|
108 @dataset_collections@
|
|
109
|
|
110 @description@
|
|
111
|
|
112
|
|
113 DEVIATIONS=Double Generate mean, sd and plots by trimming the data down to MEDIAN +
|
|
114 DEVIATIONS*MEDIAN_ABSOLUTE_DEVIATION. This is done because insert size data typically
|
|
115 includes enough anomalous values from chimeras and other artifacts to make the mean and
|
|
116 sd grossly misleading regarding the real distribution. Default value: 10.0.
|
|
117
|
|
118 HISTOGRAM_WIDTH=Integer
|
|
119 W=Integer Explicitly sets the Histogram width, overriding automatic truncation of Histogram tail.
|
|
120 Also, when calculating mean and standard deviation, only bins <= Histogram_WIDTH will be
|
|
121 included. Default value: not set.
|
|
122
|
|
123 MINIMUM_PCT=Float
|
|
124 M=Float When generating the Histogram, discard any data categories (out of FR, TANDEM, RF) that
|
|
125 have fewer than this percentage of overall reads. (Range: 0 to 1). Default value: 0.05.
|
|
126
|
|
127 METRIC_ACCUMULATION_LEVEL=MetricAccumulationLevel
|
|
128 LEVEL=MetricAccumulationLevel The level(s) at which to accumulate metrics. Possible values: {ALL_READS, SAMPLE,
|
|
129 LIBRARY, READ_GROUP} This option may be specified 0 or more times.
|
|
130
|
|
131 ASSUME_SORTED=Boolean
|
|
132 AS=Boolean If true (default), then the sort order in the header file will be ignored. Default
|
|
133 value: true. This option can be set to 'null' to clear the default value. Possible
|
|
134 values: {true, false}
|
|
135
|
|
136 @more_info@
|
|
137
|
|
138 </help>
|
|
139 </tool>
|
|
140
|
|
141
|