changeset 0:e2cec726fa79 draft

"planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 90a172f1fc12b9c4d73f4c924a8c0c5a559589d0"
author nml
date Tue, 27 Aug 2019 12:32:15 -0400
parents
children 1cf81ca17e9d
files positions2snv_alignment.xml test-data/expected-all.fasta test-data/expected-changed-ref-name.fasta test-data/expected.fasta test-data/expected.phy test-data/positions.tsv
diffstat 6 files changed, 102 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/positions2snv_alignment.xml	Tue Aug 27 12:32:15 2019 -0400
@@ -0,0 +1,76 @@
+<tool id="positions2snv_alignment" name="Positions to SNV alignment" version ="1.8.2">
+  <description>Create a SNV-only alignment from the SNVPhyl positions table.</description>
+  <requirements>
+    <requirement type="package" version="1.8.2">snvphyl-tools</requirement>
+  </requirements>
+  <command detect_errors="exit_code"><![CDATA[
+	positions2snv_alignment.pl -i $snv_table -o $output -f $out_format $keep_all 
+        #if $reference_name:
+          --reference-name $reference_name
+        #end if
+  ]]></command>
+  <inputs>
+    <param name="snv_table" type="data" label="SNV table" format="tabular"/>
+    <param name="out_format" type="select" label="Output alignment format">
+      <option value="phylip">Phylip alignment format</option>
+      <option value="fasta">FASTA alignment format</option>
+    </param>
+    <param name="keep_all" type="boolean" checked="false" label="Keep all positions"
+      help="Keep all positions with status 'filtered' in the SNV alignment" truevalue="--keep-all" falsevalue="" />
+    <param name="reference_name" type="text" label="Reference genome name" value="Reference"
+      help="Name of reference genome in produced alignment" />
+  </inputs>
+  <outputs>
+    <data format="phylip" name="output">
+      <change_format>
+        <when input="out_format" value="phylip" format="phylip"/>
+        <when input="out_format" value="fasta" format="fasta"/>
+      </change_format>
+    </data>
+  </outputs>
+  <tests>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="out_format" value="phylip"/>
+
+      <output name="output" file="expected.phy"/>
+    </test>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="out_format" value="fasta"/>
+
+      <output name="output" file="expected.fasta"/>
+    </test>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="out_format" value="fasta"/>
+      <param name="keep_all" value="true" />
+
+      <output name="output" file="expected-all.fasta"/>
+    </test>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="out_format" value="fasta"/>
+
+      <output name="output" file="expected.fasta"/>
+    </test>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="out_format" value="fasta"/>
+      <param name="reference_name" value="ChangedRefName" />
+
+      <output name="output" file="expected-changed-ref-name.fasta"/>
+    </test>
+  </tests>
+
+  <help>
+What it does
+============
+
+Creates a SNV-only alignment from the SNVPhyl SNV positions table.
+
+  </help>
+
+  <citations>
+  </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expected-all.fasta	Tue Aug 27 12:32:15 2019 -0400
@@ -0,0 +1,6 @@
+>Reference
+TC
+>v1
+AN
+>v2
+AA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expected-changed-ref-name.fasta	Tue Aug 27 12:32:15 2019 -0400
@@ -0,0 +1,6 @@
+>ChangedRefName
+T
+>v1
+A
+>v2
+A
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expected.fasta	Tue Aug 27 12:32:15 2019 -0400
@@ -0,0 +1,6 @@
+>Reference
+T
+>v1
+A
+>v2
+A
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expected.phy	Tue Aug 27 12:32:15 2019 -0400
@@ -0,0 +1,5 @@
+ 3 1
+'Reference'  T
+       'v1'  A
+       'v2'  A
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/positions.tsv	Tue Aug 27 12:32:15 2019 -0400
@@ -0,0 +1,3 @@
+#Chromosome	Position	Status	Reference	v1	v2
+ref1	2	valid	T	A	A
+ref2	4	filtered-coverage	C	-	A