changeset 19:abb622c228c4 draft

planemo upload commit 1e3adef29c2d50fa89df02d0153e069c4328557e
author cstrittmatter
date Mon, 27 Aug 2018 08:59:02 -0400
parents 53d82924230b
children a368d48a4562
files run_skesa_collection.py skesa.xml
diffstat 2 files changed, 70 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run_skesa_collection.py	Mon Aug 27 08:59:02 2018 -0400
@@ -0,0 +1,43 @@
+import sys
+
+from pathlib import Path
+
+path1 = sys.argv[1]
+
+cores = sys.argv[2]
+
+memory = sys.argv[2]
+
+print(path1)
+
+#print(path2)
+
+pathlist = Path(path1).glob('*fastq*')
+
+i = 0
+skcmd = []
+
+skcmd.append("skesa ")
+
+for path in pathlist:
+    # because path is object not string-wq
+    i += 1
+    path_in_str = str(path)
+    if i == 2:
+        skcmd.append("," + path_in_str)
+        #print("," + path_in_str)
+        i = 0
+    if i == 1:
+        skcmd.append(" --fastq " + path_in_str)
+        #print(" --fastq " + path_in_str) 
+
+    
+
+if cores != 0:
+    skcmd.append(" --cores " + cores)
+    
+
+skcmd.append(" --memory " + memory)
+
+skcmds = ''.join(skcmd)
+print(skcmds) 
--- a/skesa.xml	Thu Aug 16 14:54:58 2018 -0400
+++ b/skesa.xml	Mon Aug 27 08:59:02 2018 -0400
@@ -1,32 +1,45 @@
 <tool id="skesa" name="skesa" version="0.1">
     <requirements>
-      <requirement type="package" version="2.2">skesa</requirement>
+      	<requirement type="package" version="2.2">skesa</requirement>
+	<requirement type="package" >python</requirement>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
-    #if $jobtype.select != "cl"
+    
+
+      #if $jobtype.select != "cl"
 	skesa
-      #if $jobtype.select == "srr"
-        -sra_run $srrnum
-      #else if $jobtype.select == "asm"
+       #if $jobtype.select == "asm"
         --fasta $draft
-      #else if $jobtype.select == "se"
+       #else if $jobtype.select == "se"
         --fastq $fastq1
-      #else if $jobtype.select == "pe"
+       #else if $jobtype.select == "pe"
 	--fastq $fastq1,$fastq2 --use_paired_ends
-      #else if $jobtype.select == "rp"
+       #else if $jobtype.select == "rp"
 	--fastq $jobtype.pairedf.forward,$jobtype.pairedf.reverse --use_paired_ends
+       #if $cores != 0
+        --cores $cores
+       #end if
+        --memory $memory > results.skesa.fasta
       #end if
-      #if $cores != 0
-      --cores $cores
+
+
+      #if $jobtype.select == "cl"
+	
+	#set $pathOuput = 0
+	mkdir temp_data;
+        #for $collection_file in $jobtype.collection_files
+             	#silent sys.stderr.write($collection_file+"\n")
+	 	cp $collection_file temp_data/.;
+	     
+        #end for
+	
+
       #end if
-      --memory $memory	> results.skesa.fasta
-    #end if 
 
     ]]></command>
     <inputs>
       <conditional name="jobtype">
         <param name="select" type="select" label="Assembly or FASTQ Reads?">
-          <option value="sra">SRR  number</option>
           <option value="asm">Genome Assembly</option>
           <option value="se">Single-End Reads</option>
           <option value="pe">Paired-End Reads (Separate Files)</option>
@@ -47,7 +60,7 @@
           <param name="fastq2" type="data" format="fastq" label="FASTQ" />
         </when>
         <when value="cl">
-          <param name="collection_files" type="data_collection" format="fastq" collection_type="list" label="FASTQS: Must be a Data Set list built from multiple fastq files" />
+          <param name="collection_files" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" collection_type="paired" label="FASTQS: Must be a Data Set list built from multiple fastq files" />
         </when>
         <when value="rp">
           <param name="pairedf" type="data_collection" collection_type="paired" format="fastq" label="FASTQS: Must be a paired set of forward and reverse fastq files" />
@@ -55,8 +68,6 @@
       </conditional>
       <param name="memory" type="integer" label="Memory available (GB) [integer]" value="16" />
       <param name="cores" type="integer" label="Number of cores to use (default all) [integer]" value="0" />
-      <param name="kmer" type="integer" label="Minimal kmer length for assembly [default 21] if non are specified " value="0" />
-      <param name="min_count" type="integer" label="Minimal count for kmers retained for comparing alternate choices [integer]" value="0" />
     
     </inputs>
     <outputs>