comparison qualimap_multi_bamqc.xml @ 0:16beb83e370c draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qualimap commit b4d43001cc0caa14d760c347fa1c416929f769b2"
author iuc
date Thu, 10 Oct 2019 17:40:15 -0400
parents
children 17b35d23731f
comparison
equal deleted inserted replaced
-1:000000000000 0:16beb83e370c
1 <tool id="qualimap_multi_bamqc" name="QualiMap Multi-Sample BamQC" version="@VERSION@">
2 <macros>
3 <import>qualimap_macros.xml</import>
4 <xml name="test_collection">
5 <collection type="list">
6 <element name="genome_results" value="genome_results_inside_features.txt" />
7 <element name="coverage_across_reference" value="coverage_across_reference.txt" />
8 <element name="coverage_histogram" value="coverage_histogram.txt" />
9 <element name="genome_fraction_coverage" value="genome_fraction_coverage.txt" />
10 <element name="duplication_rate_histogram" value="duplication_rate_histogram.txt" />
11 <element name="mapped_reads_clipping_profile" value="mapped_reads_clipping_profile.txt" />
12 <element name="mapped_reads_gc-content_distribution" value="mapped_reads_gc-content_distribution.txt" />
13 <element name="mapped_reads_nucleotide_content" value="mapped_reads_nucleotide_content.txt" />
14 <element name="mapping_quality_across_reference" value="mapping_quality_across_reference.txt" />
15 <element name="mapping_quality_histogram" value="mapping_quality_histogram.txt" />
16 </collection>
17 </xml>
18 </macros>
19 <expand macro="requirements" />
20 <expand macro="version_command" />
21 <command detect_errors="exit_code"><![CDATA[
22 #if str($input.mode) == 'grouped':
23 #set $n = 0
24 #for group in $input.groups:
25 #set $n = $n + 1
26 #for $n, $data in enumerate($group.bam_qc_data, $n):
27 #set $coll = $data.bam_qc_input
28 #set $sample_name = str($coll.name).replace(' ', '_')
29 printf '%s\tbam_qc_data%d\t%s\n' '${sample_name}' ${n} '${group.name}' >> data_spec.txt &&
30 mkdir -p bam_qc_data$n/raw_data_qualimapReport &&
31 #for $dataset in $coll:
32 #if str($dataset.element_identifier) == 'genome_results':
33 ln -s '$dataset' 'bam_qc_data$n/${dataset.element_identifier}.txt' &&
34 #else:
35 ln -s '$dataset' 'bam_qc_data$n/raw_data_qualimapReport/${dataset.element_identifier}.txt' &&
36 #end if
37 #end for
38 #end for
39 #end for
40 #if all(len($group.bam_qc_data) == 1 for group in $input.groups):
41 ## Warn about an inconsistency in the behavior of the current
42 ## version of Qualimap.
43 ## When each group consists of exactly one BAM QC input,
44 ## Qualimap will ignore the group names and use the sample names
45 ## in the plot legends instead.
46 printf "Warning: Only a single sample was assigned to each sample group!\nQualimap will use sample names, not group names in plot legends.\nYou may want to report samples individually to be able to specify custom sample names.\n\n" &&
47 #end if
48 #else:
49 #for $n, $data in enumerate($input.bam_qc_data):
50 #set $coll = $data.bam_qc_input
51 #set $sample_name = (str($data.sample_name).strip() or str($coll.name)).replace(' ', '_')
52 printf '%s\tbam_qc_data%d\t%d\n' '${sample_name}' '${n}' '${n}' >> data_spec.txt &&
53 mkdir -p bam_qc_data$n/raw_data_qualimapReport &&
54 #for $dataset in $coll:
55 #if str($dataset.element_identifier) == 'genome_results':
56 ln -s '$dataset' 'bam_qc_data$n/${dataset.element_identifier}.txt' &&
57 #else:
58 ln -s '$dataset' 'bam_qc_data$n/raw_data_qualimapReport/${dataset.element_identifier}.txt' &&
59 #end if
60 #end for
61 #end for
62 #end if
63
64 @SET_JAVA_OPTS@ &&
65 qualimap multi-bamqc
66 --data data_spec.txt
67 -outdir results -outformat html &&
68
69 #set $report_name = 'multisampleBamQcReport'
70 #set $summary_report = None
71 @MASSAGE_OUTPUT@
72 ]]></command>
73
74 <inputs>
75 <conditional name="input">
76 <param name="mode" type="select"
77 label="Report samples"
78 help="">
79 <option value="individual">Individually</option>
80 <option value="grouped">In groups</option>
81 </param>
82 <when value="individual">
83 <repeat name="bam_qc_data" default="2" min="2"
84 title="BAM QC data to combine">
85 <param name="bam_qc_input" type="data_collection" collection_type="list" format="txt"
86 label="Single-sample BAM QC data"
87 help="" />
88 <param name="sample_name" type="text"
89 label="Name to use for this dataset"
90 help="This is the name that will be used for this dataset throughout the Qualimap report. Default: Name of the raw data collection in the history" />
91 </repeat>
92 </when>
93 <when value="grouped">
94 <repeat name="groups" default="1" min="1" title="Groups">
95 <param name="name" type="text" label="Name of the group">
96 <validator type="expression" message="A name is required for every group">value.strip()</validator>
97 </param>
98 <repeat name="bam_qc_data" default="1" min="1"
99 title="Data associated with this group">
100 <param name="bam_qc_input" type="data_collection" collection_type="list" format="txt" multiple="true"
101 label="Single-sample BAM QC data"
102 help="" />
103 </repeat>
104 </repeat>
105 </when>
106 </conditional>
107 </inputs>
108
109 <outputs>
110 <data name="output_html" format="html" />
111 </outputs>
112 <tests>
113 <test>
114 <conditional name="input">
115 <param name="mode" value="individual" />
116 <repeat name="bam_qc_data">
117 <param name="bam_qc_input">
118 <expand macro="test_collection" />
119 </param>
120 </repeat>
121 <repeat name="bam_qc_data">
122 <param name="bam_qc_input">
123 <expand macro="test_collection" />
124 </param>
125 </repeat>
126 </conditional>
127 <output name="output_html" ftype="html">
128 <assert_contents>
129 <has_text text="Qualimap report: Multi-sample BAM QC" />
130 </assert_contents>
131 </output>
132 </test>
133 </tests>
134 <help><![CDATA[
135 **What it does**
136
137 This tool lets you combine the summary statistics, obtained through multiple
138 runs of the *Qualimap BamQC* tool, of several aligned reads datasets into a
139 single report.
140
141 This makes it easy to visualize the degree of similarities between the
142 different inputs and to spot differences between them.
143
144 Input
145 =====
146
147 Several *Raw Data* collections obtained from previous runs of *Qualimap BamQC*.
148
149 Options
150 -------
151
152 *Report samples* -> ``Individually`` / ``In groups``
153
154 You may decide to group the input data for reporting, in which case you will
155 need to provide a name for each group that will be used in the plot legends.
156
157 Output
158 ======
159
160 The single HTML report generated by this tool contains the following:
161
162 *Input data and parameters*
163
164 This section lists the names of the BamQC Raw Data collections that served as
165 input along with the names of the groups (if any) each input got assigned to.
166
167 *Summary*
168
169 The summary table contains comparison of selected critical alignment metrics for all samples. The metrics include mean and standard deviation of coverage, mean GC content, mean insert size and mean mapping qualities. If the sample groups are provided, they are also shown for each sample.
170
171 *PCA plot*
172
173 The alignment features presented in the Summary section undergo Principal Component Analysis. Afterwards the biplot presenting first and second principal component is constructed. It allows to detect if any samples group together and if there are any outliers among the analyzed samples.
174
175 *Other plots*
176
177 Here you will find plots of:
178
179 - Coverage Across Reference,
180 - Coverage Histogram,
181 - Genome Fraction Coverage,
182 - Duplication Rate Histogram,
183 - Mapped Reads GC Content,
184 - Mapped Reads GC Content Distribution,
185 - Mapped Reads Clipping Profile,
186 - Mapping Quality Across Reference,
187 - Mapping Quality Histogram
188
189 and, if applicable,
190
191 - Insert Size Across Reference,
192 - Insert Size Histogram
193
194 Essentially, these are overlays of the plots of the individual inputs (or of
195 the groups they have been assigned to) and that are explained in the help of
196 the *Qualimap BamQC* tool.
197 ]]></help>
198 <expand macro="citations"/>
199 </tool>