diff vcfs2fasta.xml @ 22:96f393ad7fc6 draft default tip

Uploaded
author ulfschaefer
date Wed, 23 Dec 2015 04:50:58 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vcfs2fasta.xml	Wed Dec 23 04:50:58 2015 -0500
@@ -0,0 +1,123 @@
+<tool id="vcfs2fasta" name="VCFs to fasta" version="1.0">
+  <description>Takes a set of VCF files and outputs a multi fasta file with only the variant positions.</description>
+  <requirements>
+    <requirement type="package" version="2.7.10">python</requirement>
+    <requirement type="package" version="0.6.8dev">pyvcf</requirement>
+    <requirement type="package" version="3.11">pyyaml</requirement>
+    <requirement type="package" version="2.0.2">bintrees</requirement>
+	<requirement type="package" version="1.66">biopython</requirement>
+	<requirement type="package" version="1.4">matplotlib</requirement>
+  </requirements>
+  <stdio>
+	<!-- Assume anything other than zero is an error -->
+    <exit_code range="1:" />
+    <exit_code range=":-1" />
+  </stdio>
+  <command interpreter="bash">
+    vcfs2fasta.sh
+	$output
+	#if str($mix_cond.mix) == "yes":
+        $mix_cond.mix_value
+    #else
+        NOTTHERE
+    #end if
+	#if str($cols_cond.cols) == "yes":
+        $cols_cond.column_ns
+    #else
+        NOTTHERE
+    #end if
+	#if str($sample_cond.sample) == "yes":
+        $sample_cond.sample_ns
+    #else
+        NOTTHERE
+    #end if
+	#if str($reference_cond.reference) == "yes":
+		$reference_cond.ref_fa
+	#else
+        NOTTHERE
+    #end if
+	#if str($include_cond.include) == "yes":
+		$include_cond.in_bed
+	#else
+        NOTTHERE
+    #end if
+	#if str($exclude_cond.exclude) == "yes":
+		$exclude_cond.ex_bed
+	#else
+        NOTTHERE
+    #end if
+	#for $i, $input_vcf in enumerate( $input_vcfs ):
+        "${input_vcf}"
+    #end for
+  </command>
+
+  <inputs>
+	<param name="input_vcfs" type="data" multiple="true" format="vcf" label="Input VCF file(s)" />
+	<conditional name="mix_cond">
+        <param name="mix" type="select" label="With Mixtures" help="Specify this option with a threshold to output mixtures above this threshold.">
+          <option value="yes">Specify</option>
+          <option value="no" selected="true">Do not specify</option>
+        </param>
+        <when value="yes">
+			<param name="mix_value" type="float" value="0.5" label="Mixture value" />
+        </when>
+    </conditional>
+	<conditional name="cols_cond">
+        <param name="cols" type="select" label="Column Ns" help="Keeps columns with fraction of Ns above specified threshold.">
+          <option value="yes">Specify</option>
+          <option value="no" selected="true">Do not specify</option>
+        </param>
+        <when value="yes">
+			<param name="column_ns" type="float" value="0.5" label="Column Ns value" />
+        </when>
+    </conditional>
+	<conditional name="sample_cond">
+        <param name="sample" type="select" label="Sample Ns" help="Keeps samples with fraction of Ns above specified threshold.">
+          <option value="yes">Specify</option>
+          <option value="no" selected="true">Do not specify</option>
+        </param>
+        <when value="yes">
+			<param name="sample_ns" type="float" value="0.5" label="Sample Ns value" />
+        </when>
+    </conditional>
+	<conditional name="reference_cond">
+        <param name="reference" type="select" label="Reference genome file" help="If path to reference specified, then whole genome will be outputted.">
+          <option value="yes">Specify</option>
+          <option value="no" selected="true">Do not specify</option>
+        </param>
+        <when value="yes">
+			<param name="ref_fa" type="data" format="fasta" label="Reference fasta file" help="Fasta format"/>
+        </when>
+    </conditional>
+	<conditional name="include_cond">
+        <param name="include" type="select" label="Include region" help="Specify regions to include in a bed file.">
+          <option value="yes">Specify</option>
+          <option value="no" selected="true">Do not specify</option>
+        </param>
+        <when value="yes">
+			<param name="in_bed" type="data" format="bed" label="Include regions bed file" help="bed format"/>
+        </when>
+    </conditional>
+	<conditional name="exclude_cond">
+        <param name="exclude" type="select" label="Exclude region" help="Specify regions to exclude in a bed file.">
+          <option value="yes">Specify</option>
+          <option value="no" selected="true">Do not specify</option>
+        </param>
+        <when value="yes">
+			<param name="ex_bed" type="data" format="bed" label="Exclude regions bed file" help="bed format"/>
+        </when>
+    </conditional>
+  </inputs>
+
+  <outputs>
+    <data format="fasta" name="output" label="${tool.name} on ${on_string}: FASTA file" />
+  </outputs>
+  <test>
+	<param name="input_vcfs" value="1_short.vcf" ftype="vcf" />
+	<param name="input_vcfs" value="2_short.vcf" ftype="vcf" />
+	<output name="output" file="testresult.fa" ftype="fasta" />
+  </test>
+  <help>
+
+  </help>
+</tool>