0
|
1 <tool name="Insertion size metrics" id="PicardInsertSize" version="0.3.0">
|
|
2 <description>for PAIRED data</description>
|
|
3 <requirements><requirement type="package">picard</requirement></requirements>
|
|
4 <command interpreter="python">
|
|
5 picard_wrapper.py -i "$input_file" -n "$out_prefix" --tmpdir "${__new_file_path__}" --taillimit "$tailLimit"
|
|
6 --histwidth "$histWidth" --minpct "$minPct"
|
|
7 -j "${GALAXY_DATA_INDEX_DIR}/shared/jars/CollectInsertSizeMetrics.jar" -d "$html_file.files_path" -t "$html_file"
|
|
8 </command>
|
|
9 <inputs>
|
|
10 <param format="bam,sam" name="input_file" type="data" label="SAM/BAM dataset to generate statistics for"
|
|
11 help="If empty, upload or import a SAM/BAM dataset."/>
|
|
12 <param name="out_prefix" value="Insertion size metrics" type="text"
|
|
13 label="Title for the output file" help="Use this remind you what the job was for" size="120" />
|
|
14 <param name="tailLimit" value="10000" type="integer"
|
|
15 label="Tail limit" size="5"
|
|
16 help="When calculating mean and stdev stop when the bins in the tail of the distribution contain fewer than mode/TAIL_LIMIT items" />
|
|
17 <param name="histWidth" value="0" type="integer"
|
|
18 label="Histogram width" size="5"
|
|
19 help="Explicitly sets the histogram width, overriding the TAIL_LIMIT option - leave 0 to ignore" />
|
|
20 <param name="minPct" value="0.01" type="float"
|
|
21 label="Minimum percentage" size="5"
|
|
22 help="Discard any data categories (out of FR, TANDEM, RF) that have fewer than this percentage of overall reads" />
|
|
23 </inputs>
|
|
24 <outputs>
|
|
25 <data format="html" name="html_file" label="InsertSize_${out_prefix}.html"/>
|
|
26 </outputs>
|
|
27 <tests>
|
|
28 <test>
|
|
29 <param name="input_file" value="picard_input_tiny.sam" />
|
|
30 <param name="out_prefix" value="Insertion size metrics" />
|
|
31 <param name="tailLimit" value="10000" />
|
|
32 <param name="histWidth" value="0" />
|
|
33 <param name="minPct" value="0.01" />
|
|
34 <output name="html_file" file="picard_output_insertsize_tinysam.html" ftype="html" compare="contains" lines_diff="40" />
|
|
35 </test>
|
|
36 </tests>
|
|
37 <help>
|
|
38
|
|
39
|
|
40 .. class:: infomark
|
|
41
|
|
42 **Purpose**
|
|
43
|
|
44 Reads a SAM or BAM file and describes the distribution
|
|
45 of insert size (excluding duplicates) with metrics and a histogram plot.
|
|
46
|
|
47 **Picard documentation**
|
|
48
|
|
49 This is a Galaxy wrapper for CollectInsertSizeMetrics, a part of the external package Picard-tools_.
|
|
50
|
|
51 .. _Picard-tools: http://www.google.com/search?q=picard+samtools
|
|
52
|
|
53 .. class:: warningmark
|
|
54
|
|
55 **Useful for paired data only**
|
|
56
|
|
57 This tool works for paired data only and can be expected to fail for single end data.
|
|
58
|
|
59 -----
|
|
60
|
|
61 .. class:: infomark
|
|
62
|
|
63 **Inputs, outputs, and parameters**
|
|
64
|
|
65 Picard documentation says (reformatted for Galaxy):
|
|
66
|
|
67 .. csv-table::
|
|
68 :header-rows: 1
|
|
69
|
|
70 Option,Description
|
|
71 "INPUT=File","SAM or BAM file Required."
|
|
72 "OUTPUT=File","File to write insert size metrics to Required."
|
|
73 "HISTOGRAM_FILE=File","File to write insert size histogram chart to Required."
|
|
74 "TAIL_LIMIT=Integer","When calculating mean and stdev stop when the bins in the tail of the distribution contain fewer than mode/TAIL_LIMIT items. This also limits how much data goes into each data category of the histogram."
|
|
75 "HISTOGRAM_WIDTH=Integer","Explicitly sets the histogram width, overriding the TAIL_LIMIT option. Also, when calculating mean and stdev, only bins LE HISTOGRAM_WIDTH will be included. "
|
|
76 "MINIMUM_PCT=Float","When generating the histogram, discard any data categories (out of FR, TANDEM, RF) that have fewer than this percentage of overall reads. (Range: 0 to 1) Default value: 0.01."
|
|
77 "STOP_AFTER=Integer","Stop after processing N reads, mainly for debugging. Default value: 0."
|
|
78 "CREATE_MD5_FILE=Boolean","Whether to create an MD5 digest for any BAM files created. Default value: false."
|
|
79
|
|
80 .. class:: warningmark
|
|
81
|
|
82 **Warning on SAM/BAM quality**
|
|
83
|
|
84 Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT**
|
|
85 flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
|
|
86 to be the only way to deal with SAM/BAM that cannot be parsed.
|
|
87
|
|
88 </help>
|
|
89 </tool>
|