comparison virheat.xml @ 0:d2a1ac520392 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/virheat commit ed302b5ddedadffc87798b7216f1a331accce96e
author iuc
date Wed, 15 May 2024 13:37:49 +0000
parents
children 30584e80d61e
comparison
equal deleted inserted replaced
-1:000000000000 0:d2a1ac520392
1 <tool id="virheat" name="VirHEAT: visualize allele frequencies"
2 version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"
3 profile="@PROFILE@">
4 <description>
5 from VCFs as a heatmap and map mutations to respective genes
6 </description>
7 <macros>
8 <import>macros.xml</import>
9 </macros>
10 <expand macro="biotools"/>
11 <expand macro="requirements"/>
12 <expand macro="version"/>
13 <command detect_errors="exit_code"><![CDATA[
14 #import re
15 #set $vcfs_dir = 'vcfs_dir/'
16 mkdir -p $vcfs_dir &&
17 mkdir -p ./output_dir &&
18 #set $outfile = 'tmp_output.' + str($advanced.output_type)
19 #for $input_file in $sinputs
20 #set $file_path = $vcfs_dir + re.sub('[^\s\w\-\\.]', '_', str($input_file.element_identifier))
21 ln -s '$input_file' '$file_path' &&
22 #end for
23 #set $output_dir = 'output_dir/'
24 virheat
25 '$vcfs_dir'
26 '$output_dir'
27 --name '$outfile'
28 #if $genome_data.choice == 'length'
29 -l $genome_data.genome_length
30 #else
31 -g '$genome_data.gff3_file'
32 #end if
33 #if $varfreq
34 -t $varfreq
35 #end if
36 $delete
37 -n $delete_n
38 #if $zoom.choice == 'yes'
39 -z $zoom.zoom_start $zoom.zoom_stop
40 #end if
41 $sort
42 --min-cov $min_cov
43 ]]></command>
44 <inputs>
45 <param name="sinputs" type="data_collection" format="vcf" label="Variant lists data" help="Select at least two datasets (or a dataset collection) with variant lists. Datasets are expected to represent individual samples and dataset names will be used as sample identifiers." multiple="true" collection_type="list" />
46 <conditional name="genome_data">
47 <param name="choice" type="select"
48 label="Data for genomic annotation">
49 <option value="length">length of the genome</option>
50 <option value="gff3">gff3 file</option>
51 </param>
52 <when value="length">
53 <param name="genome_length" argument="-l" type="integer" min="0" label="Genome length"/>
54 </when>
55 <when value="gff3">
56 <param name="gff3_file" argument="-g" type="data" format="gff3" label="GFF3 file" help="GFF3 file contains annotations for the genome and allows to display genes harboring a mutation. Ensure that the file follows the GFF3 specification."/>
57 </when>
58 </conditional>
59 <param name="varfreq" argument="-t" type="float" min="0" max="1" value="0" optional="true" label="Variant Frequency Threshold" help="Only plot variants with an intrasample frequency above this threshold in at least one sample." />
60 <param argument="--delete" type="boolean" truevalue="--delete" falsevalue="--no-delete" checked="true" label="Delete mutations that are present in all samples and their maximum frequency divergence is smaller than 0.5"/>
61 <param name="delete_n" argument="-n" type="integer" min="0" value="0" label="Do not show mutations that occur n times or less"/>
62 <conditional name="zoom">
63 <param name="choice" type="select" label="Restrict the plot to a specific genomic region">
64 <option value="yes">Yes</option>
65 <option value="no">No</option>
66 </param>
67 <when value="yes">
68 <param name="zoom_start" type="integer" label="Start"/>
69 <param name="zoom_stop" type="integer" label="End"/>
70 </when>
71 <when value="no"/>
72 </conditional>
73 <param argument="--sort" type="boolean" truevalue="--sort" falsevalue="--no-sort" checked="false" label="Sort sample names alphanumerically"/>
74 <param argument="--min-cov" type="integer" min="1" max="1000" value="20" label="Display mutations covered at least x time"/>
75 <section name="advanced" title="Image Properties" expanded="true">
76 <param name="output_type" type="select" label="Plot output format" >
77 <option value="pdf" selected="true" >PDF</option>
78 <option value="png" >PNG</option>
79 <option value="svg">SVG</option>
80 <option value="tiff" >TIFF</option>
81 <option value="bmp" >BMP</option>
82 <option value="jpeg" >JPEG</option>
83 </param>
84 </section>
85 </inputs>
86 <outputs>
87 <data name="outfile" format="pdf" from_work_dir="output_dir/tmp_output.*"
88 label="Variant-Frequency Plot on ${on_string}: ${advanced.output_type}">
89 <change_format>
90 <when input="advanced.output_type" value="svg" format="svg" />
91 <when input="advanced.output_type" value="png" format="png" />
92 <when input="advanced.output_type" value="tiff" format="tiff" />
93 <when input="advanced.output_type" value="bmp" format="bmp" />
94 <when input="advanced.output_type" value="jpeg" format="jpg" />
95 </change_format>
96 </data>
97 </outputs>
98 <tests>
99 <test expect_num_outputs="1">
100 <!-- test1: gff3, pdf -->
101 <param name="sinputs" value="day_0.vcf,day_2.vcf,day_4.vcf,day_18.vcf,day_26.vcf,day_32.vcf,day_47.vcf,day_55.vcf,day_60.vcf,day_76.vcf,day_83.vcf,day_85.vcf,day_91.vcf,day_96.vcf,day_100.vcf,day_103.vcf,day_111.vcf"/>
102 <conditional name="genome_data">
103 <param name="choice" value="gff3"/>
104 <param name="gff3_file" value="SARS-CoV-2.gff3"/>
105 </conditional>
106 <conditional name="zoom">
107 <param name="choice" value="yes"/>
108 <param name="zoom_start" value="22599"/>
109 <param name="zoom_stop" value="23278"/>
110 </conditional>
111 <output name="outfile" ftype="pdf">
112 <assert_contents>
113 <has_text text="day"/>
114 </assert_contents>
115 </output>
116 </test>
117 <test expect_num_outputs="1">
118 <!-- test2: length, svg -->
119 <param name="sinputs" value="day_76.vcf,day_83.vcf,day_91.vcf,day_103.vcf" ftype="vcf" />
120 <conditional name="genome_data">
121 <param name="choice" value="length"/>
122 <param name="genome_length" value="29903"/>
123 </conditional>
124 <conditional name="zoom">
125 <param name="choice" value="yes"/>
126 <param name="zoom_start" value="22599"/>
127 <param name="zoom_stop" value="23278"/>
128 </conditional>
129 <output name="outfile" ftype="svg">
130 <assert_contents>
131 <has_text text="day"/>
132 </assert_contents>
133 </output>
134 </test>
135 <test expect_num_outputs="1">
136 <!-- test3: gff3, threshold, png, delete, delete-n -->
137 <param name="sinputs" value="day_76.vcf,day_83.vcf,day_91.vcf,day_103.vcf" ftype="vcf" />
138 <param name="varfreq" value="0.1"/>
139 <param name="delete" value="yes"/>
140 <param name="delete_n" value="1"/>
141 <conditional name="genome_data">
142 <param name="choice" value="gff3"/>
143 <param name="gff3_file" value="SARS-CoV-2.gff3"/>
144 </conditional>
145 <conditional name="zoom">
146 <param name="choice" value="no"/>
147 </conditional>
148 <output name="outfile" ftype="png">
149 <assert_contents>
150 <has_text text="day"/>
151 </assert_contents>
152 </output>
153 </test>
154 <test expect_num_outputs="1">
155 <!-- test4: length, zoom, sort, tiff -->
156 <param name="sinputs" value="day_0.vcf,day_2.vcf,day_4.vcf,day_18.vcf,day_26.vcf,day_32.vcf,day_47.vcf,day_55.vcf,day_60.vcf,day_76.vcf,day_83.vcf,day_85.vcf,day_91.vcf,day_96.vcf,day_100.vcf,day_103.vcf,day_111.vcf"/>
157 <param name="varfreq" value="0.1"/>
158 <param name="delete" value="false"/>
159 <param name="delete_n" value="0"/>
160 <param name="sort" value="true"/>
161 <param name="min_cov" value="25"/>
162 <conditional name="zoom">
163 <param name="choice" value="yes"/>
164 <param name="zoom_start" value="22599"/>
165 <param name="zoom_stop" value="23278"/>
166 </conditional>
167 <section name="advanced">
168 <param name="output_type" value="tiff"/>
169 </section>
170 <conditional name="genome_data">
171 <param name="choice" value="length"/>
172 <param name="genome_length" value="29903"/>
173 </conditional>
174 <output name="outfile">
175 <assert_contents>
176 <has_text text="day"/>
177 </assert_contents>
178 </output>
179 </test>
180 </tests>
181 <help><![CDATA[
182 @HELP_HEADER@
183 ]]></help>
184 <expand macro="citations"/>
185 </tool>