diff bcftools_plugin_vcf2sex.xml @ 0:5e036e905f69 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit ef90c4602bdb83ea7455946c9d175ea27284e643
author iuc
date Wed, 06 Jul 2016 07:07:59 -0400
parents
children cef5eb208e29
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bcftools_plugin_vcf2sex.xml	Wed Jul 06 07:07:59 2016 -0400
@@ -0,0 +1,130 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tool name="bcftools @EXECUTABLE@" id="bcftools_plugin_@PLUGIN_ID@" version="@VERSION@.0">
+    <description>plugin Determine sample sex by checking genotypes in haploid regions</description>
+    <macros>
+        <token name="@EXECUTABLE@">vcf2sex</token>
+        <token name="@PLUGIN_ID@">vcf2sex</token>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <command detect_errors="aggressive"><![CDATA[
+@PREPARE_ENV@
+@PREPARE_INPUT_FILE@
+#set $section = $sec_restrict
+@PREPARE_TARGETS_FILE@
+
+bcftools plugin @EXECUTABLE@
+
+
+## VCF input section
+#set $section = $sec_restrict
+@INCLUDE@
+@EXCLUDE@
+@REGIONS@
+@TARGETS@
+
+## Primary Input/Outputs
+@INPUT_FILE@
+## Plugin section
+--
+#set $section = $sec_plugin
+#if $section.background:
+  --background "${section.background}"
+#end if
+#if $section.guess:
+  --guess $section.guess
+#end if
+#if $section.min_hets:
+  --min-hets $section.min_hets
+#end if
+#if $section.nsites:
+  --nsites $section.nsites
+#end if
+@PLOIDY_FILE@
+${section.verbose}
+| tee "$output_file"
+]]>
+    </command>
+    <inputs>
+        <expand macro="macro_input" />
+        <section name="sec_restrict" expanded="false" title="Restrict to">
+            <expand macro="macro_regions" />
+            <expand macro="macro_targets" />
+            <expand macro="macro_include" />
+            <expand macro="macro_exclude" />
+        </section>
+        <section name="sec_plugin" expanded="true" title="Plugin Options">
+            <param name="background" type="text" value="" optional="true" label="background region">
+                <help>
+                   Diploid region to determine normal hom/hets counts [X:60001-2699520]
+                </help>
+                <validator type="regex" message="">^(\w+:\d+-\d+)?$</validator>
+            </param>
+            <param name="guess" type="select" label="guess - determine ploidy by tag"  optional="true"
+                   help="Determine ploidy by counting hom/hets (GT) or most likely genotypes (PL or GL)">
+                  <option value="GT">counting hom/hets (GT)</option> 
+                  <option value="GL">most likely genotypes (GL)</option> 
+                  <option value="PL">most likely genotypes (PL)</option> 
+              </param>
+  
+              <param name="min_hets" type="float" value=".3" min="0." max="1." optional="true" label="min-hets - minimum fraction of hets in diploid regions [0.3]" 
+                     help="(\-\-min-hets)"/>
+              <param name="nsites" type="integer" value="10" min="0" optional="true" label="nsites - number of sites to check per region"
+                     help="(ignored with --guess) [10]"/>
+      
+              <expand macro="macro_ploidy_file" />
+              <param name="verbose" type="boolean" truevalue="--verbose" falsevalue="" checked="false" label="Verbose" 
+                     help="Print debugging information on plugin failure" />
+
+        </section>
+    </inputs>
+    <outputs>
+        <data name="output_file" format="tabular"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input_file" ftype="vcf" value="vcf2sex.vcf" />
+            <param name="nsites" value="5" />
+            <param name="output_type" value="v" />
+            <output name="output_file">
+                <assert_contents>
+                    <has_text text="MALE"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="input_file" ftype="vcf" value="vcf2sex.vcf" />
+            <param name="guess" value="GT" />
+            <param name="output_type" value="v" />
+            <output name="output_file">
+                <assert_contents>
+                    <has_text text="MALE"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="input_file" ftype="vcf" value="vcf2sex.vcf" />
+            <param name="guess" value="GT" />
+            <param name="nsites" value="5" />
+            <param name="output_type" value="v" />
+            <output name="output_file">
+                <assert_contents>
+                    <has_text text="MALE"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+
+    <help><![CDATA[
+=====================================
+ bcftools @EXECUTABLE@ plugin
+=====================================
+
+@REGIONS_HELP@
+@TARGETS_HELP@
+@EXPRESSIONS_HELP@
+
+    ]]></help>
+    <expand macro="citations" />
+</tool>