comparison snp.xml @ 0:179342c7b86c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/medaka commit 4d3dfd4bcb567178107dcfd808ff03f9fec0bdbd
author iuc
date Wed, 12 Oct 2022 07:43:59 +0000
parents
children 630e6aeeb7e8
comparison
equal deleted inserted replaced
-1:000000000000 0:179342c7b86c
1 <tool id="medaka_snp" name="medaka SNP tool" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>decodes probabilities to SNPs</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="version_command"/>
8 <command detect_errors="exit_code"><![CDATA[
9 ## initialize
10 @REF_FASTA@
11
12
13 #if $pool.pool_mode == "Yes":
14 ## run
15 medaka snp
16 ## optional
17 --debug
18 #if $regions
19 --regions '${regions}'
20 #end if
21 --threshold $threshold
22 #if $ref_vcf
23 --ref_vcf '$ref_vcf'
24 #end if
25 $verbose
26 ## required
27 reference.fa
28 #for $current in $pool.inputs
29 '$current'
30 #end for
31 #elif $pool.pool_mode == "No":
32 ## run
33 medaka snp
34 ## optional
35 --debug
36 #if $regions
37 --regions '${regions}'
38 #end if
39 --threshold $threshold
40 #if $ref_vcf
41 --ref_vcf '$ref_vcf'
42 #end if
43 $verbose
44 ## required
45 reference.fa
46 '$pool.input'
47 #end if
48 #if str($output_annotated.output_annotated_select) == 'false':
49 '$out_SNPs' ##output
50 2>&1 | tee '$out_log'
51 #else
52 raw.vcf ##output of medaka snp
53 2>&1 | tee '$out_log'
54 && ln -s '$output_annotated.in_bam' in.bam
55 && ln -s '$output_annotated.in_bam.metadata.bam_index' in.bai
56 && medaka tools annotate --dpsp --pad $output_annotated.pad raw.vcf reference.fa in.bam tmp.vcf
57 && python '$__tool_directory__/convert_VCF_info_fields.py' tmp.vcf '$out_SNPs'
58 #end if
59 ]]></command>
60 <inputs>
61 <conditional name="pool">
62 <param name="pool_mode" type="select" label="Are you pooling HDF5 datasets?">
63 <option value="No" selected="true">No</option>
64 <option value="Yes">Yes</option>
65 </param>
66 <when value="Yes">
67 <param name="inputs" type="data" format="h5" multiple="true" label="Select consensus file(s)"/>
68 </when>
69 <when value="No">
70 <param name="input" type="data" format="h5" label="Select consensus file(s)"/>
71 </when>
72 </conditional>
73 <expand macro="reference"/>
74 <param argument="--regions" type="text" value="" optional="true" label="Set reference names to limit SNP calling" help="Separated by ','.">
75 <sanitizer invalid_char="">
76 <valid initial="string.ascii_letters,string.digits">
77 <add value="_"/>
78 <add value=","/>
79 <add value="."/>
80 </valid>
81 </sanitizer>
82 </param>
83 <param argument="--threshold" type="float" label="Threshold for considering secondary calls" value="0.04" min="0" max="1" help="A value of 1 will result in haploid decoding" optional="true"/>
84 <param name="ref_vcf" type="data" format="vcf" optional="true" label="Reference vcf"/>
85 <param argument="--verbose" type="boolean" truevalue="--verbose" falsevalue="" label="Populate VCF info fields?"/>
86 <conditional name="output_annotated">
87 <param name="output_annotated_select" type="select"
88 label="Type of VCF to generate"
89 help="SNP INFO fields in the VCF can be extended to include allele frequency, depth of coverage, etc., but this requires a BAM dataset to calculate those values from.">
90 <option value="true" selected="true">Write annotated VCF with extended INFO</option>
91 <option value="false">Write original decoded VCF with minimal INFO field</option>
92 </param>
93 <when value="true">
94 <param name="in_bam" type="data" format="bam" optional="false" label="BAM to caclulate additional INFO fields from"/>
95 <param name="pad" type="integer" min="1" value="25"
96 label="Padding width on either side of SNP for realignment"
97 help="To calculate the additional INFO fields the tool will run medaka tools anntotate, which performs local realignment of the region +- this width around each SNP. All calculated new fields will depend on the width chosen, so only change this value if you know what you are doing." />
98 </when>
99 <when value="false"/>
100 </conditional>
101 <param name="output_log_bool" type="boolean" label="Output log file?" checked="true"/>
102 </inputs>
103 <outputs>
104 <data name="out_SNPs" format="vcf" label="${tool.name} on ${on_string}: called SNPs"/>
105 <data name="out_log" format="tabular" label="${tool.name} on ${on_string}: Log">
106 <filter>output_log_bool</filter>
107 </data>
108 </outputs>
109 <tests>
110 <!--No annotation or log-->
111 <test expect_num_outputs="1">
112 <conditional name="pool">
113 <param name="pool_mode" value="No"/>
114 <param name="input" value="medaka_test.hdf"/>
115 </conditional>
116 <conditional name="reference_source">
117 <param name="reference_source_selector" value="history"/>
118 <param name="ref_file" value="ref.fasta"/>
119 </conditional>
120 <conditional name="output_annotated">
121 <param name="output_annotated_select" value="false"/>
122 </conditional>
123 <param name="output_log_bool" value="false"/>
124 <output name="out_SNPs">
125 <assert_contents>
126 <has_n_lines n="7"/>
127 <has_line line="##fileformat=VCFv4.1" />
128 <has_line_matching expression="##medaka_version=[0-9]+\.[0-9]+\.[0-9]+" />
129 </assert_contents>
130 </output>
131 </test>
132 </tests>
133 <help><![CDATA[
134 .. class:: infomark
135
136 **What it does**
137
138 @WID@
139
140 This module decodes probabilities to SNPs but NOT indels.
141
142 For a more general solution see the medaka *variant* tool.
143 ----
144
145 .. class:: infomark
146
147 **Input**
148
149 - reference sequence (FASTA)
150 - (several) consensus files (H5/HDF)
151
152 ----
153
154 .. class:: infomark
155
156 **Output**
157
158 - decoded SNP probabilities (VCF)
159
160 ----
161
162 .. class:: infomark
163
164 **References**
165
166 @REFERENCES@
167 ]]></help>
168 <expand macro="citations"/>
169 </tool>