0
|
1 <tool name="Collect Alignment Summary Metrics" id="picard_CASM" version="1.135">
|
|
2 <description>writes a file containing summary alignment metrics</description>
|
|
3 <macros>
|
|
4 <import>picard_macros.xml</import>
|
|
5 </macros>
|
|
6 <expand macro="requirements" />
|
|
7 <command>
|
|
8 @java_options@
|
|
9 ##set up input files
|
|
10
|
|
11 #set $reference_fasta_filename = "localref.fa"
|
|
12
|
|
13 #if str( $reference_source.reference_source_selector ) == "history":
|
|
14 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &&
|
|
15 #else:
|
|
16 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
|
|
17 #end if
|
|
18
|
|
19 java -jar \$JAVA_JAR_PATH/picard.jar
|
|
20 CollectAlignmentSummaryMetrics
|
|
21 INPUT="${inputFile}"
|
|
22 OUTPUT="${outFile}"
|
|
23 MAX_INSERT_SIZE=${maxinsert}
|
|
24 #for $sequence in $adapters:
|
|
25 ADAPTER_SEQUENCE="${sequence.adapter}"
|
|
26 #end for
|
|
27 METRIC_ACCUMULATION_LEVEL="${metric_accumulation_level}"
|
|
28 IS_BISULFITE_SEQUENCED="${bisulphite}"
|
|
29
|
|
30 REFERENCE_SEQUENCE="${reference_fasta_filename}"
|
|
31
|
|
32 ASSUME_SORTED="${assume_sorted}"
|
|
33
|
|
34 VALIDATION_STRINGENCY="${validation_stringency}"
|
|
35 QUIET=true
|
|
36 VERBOSITY=ERROR
|
|
37
|
|
38 </command>
|
|
39 <inputs>
|
|
40 <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."/>
|
|
41 <conditional name="reference_source">
|
|
42 <param name="reference_source_selector" type="select" label="Load reference genome from">
|
|
43 <option value="cached">Local cache</option>
|
|
44 <option value="history">History</option>
|
|
45 </param>
|
|
46 <when value="cached">
|
|
47 <param name="ref_file" type="select" label="Using reference genome" help="REFERENCE_SEQUENCE">
|
|
48 <options from_data_table="all_fasta">
|
|
49 </options>
|
|
50 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
|
|
51 </param>
|
|
52 </when>
|
|
53 <when value="history">
|
|
54 <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="REFERENCE_SEQUENCE; You can upload a FASTA sequence to the history and use it as reference" />
|
|
55 </when>
|
|
56 </conditional>
|
|
57 <param name="metric_accumulation_level" type="select" label="The level(s) at which to accumulate metrics" multiple="true" help="METRIC_ACCUMULATION_LEVEL">
|
|
58 <option value="ALL_READS" selected="True">All reads</option>
|
|
59 <option value="SAMPLE">Sample</option>
|
|
60 <option value="LIBRARY">Library</option>
|
|
61 <option value="READ_GROUP">Read group</option>
|
|
62 </param>
|
|
63 <param name="assume_sorted" type="boolean" label="Assume the input file is already sorted" checked="true" truevalue="true" falsevalue="false" help="ASSUME_SORTED"/>
|
|
64 <param name="bisulphite" type="boolean" label="Input file contains Bisulphite sequenced reads" checked="false" falsevalue="false" truevalue="true" help="IS_BISULFITE_SEQUENCED"/>
|
|
65 <repeat name="adapters" title="Adapter" min="0" help="You can provide multiple adaptor sequences">
|
|
66 <param name="adapter" type="text" size="50" label="Use this adaptor sequence" help="ADAPTER_SEQUENCE"/>
|
|
67 </repeat>
|
|
68 <param name="maxinsert" value="100000" type="integer" label="Larger paired end reads and inter-chromosomal pairs considered chimeric" size="20" help="MAX_INSERT_SIZE"/>
|
|
69
|
|
70 <expand macro="VS" />
|
|
71
|
|
72 </inputs>
|
|
73
|
|
74 <outputs>
|
|
75 <data format="tabular" name="outFile" label="${tool.name} on ${on_string}: Summary stats"/>
|
|
76 </outputs>
|
|
77
|
|
78 <stdio>
|
|
79 <exit_code range="1:" level="fatal"/>
|
|
80 </stdio>
|
|
81
|
|
82
|
|
83 <tests>
|
|
84 <test>
|
|
85 <param name="bisulphite" value="false" />
|
|
86 <param name="sorted" value="true" />
|
|
87 <param name="adaptors" value="" />
|
|
88 <param name="maxinsert" value="100000" />
|
|
89 <param name="reference_source_selector" value="history" />
|
|
90 <param name="ref_file" value="picard_CASM_ref.fa" />
|
|
91 <param name="inputFile" value="picard_CASM.bam" ftype="bam" />
|
|
92 <output name="outFile" file="picard_CASM_test1.tab" ftype="tabular" lines_diff="4"/>
|
|
93 </test>
|
|
94 </tests>
|
|
95
|
|
96 <help>
|
|
97
|
|
98 .. class:: infomark
|
|
99
|
|
100 **Purpose**
|
|
101
|
|
102 Reads a SAM or BAM file and writes a file containing summary alignment metrics.
|
|
103
|
|
104 @dataset_collections@
|
|
105
|
|
106 @description@
|
|
107
|
|
108 MAX_INSERT_SIZE=Integer Paired end reads above this insert size will be considered chimeric along with
|
|
109 inter-chromosomal pairs. Default value: 100000.
|
|
110
|
|
111 ADAPTER_SEQUENCE=String List of adapter sequences to use when processing the alignment metrics This option may
|
|
112 be specified 0 or more times.
|
|
113
|
|
114 METRIC_ACCUMULATION_LEVEL=MetricAccumulationLevel
|
|
115 LEVEL=MetricAccumulationLevel The level(s) at which to accumulate metrics. Possible values: {ALL_READS, SAMPLE,
|
|
116 LIBRARY, READ_GROUP} This option may be specified 0 or more times.
|
|
117
|
|
118 IS_BISULFITE_SEQUENCED=Boolean
|
|
119 BS=Boolean Whether the SAM or BAM file consists of bisulfite sequenced reads.
|
|
120
|
|
121
|
|
122 REFERENCE_SEQUENCE=File
|
|
123 R=File Reference sequence fasta Default value: null.
|
|
124
|
|
125 ASSUME_SORTED=Boolean
|
|
126 AS=Boolean If true (default), then the sort order in the header file will be ignored.
|
|
127
|
|
128 @more_info@
|
|
129
|
|
130 </help>
|
|
131 </tool>
|
|
132
|
|
133
|