diff bcftools_gtcheck.xml @ 0:85dc172ae24f 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:03:34 -0400
parents
children 025adf89e10d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bcftools_gtcheck.xml	Wed Jul 06 07:03:34 2016 -0400
@@ -0,0 +1,124 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
+    <description>Check sample identity</description>
+    <macros>
+        <token name="@EXECUTABLE@">gtcheck</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@
+#set $section = $sec_default
+#set $genotypes_vcf = None
+#if $section.genotypes:
+  #if $section.genotypes.datatype.file_ext == 'vcf'
+    #set $genotypes_vcf = 'genotypes.vcf.gz'
+    bgzip -c "$section.genotypes" > $genotypes_vcf &&
+    bcftools index $genotypes_vcf &&
+  #elif $section.genotypes.datatype.file_ext == 'bcf'
+    #set $genotypes_vcf = 'genotypes.bcf'
+    ln -s "$ection.genotypes" $genotypes_vcf && 
+    #if $section.genotypes.metadata.bcf_index:
+      ln -s $section.genotypes.metadata.bcf_index ${genotypes_vcf}.csi &&
+    #else 
+      bcftools index $genotypes_vcf &&
+    #end if
+  #end if
+#end if
+
+bcftools @EXECUTABLE@
+
+## Default section
+#set $section = $sec_default
+
+#if $genotypes_vcf:
+  --genotypes $genotypes_vcf
+#end if
+
+#if $section.genotypes:
+  --genotypes "${section.genotypes}"
+#end if
+
+${section.all_sites}
+
+#if $section.GTs_only:
+  --GTs-only "${section.GTs_only}"
+#end if
+
+${section.homs_only}
+
+#if $section.plot:
+  --plot "${section.plot}"
+#end if
+
+#if $section.query_sample:
+  --query-sample "${section.query_sample}"
+#end if
+
+#if $section.target_sample:
+  --target-sample "${section.target_sample}"
+#end if
+
+#set $section = $sec_restrict
+@REGIONS@
+@TARGETS@
+
+## Primary Input/Outputs
+
+@INPUT_FILE@
+> "$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" />
+        </section>
+        <section name="sec_default" expanded="true" title="Default Options">
+            <param name="genotypes" type="data" format="vcf,bcf" label="Genotypes to compare against" optional="True" 
+                   help="(-g) Checks sample identity or wehn omitted a multi-sample cross-check is performed"/>
+            <param name="target_sample" type="text" label="Target Sample" optional="True" help="Target sample in the -g file (used only for plotting)" />
+            <param name="GTs_only" type="integer" label="Gts Only" default="99" optional="True" help="Use GTs, ignore PLs, using &lt;int&gt; for unseen genotypes" />
+            <param name="all_sites" type="boolean" truevalue="--all-sites" falsevalue="" label="All Sites" help="Output comparison for all sites" />
+            <param name="homs_only" type="boolean" truevalue="--homs-only" falsevalue="" label="Homs Only" help="Homozygous genotypes only (useful for low coverage data)" />
+            <param name="query_sample" type="text" label="Query Sample" optional="True" help="Query sample (by default the first sample is checked)" />
+            <param name="plot" type="text" label="Plot" help="Prefix name for plot" />
+        </section>
+    </inputs>
+    <outputs>
+        <data name="output_file" format="tabular" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="input_file" ftype="vcf" value="view.vcf" />
+            <output name="output_file">
+                <assert_contents>
+                    <has_text_matching expression="SM\t10328.0+\t80.68\t12\tNA00002\t0"/>
+                    <has_text_matching expression="CN\t1174\t14\t75.57\tNA00002\tNA00001"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+=====================================
+ bcftools @EXECUTABLE@
+=====================================
+
+Check sample identity. With no -g BCF given, multi-sample cross-check is performed.
+
+@REGIONS_HELP@
+@TARGETS_HELP@
+
+@BCFTOOLS_MANPAGE@#@EXECUTABLE@
+
+@BCFTOOLS_WIKI@
+
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>