changeset 0:4b7f728bcd11 draft

planemo upload commit cd1454c40a43ad9da3d59e6ba8359318fc772c43-dirty
author cstrittmatter
date Wed, 28 Mar 2018 14:05:50 -0400
parents
children 5bf7e686149f
files ectyper ectyper.xml results.csv
diffstat 2 files changed, 107 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ectyper	Wed Mar 28 14:05:50 2018 -0400
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+
+"""
+    Shell program for ectyper
+"""
+import sys
+import os
+sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
+
+from ectyper import ectyper
+
+if __name__=='__main__':
+    ectyper.run_program()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ectyper.xml	Wed Mar 28 14:05:50 2018 -0400
@@ -0,0 +1,94 @@
+<tool id="ectyper" name="ectyper" version="0.1">
+    <requirements>
+      <requirement type="package" version="0.1">ectyper</requirement>
+      <requirement type="package" version="3.5">python</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+      #if $jobtype.select == "asm"
+        ln -s $jobtype.draft ${draft.name}.fasta;  
+      #else if $jobtype.select == "se"
+        ln -s $jobtype.fastq1 ${fastq1.name}_1.fastq;  
+      #else if $jobtype.select == "pe"
+        ln -s $jobtype.fastq1 ${fastq1.name}.fastq;  
+        ln -s $jobtype.fastq2 ${fastq2.name}.fastq;  
+      #else if $jobtype.select == "cl"
+        mkdir temp_data;
+        #for $collection_file in $jobtype.collection_files
+             cp $collection_file temp_data/.;
+        #end for
+
+      $__tool_directory__/ectyper  -i temp_data 
+      -d $percent_identity
+	    -l $percent_length
+  	  -o "./"; cat ./output/output.csv > results.csv; 
+
+      GALAXY_URL
+      #end if
+
+
+    #if $jobtype.select != "cl"
+    	$__tool_directory__/ectyper 
+      #if $jobtype.select == "asm"
+        -i ${draft.name}.fasta
+      #else if $jobtype.select == "se"
+        -i ${fastq1.name}_1.fastq
+      #else if $jobtype.select == "pe"
+        -i ${fastq1.name}.fastq,${fastq2.name}.fastq
+      #end if
+      -d $percent_identity
+	  -l $percent_length
+  	  -o "./"; cat ./output/output.csv > results.csv;
+    #end if 
+
+    ]]></command>
+    <inputs>
+      <conditional name="jobtype">
+        <param name="select" type="select" label="Assembly or FASTQ Reads?">
+          <option value="asm">Genome Assembly</option>
+          <option value="se">Single-End Reads</option>
+          <option value="pe">Paired-End Reads</option>
+          <option value="cl">Collection of Reads</option>
+        </param>
+        <when value="asm">
+          <param name="draft" type="data" format="fasta" label="FASTA" />
+        </when>
+        <when value="se">
+          <param name="fastq1" type="data" format="fastq" label="FASTQ" />
+        </when>
+        <when value="pe">
+          <param name="fastq1" type="data" format="fastq" label="FASTQ" />
+          <param name="fastq2" type="data" format="fastq" label="FASTQ" />
+        </when>
+         <when value="cl">
+              <param type="data_collection" name="collection_files" format="fastq" collection_type="list" label="FASTQS: Must be a Data Set list built from multiple fastq files" />
+        </when>
+      </conditional>
+   
+      <param name="percent_identity" type="integer" label="Percent identity required for an allele match [default 90]" value="90" />
+      <param name="percent_length" type="integer" label="Percent length required for an allele match [default 50]" value="50" />
+    
+    </inputs>
+    <outputs>
+            <data format="csv" label="ectyper Results" name="${input.name}.ectperResults" from_work_dir="*.csv"/>
+    </outputs>
+
+    <help><![CDATA[
+    
+**Usage: ectyper**
+
+**INPUT**
+
+A fasta assembly or single or paired end reads test or data set list of fastqs
+
+**PERCENTIDENTITY**
+
+Percentage of identity wanted to use against the database. From 0 to 100, default is 90%.
+
+**PERCENTLENGTH**
+
+Percentage of length wanted to use against the database. From 0 to 100, default is 50%.
+
+https://github.com/phac-nml/ecoli_serotyping
+
+    ]]></help>
+</tool>
\ No newline at end of file