changeset 3:221a97bf686d draft

Uploaded
author bcclaywell
date Wed, 25 Mar 2015 16:39:10 -0400
parents ce6db18f5fd3
children 5f0648f799a9
files alignment-wrapper.sh alignment.xml preprocessing-wrapper.sh preprocessing.xml
diffstat 4 files changed, 64 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/alignment-wrapper.sh	Wed Mar 25 16:39:10 2015 -0400
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+source $1
+
+# adapted from yapp/bin/refpkg_align
+ref_sto=$(taxit rp ${REFPKG} aln_sto)
+profile=$(taxit rp ${REFPKG} profile)
+
+sto=$(mktemp -u).sto
+
+cmalign --cpu ${GALAXY_SLOTS:-4} -o "$sto" --sfile "${ALIGNED_SCORES}" --noprob --dnaout "$profile" "${INPUT_SEQS}" | grep -E '^#'
+
+esl-alimerge --dna --outformat afa "$ref_sto" "$sto" | \
+    seqmagick convert --output-format fasta --dash-gap - "${ALIGNED_SEQS}"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/alignment.xml	Wed Mar 25 16:39:10 2015 -0400
@@ -0,0 +1,47 @@
+<tool id="PHYLO_alignment" name="Align query sequences" version="1.0.0">
+  <description>with sequences in a reference package</description>
+  <requirements>
+    <requirement type="package">yapp_env</requirement>
+  </requirements>
+  <macros>
+    <import>macros.xml</import>
+  </macros>
+  <version_command>echo "guppy $(guppy --version)"</version_command>
+  <command interpreter="bash">
+    alignment-wrapper.sh ${config}
+  </command>
+  <stdio>
+    <expand macro="basic_errors"/>
+  </stdio>
+  <inputs>
+    <param name="refpkg" type="data" format="refpkg" label="Reference package"/>
+    <param name="input_seqs" type="data" format="fasta" label="Input sequences"/>
+  </inputs>
+  <outputs>
+    <data name="aligned_seqs" format="fasta" label="Aligned sequences"/>
+    <data name="aligned_scores" format="txt" label="Alignment scores"/>
+  </outputs>
+  <configfiles>
+    <configfile name="config">
+REFPKG="${refpkg.extra_files_path}"
+INPUT_SEQS="${input_seqs}"
+
+ALIGNED_SEQS="${aligned_seqs}"
+ALIGNED_SCORES="${aligned_scores}"
+    </configfile>
+  </configfiles>
+  <!-- The contents of the help tag is parsed as reStructuredText. Please see
+       help-template.rst for examples of commonly-used sections in other Galaxy
+       tools. -->
+  <help>
+
+.. class:: infomark
+
+**What it does**
+
+This tool aligns query sequences with the reference sequences used to make the
+reference tree contained in the reference package and then merges the query and
+reference sequences.
+
+  </help>
+</tool>
--- a/preprocessing-wrapper.sh	Thu Feb 26 19:31:20 2015 -0500
+++ b/preprocessing-wrapper.sh	Wed Mar 25 16:39:10 2015 -0400
@@ -7,14 +7,3 @@
     --deduplicated-sequences-file ${DEDUP_INFO} \
     ${INPUT_SEQS} \
     ${DEDUP_SEQS}
-
-# adapted from yapp/bin/refpkg_align
-ref_sto=$(taxit rp ${REFPKG} aln_sto)
-profile=$(taxit rp ${REFPKG} profile)
-
-sto=$(mktemp -u).sto
-
-cmalign --cpu ${GALAXY_SLOTS:-4} -o "$sto" --sfile "${ALIGNED_SCORES}" --noprob --dnaout "$profile" "${DEDUP_SEQS}" | grep -E '^#'
-
-esl-alimerge --dna --outformat afa "$ref_sto" "$sto" | \
-    seqmagick convert --output-format fasta --dash-gap - "${ALIGNED_SEQS}"
--- a/preprocessing.xml	Thu Feb 26 19:31:20 2015 -0500
+++ b/preprocessing.xml	Wed Mar 25 16:39:10 2015 -0400
@@ -1,5 +1,5 @@
-<tool id="PHYLO_preprocessing" name="Preprocess sequences" version="2.0.0">
-  <description>in preparation for phylogenetic placement</description>
+<tool id="PHYLO_preprocessing" name="Deduplicate sequences" version="3.0.0">
+  <description>in preparation for alignment and placement</description>
   <requirements>
     <requirement type="package">yapp_env</requirement>
   </requirements>
@@ -14,26 +14,20 @@
     <expand macro="basic_errors"/>
   </stdio>
   <inputs>
-    <param name="refpkg" type="data" format="refpkg" label="Reference package"/>
     <param name="input_seqs" type="data" format="fasta" label="Input sequences"/>
     <param name="split_map" type="data" format="csv" label="Read-to-specimen map"/>
   </inputs>
   <outputs>
     <data name="dedup_seqs" format="fasta" label="Deduplicated sequences"/>
     <data name="dedup_info" format="csv" label="Deduplication info"/>
-    <data name="aligned_seqs" format="fasta" label="Aligned sequences"/>
-    <data name="aligned_scores" format="txt" label="Alignment scores"/>
   </outputs>
   <configfiles>
     <configfile name="config">
-REFPKG="${refpkg.extra_files_path}"
 INPUT_SEQS="${input_seqs}"
 SPLIT_MAP="${split_map}"
 
 DEDUP_SEQS="${dedup_seqs}"
 DEDUP_INFO="${dedup_info}"
-ALIGNED_SEQS="${aligned_seqs}"
-ALIGNED_SCORES="${aligned_scores}"
     </configfile>
   </configfiles>
   <!-- The contents of the help tag is parsed as reStructuredText. Please see
@@ -45,9 +39,7 @@
 
 **What it does**
 
-This tool aligns query sequences with the reference sequences used to make the
-reference tree contained in the reference package and then merges the query and
-reference sequences.
+This tool deduplicates input sequences in preparation for alignment and placement.
 
   </help>
 </tool>