diff vcf_to_alignment.xml @ 0:cc255feec53b draft

planemo upload for repository https://github.com/sanbi-sa/tools-sanbi-uwc commit bc8fd85986b54f9d000e7d5869876fc9e479b6eb
author sanbi-uwc
date Wed, 01 Feb 2017 06:56:24 -0500
parents
children 4b9ddf64558d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vcf_to_alignment.xml	Wed Feb 01 06:56:24 2017 -0500
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<tool id="vcf_to_alignment" name="Generate FASTA alignment from VCF collection" version="0.1">
+  <description>Generate a multiple sequence alignment given a collection of variants and a reference sequence</description>
+  <requirements>
+      <requirement type="package" version="1.67">biopython</requirement>
+      <requirement type="package" version="0.6.8">pyvcf</requirement>
+      <requirement type="package" version="2.1.0">intervaltree</requirement>
+  </requirements>
+  <command detect_errors="aggressive"><![CDATA[
+    #if str($reference.source) == 'history':
+      ln -s '${reference.history}' reference.fasta &&
+    #end if
+    python $__tool_directory__/vcf_to_msa.py --vcf_files
+    #for $vcf_file in $vcf_inputs:
+      '${vcf_file.element_identifier}^^^${vcf_file}'
+    #end for
+    --reference_file
+    #if str($reference.source) == 'history':
+      reference.fasta
+    #else
+      '${reference.builtin}'
+    #end if
+    --output_file '${output_alignment}'
+    ]]>
+  </command>
+  <inputs>
+    <param name="vcf_inputs" type="data_collection" format="vcf" collection_type="list" label="Variants (VCF format)" />
+    <conditional name="reference" label="Reference sequence source">
+      <param name="source" type="select">
+        <option value="history" selected="True">History</option>
+        <option value="builtin">Built-in</option>
+      </param>
+      <when value="history">
+        <param name="history" type="data" format="fasta" label="Reference sequence" />
+      </when>
+      <when value="builtin">
+        <param name="builtin" type="select" label="Reference sequence (FASTA format)">
+          <options from_data_table="all_fasta" />
+        </param>
+      </when>
+    </conditional>
+  </inputs>
+  <outputs>
+    <data name="output_alignment" format="fasta" label="Alignment ${on_string}" />
+  </outputs>
+  <tests>
+    <test>
+      <param name="vcf_inputs">
+        <collection type="list">
+          <element name="vcf_inputs.vcf1" value="vcf1.vcf" />
+          <element name="vcf_inputs.vcf2" value="vcf2.vcf" />
+          <element name="vcf_inputs.vcf3" value="vcf3.vcf" />
+        </collection>
+      </param>
+      <param name="history" value="reference.fasta" ftype="fasta" />
+      <output name="output_alignment" value="output1.fasta" />
+    </test>
+  </tests>
+  <help><![CDATA[
+    Using the SNPs identified by the VCF files given as input, generates a sequence including the
+    SNPs by combining them with the reference and then combines the sequences into a FASTA
+    format alignment file.
+    ]]>
+  </help>
+  <citations></citations>
+</tool>