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