changeset 1:6c6a06ac35c1 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 21c66fb27c7e2fd21c7f7607b3b29e77e64fb86d-dirty
author jjohnson
date Sun, 26 Jun 2016 15:31:54 -0400
parents a30804010531
children 2943e6fe2221
files bcftools_annotate.xml bcftools_consensus.xml test-data/fixploidy.ploidy test-data/fixploidy.samples
diffstat 4 files changed, 111 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/bcftools_annotate.xml	Sat Jun 25 20:46:09 2016 -0400
+++ b/bcftools_annotate.xml	Sun Jun 26 15:31:54 2016 -0400
@@ -135,7 +135,7 @@
                  To remove all INFO tags except "FOO" and "BAR", use "^INFO/FOO,INFO/BAR" (and similarly for FORMAT and FILTER). 
                  "INFO" can be abbreviated to "INF" and "FORMAT" to "FMT". 
                 ]]></help>
-                <validator type="regex" message="">^([+]?(%[A-Z]+)(\_%[A-Z]+)*)?$</validator>
+                <validator type="regex" message="">^(\^?[A-Z]+(/\w+)?(,\^?[A-Z]+(/\w+)?)*)?$</validator>
             </param>
             <param name="rename_chrs" type="data" format="tabular" label="Rename CHROM" optional="True" 
                    help="rename chromosomes according to the map in file, with old_name new_name pairs separated by whitespaces, each on a separate line." />
@@ -225,7 +225,7 @@
             <param name="output_type" value="v" />
             <output name="output_file">
                 <assert_contents>
-                    <not_has_text text="ID=X" />
+                    <not_has_text text="fltY" />
                 </assert_contents>
             </output>
         </test>
@@ -236,7 +236,7 @@
             <param name="output_type" value="v" />
             <output name="output_file">
                 <assert_contents>
-                    <not_has_text text="ID=PL" />
+                    <not_has_text text="GT:X:PL:Y:AA" />
                 </assert_contents>
             </output>
         </test>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bcftools_consensus.xml	Sun Jun 26 15:31:54 2016 -0400
@@ -0,0 +1,96 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@VERSION@.0">
+    <description>Create consensus sequence by applying VCF variants to a reference fasta file</description>
+    <macros>
+        <token name="@EXECUTABLE@">consensus</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_default
+@PREPARE_FASTA_REF@
+
+bcftools @EXECUTABLE@
+
+## Default section
+#set $section = $sec_default
+@FASTA_REF@
+
+${section.iupac_codes}
+
+#if $section.mask:
+  --mask "${section.mask}"
+#end if
+
+#if $section.select_haplotype:
+  --haplotype "${section.select_haplotype}"
+#end if
+@SAMPLE@
+
+#if $chain:
+  --chain "$chain_file"
+#end if
+
+## Primary Input/Outputs
+--output "$output_file"
+@INPUT_FILE@
+]]>
+    </command>
+    <inputs>
+        <expand macro="macro_input" />
+        <section name="sec_default" expanded="true" title="Default Options">
+            <expand macro="macro_fasta_ref" />
+            <param name="mask" type="data" format="tabular" label="Mask" optional="True" help="Replace regions with N" />
+
+            <param name="iupac_codes" type="boolean" truevalue="--iupac-codes" falsevalue="" label="Iupac Codes" 
+                   help="Output variants in the form of IUPAC ambiguity codes" />
+            <expand macro="macro_sample" />
+            <param name="select_haplotype" type="select" optional="true">
+                <option value="1">1</option>
+                <option value="2">2</option>
+            </param>
+        </section>
+        <param name="chain" type="boolean" truevalue="yes" falsevalue="no" label="Write a chain file for liftover" />
+    </inputs>
+    <outputs>
+        <data name="output_file" format="fasta" label="${tool.name} on ${on_string}: consensus fasta"/>
+        <data name="chain_file" format="txt" label="${tool.name} on ${on_string}: chain">
+            <filter>chain</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="reference_fasta" ftype="fasta" value="consensus.fa" />
+            <param name="input_file" ftype="vcf" value="consensus.vcf" />
+            <param name="mask" ftype="tabular" value="consensus.tab" />
+            <param name="chain" value="True" />
+            <output name="output_file">
+                <assert_contents>
+                    <has_text text="NNNNNNNNNNNNNNNNNNNNNNNNNN" />
+                </assert_contents>
+            </output>
+            <output name="chain_file">
+                <assert_contents>
+                    <has_text text="chain 497 1 501 + 1 501 1 502 + 1 502 1" />
+                </assert_contents>
+            </output>
+            <output name="chain_file" file="consensus.1.chain" />
+    </tests>
+    <help><![CDATA[
+=====================================
+ bcftools @EXECUTABLE@ plugin
+=====================================
+
+
+Create consensus sequence by applying VCF variants to a reference fasta file.
+
+@BCFTOOLS_MANPAGE@#@EXECUTABLE@
+
+@BCFTOOLS_WIKI@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- a/test-data/fixploidy.ploidy	Sat Jun 25 20:46:09 2016 -0400
+++ b/test-data/fixploidy.ploidy	Sun Jun 26 15:31:54 2016 -0400
@@ -1,9 +1,9 @@
-1   3000001 3000001 X 0
-1   3000001 3000001 Y 1
-1   3000001 3000001 Z 2
-1   3000002 3000002 X 3
-1   3000002 3000002 Y 4
-1   3000002 3000002 Z 5
-1   3000004 3000004 X 6
-1   3000004 3000004 Y 7
-1   3000004 3000004 Z 8
+1	3000001	3000001	X	0
+1	3000001	3000001	Y	1
+1	3000001	3000001	Z	2
+1	3000002	3000002	X	3
+1	3000002	3000002	Y	4
+1	3000002	3000002	Z	5
+1	3000004	3000004	X	6
+1	3000004	3000004	Y	7
+1	3000004	3000004	Z	8
--- a/test-data/fixploidy.samples	Sat Jun 25 20:46:09 2016 -0400
+++ b/test-data/fixploidy.samples	Sun Jun 26 15:31:54 2016 -0400
@@ -1,3 +1,3 @@
-A X
-B Y
-C Z
+A	X
+B	Y
+C	Z