changeset 0:bf542eece94a draft

"planemo upload for repository https://github.com/phac-nml/snvphyl-galaxy commit 90a172f1fc12b9c4d73f4c924a8c0c5a559589d0"
author nml
date Tue, 27 Aug 2019 12:32:37 -0400
parents
children 5dc704146cc6
files positions2snv_invariant_alignment.xml test-data/expected-merged-all.fasta test-data/expected-merged.fasta test-data/expected-merged.phy test-data/positions.tsv test-data/ref1-all.fasta test-data/ref1.fasta test-data/ref2-all.fasta test-data/ref2.fasta test-data/reference.fasta
diffstat 10 files changed, 139 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/positions2snv_invariant_alignment.xml	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,91 @@
+<tool id="positions2snv_invariant_alignment" name="Positions to SNV invariant alignment" version ="1.8.2">
+  <description>Create a SNV and non-variant alignment from the SNVPhyl positions table and a reference genome.</description>
+  <requirements>
+    <requirement type="package" version="1.8.2">snvphyl-tools</requirement>
+  </requirements>
+  <command detect_errors="exit_code"><![CDATA[
+	positions2snv_invariant_alignment.pl -i $snv_table --reference-file $reference_genome -o outputs -f $out_format $keep_all $merge_alignment
+  ]]></command>
+  <inputs>
+    <param name="snv_table" type="data" label="SNV table" format="tabular"/>
+    <param name="reference_genome" type="data" label="Reference genome" format="fasta"/>
+    <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="merge_alignment" type="boolean" checked="false" label="Merge alignment to single file" 
+      help="Merge individual sequences in reference file to single sequence in final alignment" truevalue="--merge-alignment" falsevalue="" />
+    <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="" />
+  </inputs>
+  <outputs>
+    <collection name="alignments" type="list" label="Alignment files">
+      <discover_datasets pattern="__name_and_ext__" directory="outputs" />
+    </collection>
+  </outputs>
+  <tests>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="reference_genome" value="reference.fasta"/>
+      <param name="out_format" value="fasta"/>
+      <param name="merge_alignment" value="true" />
+
+      <output_collection name="alignments" type="list">
+        <element name="alignment_merged" file="expected-merged.fasta"/>
+      </output_collection>
+    </test>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="reference_genome" value="reference.fasta"/>
+      <param name="out_format" value="phylip"/>
+      <param name="merge_alignment" value="true" />
+
+      <output_collection name="alignments" type="list">
+        <element name="alignment_merged" file="expected-merged.phy"/>
+      </output_collection>
+    </test>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="reference_genome" value="reference.fasta"/>
+      <param name="out_format" value="fasta"/>
+      <param name="merge_alignment" value="true" />
+      <param name="keep_all" value="true" />
+
+      <output_collection name="alignments" type="list">
+        <element name="alignment_merged" file="expected-merged-all.fasta"/>
+      </output_collection>
+    </test>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="reference_genome" value="reference.fasta"/>
+      <param name="out_format" value="fasta"/>
+
+      <output_collection name="alignments" type="list">
+        <element name="ref1" file="ref1.fasta"/>
+        <element name="ref2" file="ref2.fasta"/>
+      </output_collection>
+    </test>
+    <test>
+      <param name="snv_table" value="positions.tsv"/>
+      <param name="reference_genome" value="reference.fasta"/>
+      <param name="out_format" value="fasta"/>
+      <param name="keep_all" value="true" />
+
+      <output_collection name="alignments" type="list">
+        <element name="ref1" file="ref1-all.fasta"/>
+        <element name="ref2" file="ref2-all.fasta"/>
+      </output_collection>
+    </test>
+  </tests>
+
+  <help>
+What it does
+============
+
+Creates a SNV and non-variant alignment from the SNVPhyl SNV positions table and a reference genome.
+
+  </help>
+
+  <citations>
+  </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expected-merged-all.fasta	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,6 @@
+>Reference
+ATGCATGC
+>v1
+AAGCATG-
+>v2
+AAGCATGA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expected-merged.fasta	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,6 @@
+>Reference
+ATGCATGC
+>v1
+AAGCATGC
+>v2
+AAGCATGC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/expected-merged.phy	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,5 @@
+ 3 8
+'Reference'  ATGCATGC
+       'v1'  AAGCATGC
+       'v2'  AAGCATGC
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/positions.tsv	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,3 @@
+#Chromosome	Position	Status	Reference	v1	v2
+ref1	2	valid	T	A	A
+ref2	4	filtered-coverage	C	-	A
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ref1-all.fasta	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,6 @@
+>Reference
+ATGC
+>v1
+AAGC
+>v2
+AAGC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ref1.fasta	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,6 @@
+>Reference
+ATGC
+>v1
+AAGC
+>v2
+AAGC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ref2-all.fasta	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,6 @@
+>Reference
+ATGC
+>v1
+ATG-
+>v2
+ATGA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ref2.fasta	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,6 @@
+>Reference
+ATGC
+>v1
+ATGC
+>v2
+ATGC
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/reference.fasta	Tue Aug 27 12:32:37 2019 -0400
@@ -0,0 +1,4 @@
+>ref1
+atgc
+>ref2
+atgc