comparison control_freec.xml @ 0:e46944a59b31 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/freec commit bec4fb59dc4776d33c2ce8c0bd614c90e5d4ecb2"
author iuc
date Thu, 13 Aug 2020 09:50:35 -0400
parents
children 2c6349fb175c
comparison
equal deleted inserted replaced
-1:000000000000 0:e46944a59b31
1 <tool id="control_freec" name="Control-FREEC" version="@WRAPPER_VERSION@">
2 <description>detects copy-number changes and allelic imbalances</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <requirements>
7 <requirement type="package" version="5.0.1">gawk</requirement>
8 <requirement type="package" version="@TOOL_VERSION@">control-freec</requirement>
9 </requirements>
10 <command detect_errors="exit_code"><![CDATA[
11 #if str($reference_source.ref_selector) == 'history':
12 ln -s '$reference_source.ref' ./genome.fa &&
13 samtools faidx ./genome.fa 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for control-freec' >&2 &&
14 #else
15 ln -s '$reference_source.ref.fields.path' ./genome.fa &&
16 ln -s '${reference_source.ref.fields.path}.fai' ./genome.fa.fai &&
17 #end if
18
19 #if int($WGS_WES.advanced_settings.window_section.window) == 0
20 ln -s '$WGS_WES.input_capture_file' ./capture.bed &&
21 #end if
22
23 mkdir ./chromosomes &&
24 mkdir ./output &&
25
26 awk -F " " '/^>/ {close(F); F="chromosomes/"substr($1,2)".fa"} {print >> F}' ./genome.fa &&
27
28 ln -s '$WGS_WES.input_sample_file' ./sample.bam &&
29 #if $input_control_file
30 ln -s '$WGS_WES.input_control_file' ./control.bam &&
31 #end if
32
33 freec
34 -conf '$script_file'
35 -sample ./sample.bam
36 #if $WGS_WES.input_control_file
37 -control ./control.bam
38 #end if
39
40 #if $output_section.makeGraph
41 && R -f `which makeGraph.R` '$WGS_WES.advanced_settings.ploidy' 'output/sample.bam_ratio.txt'
42 #end if
43
44 #if $output_section.circos_data
45 && python '$__tool_directory__/ratio2circos.py'
46 -i ./output/sample.bam_ratio.BedGraph
47 -p '$WGS_WES.advanced_settings.ploidy'
48 -o sample.bam_ratio_log2_circos.txt
49 #end if
50 ]]></command>
51 <configfiles>
52 <configfile name="script_file"><![CDATA[
53 #import os
54 #set galaxy_slots = os.getenv("GALAXY_SLOTS", 4)
55 [general]
56 chrFiles = chromosomes
57 outputDir = output
58 chrLenFile = genome.fa.fai
59 maxThreads = $galaxy_slots
60
61 #if $WGS_WES.advanced_settings.degree == "34"
62 #set $degree_val = "3&4"
63 degree = $degree_val
64 #else
65 degree = $WGS_WES.advanced_settings.degree
66 #end if
67 forceGCcontentNormalization = $WGS_WES.advanced_settings.forceGCcontentNormalization
68 minCNAlength = $WGS_WES.advanced_settings.minCNAlength
69 minimalSubclonePresence = $WGS_WES.advanced_settings.minimalSubclonePresence
70 readCountThreshold = $WGS_WES.advanced_settings.readCountThreshold
71 window = $WGS_WES.advanced_settings.window_section.window
72 step = $WGS_WES.advanced_settings.window_section.step
73 coefficientOfVariation = $WGS_WES.advanced_settings.coefficientOfVariation
74 #if $output_section.circos_data
75 BedGraphOutput = TRUE
76 #else
77 BedGraphOutput = $output_section.BedGraphOutput
78 #end if
79 breakPointThreshold = $WGS_WES.advanced_settings.breakPointThreshold
80 breakPointType = $WGS_WES.advanced_settings.breakPointType
81 contaminationAdjustment = $WGS_WES.advanced_settings.contaminationAdjustment
82 contamination = $WGS_WES.advanced_settings.contamination
83 intercept = $WGS_WES.advanced_settings.intercept
84 minMappabilityPerWindow = $WGS_WES.advanced_settings.minMappabilityPerWindow
85 minExpectedGC = $WGS_WES.advanced_settings.minExpectedGC
86 maxExpectedGC = $WGS_WES.advanced_settings.maxExpectedGC
87 noisyData = $WGS_WES.advanced_settings.noisyData
88 ploidy = $WGS_WES.advanced_settings.ploidy
89 printNA = $WGS_WES.advanced_settings.printNA
90 sex = $WGS_WES.advanced_settings.sex
91 telocentromeric = $WGS_WES.advanced_settings.telocentromeric
92
93 [sample]
94 mateFile = sample.bam
95 inputFormat = BAM
96 mateOrientation = $WGS_WES.mateOrientation_selector
97
98 [control]
99 mateFile = control.bam
100 inputFormat = BAM
101 mateOrientation = $WGS_WES.mateOrientation_selector
102
103 #if int($WGS_WES.advanced_settings.window_section.window) == 0
104 [target]
105 captureRegions = capture.bed
106 #end if
107 ]]></configfile>
108 </configfiles>
109 <inputs>
110 <conditional name="WGS_WES">
111 <param name="WGS_WES_selector" type="select" label="Select the sequencing method of the input file(s)" help="">
112 <option value="WGS" selected="True">whole-genome sequencing (WGS)</option>
113 <option value="WES">whole-exome sequencing (WES)</option>
114 <option value="other">other method</option>
115 </param>
116 <when value="WGS">
117 <expand macro="def_input_files" />
118 <section name="advanced_settings" title="Advanced WGS settings" expanded="false">
119 <expand macro="WGS" />
120 <expand macro="shared" />
121 </section>
122 </when>
123 <when value="WES">
124 <expand macro="wes_input_files" />
125 <section name="advanced_settings" title="Advanced WES settings" expanded="false">
126 <expand macro="WES" />
127 <expand macro="shared" />
128 </section>
129 </when>
130 <when value="other">
131 <expand macro="wes_input_files" />
132 <section name="advanced_settings" title="Advanced settings" expanded="true">
133 <expand macro="other" />
134 <expand macro="shared" />
135 </section>
136 </when>
137 </conditional>
138 <expand macro="reference_interface" />
139 <expand macro="output_section" />
140 </inputs>
141 <outputs>
142 <data name="out_sample_raw" format="tabular" label="${tool.name} on ${on_string}: Raw copy number profiles (sample)" from_work_dir="output/sample.bam_sample.cpn" />
143 <data name="out_control_raw" format="tabular" label="${tool.name} on ${on_string}: Raw copy number profiles (control)" from_work_dir="output/control.bam_control.cpn" />
144 <data name="out_sample_coord" format="tabular" label="${tool.name} on ${on_string}: Coordinates of predicted CN alterations" from_work_dir="output/sample.bam_CNVs" />
145 <data name="out_sample_info" format="txt" label="${tool.name} on ${on_string}: Information about FREEC run" from_work_dir="output/sample.bam_info.txt" />
146 <data name="out_sample_ratio" format="tabular" label="${tool.name} on ${on_string}: Ratios and predicted CN alterations for each window" from_work_dir="output/sample.bam_ratio.txt" />
147 <data name="out_sample_subclones" format="txt" label="${tool.name} on ${on_string}: Subclones" from_work_dir="output/sample.bam_subclones.txt" >
148 <filter>int(WGS_WES['advanced_settings']['minimalSubclonePresence']) != 100</filter>
149 </data>
150 <data name="out_sample_bedgraph" format="bed" label="${tool.name} on ${on_string}: Ratios in BedGraph format" from_work_dir="output/sample.bam_ratio.BedGraph">
151 <filter>output_section['BedGraphOutput']</filter>
152 </data>
153 <data name="out_mg_png" format="png" label="${tool.name} on ${on_string}: Normalized CN profile" from_work_dir="output/sample.bam_ratio.txt.png">
154 <filter>output_section['makeGraph']</filter>
155 </data>
156 <data name="out_mg_log2_png" format="png" label="${tool.name} on ${on_string}: Normalized CN profile (log2)" from_work_dir="output/sample.bam_ratio.txt.log2.png">
157 <filter>output_section['makeGraph']</filter>
158 </data>
159 <data name="out_gc_profile" format="tabular" label="${tool.name} on ${on_string}: GC-content profile" from_work_dir="output/GC_profile.targetedRegions.cnp">
160 <filter>int(WGS_WES['advanced_settings']['window_section']['window']) == 0</filter>
161 </data>
162 <data name="out_ratio_log2_circos" format="tabular" label="${tool.name} on ${on_string}: Circos 2D-track data" from_work_dir="output/sample.bam_ratio_log2_circos.txt">
163 <filter>output_section['circos_data']</filter>
164 </data>
165 </outputs>
166 <tests>
167 <test expect_num_outputs="5">
168 <conditional name="reference_source">
169 <param name="ref_selector" value="history"/>
170 <param name="ref" ftype="fasta" value="genome.fasta" />
171 </conditional>
172 <param name="WGS_WES_selector" value="other" />
173 <param name="input_sample_file" ftype="bam" value="tumor.bam" />
174 <param name="input_control_file" ftype="bam" value="normal.bam" />
175 <param name="mateOrientation_selector" value="0" />
176 <param name="window" value="5000" />
177 <param name="step" value="1000" />
178 <output name="out_sample_raw" file="output/sample.bam_sample.cpn" />
179 <output name="out_control_raw" file="output/control.bam_control.cpn" />
180 <output name="out_sample_coord" file="output/sample.bam_CNVs" />
181 <output name="out_sample_info" file="output/sample.bam_info.txt" />
182 <output name="out_sample_ratio" file="output/sample.bam_ratio.txt" />
183 </test>
184 <test expect_num_outputs="5">
185 <conditional name="reference_source">
186 <param name="ref_selector" value="cached"/>
187 <param name="ref" value="test_buildid"/>
188 </conditional>
189 <param name="WGS_WES_selector" value="other" />
190 <param name="input_sample_file" ftype="bam" value="tumor.bam" />
191 <param name="input_control_file" ftype="bam" value="normal.bam" />
192 <param name="mateOrientation_selector" value="0" />
193 <param name="window" value="5000" />
194 <param name="step" value="1000" />
195 <output name="out_sample_raw" file="output/sample.bam_sample.cpn" />
196 <output name="out_control_raw" file="output/control.bam_control.cpn" />
197 <output name="out_sample_coord" file="output/sample.bam_CNVs" />
198 <output name="out_sample_info" file="output/sample.bam_info.txt" />
199 <output name="out_sample_ratio" file="output/sample.bam_ratio.txt" />
200 </test>
201 <test expect_num_outputs="5">
202 <conditional name="reference_source">
203 <param name="ref_selector" value="history"/>
204 <param name="ref" ftype="fasta" value="genome.fasta" />
205 </conditional>
206 <param name="WGS_WES_selector" value="WGS" />
207 <param name="input_sample_file" ftype="bam" value="tumor.bam" />
208 <param name="input_control_file" ftype="bam" value="normal.bam" />
209 <param name="mateOrientation_selector" value="0" />
210 <param name="minimalSubclonePresence" value="100" />
211 <param name="window" value="5000" />
212 <param name="step" value="1000" />
213 <output name="out_sample_raw" file="output/sample.bam_sample.cpn" />
214 <output name="out_control_raw" file="output/control.bam_control.cpn" />
215 <output name="out_sample_coord" file="output/sample.bam_CNVs" />
216 <output name="out_sample_info" file="output/sample.bam_info.txt" />
217 <output name="out_sample_ratio" file="output/sample.bam_ratio.txt" />
218 </test>
219 <test expect_num_outputs="6">
220 <conditional name="reference_source">
221 <param name="ref_selector" value="history"/>
222 <param name="ref" ftype="fasta" value="genome.fasta" />
223 </conditional>
224 <param name="WGS_WES_selector" value="WES" />
225 <param name="input_sample_file" ftype="bam" value="tumor.bam" />
226 <param name="input_control_file" ftype="bam" value="normal.bam" />
227 <param name="input_capture_file" ftype="bed" value="capture.bed" />
228 <param name="mateOrientation_selector" value="0" />
229 <param name="minimalSubclonePresence" value="100" />
230 <param name="forceGCcontentNormalization" value="2" />
231 <param name="window" value="0" />
232 <param name="step" value="0" />
233 <output name="out_sample_raw">
234 <assert_contents>
235 <has_text_matching expression="M\t\d+\t\d+\t\d+\tM:\d+-\d+"/>
236 </assert_contents>
237 </output>
238 <output name="out_control_raw">
239 <assert_contents>
240 <has_text_matching expression="M\t\d+\t\d+\t\d+\tM:\d+-\d+"/>
241 </assert_contents>
242 </output>
243 <output name="out_sample_coord" file="output/sample.bam_CNVs" />
244 <output name="out_sample_info">
245 <assert_contents>
246 <has_text text="Program_Version"/>
247 </assert_contents>
248 </output>
249 <output name="out_sample_ratio">
250 <assert_contents>
251 <has_text text="Chromosome"/>
252 </assert_contents>
253 </output>
254 <output name="out_gc_profile" file="output/GC_profile.targetedRegions.cnp" />
255 </test>
256 </tests>
257 <help><![CDATA[
258 Control-FREEC
259 =============
260
261 Control-FREEC is a tool for detection of copy-number changes and allelic imbalances (including loss of heterozygosity/LOH) using deep-sequencing data originally developed by the Bioinformatics Laboratory of Institut Curie (Paris). Nowdays, Control-FREEC is supported by the team of Valentina Boeva at Institut Cochin, Inserm (Paris).
262
263 Control-FREEC automatically computes, normalizes, segments copy number and beta allele frequency (BAF) profiles, then calls copy number alterations and LOH. The control (matched normal) sample is optional for whole genome sequencing data but mandatory for whole exome or targeted sequencing data. For whole genome sequencing data analysis, the program can also use mappability data (files created by GEM).
264
265 **Input for CNA detection:** Aligned single-end, paired-end or mate-pair data in BAM format.
266
267 **Output:** Regions of gain, loss and LOH and normalized copy number.
268
269 For more information (f.e. to run Control-FREEC on non-human data) see the Control-FREEC documentation_.
270
271 .. _documentation: http://boevalab.inf.ethz.ch/FREEC/index.html#documentation
272
273 ]]></help>
274 <citations>
275 <citation type="doi">10.1093/bioinformatics/btr670</citation>
276 <citation type="doi">10.1093/bioinformatics/btq635</citation>
277 </citations>
278 </tool>