changeset 2:5aea5b993ae8

fix .dat unknown extension for kissreads
author cmonjeau
date Fri, 11 Sep 2015 10:04:40 +0000
parents f7458a23cebe
children c62c5fd56ebf
files mapsembler2.py mapsembler2.xml
diffstat 2 files changed, 17 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mapsembler2.py	Mon Jul 06 15:53:45 2015 +0000
+++ b/mapsembler2.py	Fri Sep 11 10:04:40 2015 +0000
@@ -12,7 +12,7 @@
 
 http://www.irisa.fr/symbiose/people/ppeterlongo/mapsembler2_2.2.3.zip
 
-or with the galaxy_mapsembler2 package in the GenOuest toolshed
+or with the package_mapsembler2_2_2_3 package in the GUGGO toolshed and main toolshed
 
 
 """
@@ -49,8 +49,13 @@
 	#inputs
 	cmd_line.append("-r")
 
-	#cmd_line.append(inputs)
-	cmd_line.append(' '.join(options.input_files.split(",")))
+        inputs_tab = []
+
+        for input in options.input_files.split(","):
+             os.symlink(input, os.path.basename(input)+'.'+options.extension_format)
+             inputs_tab.append(os.path.basename(input)+'.'+options.extension_format)
+
+        cmd_line.append(' '.join(inputs_tab))
 
 	# add parameters into the command line
 	cmd_line.extend(["-t", options.output_extension, "-k", options.kmer, "-c", options.coverage, "-d", options.substitutions, "-g", options.genome_size, "-f", options.process_search, "-x", options.max_length, "-y", options.max_depth])
@@ -59,15 +64,8 @@
         log = open(options.output, "w")
 	log.write("[COMMAND LINE] "+' '.join(cmd_line))
 
-	process=subprocess.Popen(cmd_line,
-                   stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-
-        stdoutput, stderror = process.communicate()
+	process=subprocess.call(cmd_line)
 	
-	# results recuperation
-	log.write(stdoutput)
-	log.write(stderror)
-
 	# close log file
 	log.close()
 	
--- a/mapsembler2.xml	Mon Jul 06 15:53:45 2015 +0000
+++ b/mapsembler2.xml	Fri Sep 11 10:04:40 2015 +0000
@@ -7,6 +7,7 @@
 mapsembler2.py
 -s $input_starters
 -r $data_files
+-e $extension_format
 -t $output_extension
 -k $kmer
 -c $coverage
@@ -23,6 +24,10 @@
 	<!-- Input data files -->
 	<param name="input_starters" type="data" format="fasta" label="Starters" help="set of input sequences" /> 	
 	<param name="data_files" type="data" multiple="true" format="fasta,fastq" label="Read file" help="Data loaded in the script" />
+        <param name="extension_format" type="select" label="Input files">
+               <option value="fasta">fasta</option>
+               <option value="fastq">fastq</option>
+        </param>
 	<param name="output_extension" type="select" label="Select your output extension type">
 		<option value="1">a strict sequence</option>
 		<option value="2">a consensus sequence</option>
@@ -48,6 +53,9 @@
       </data>
 
   </outputs>
+  <stdio>
+    <exit_code range="1" level="fatal" description="Error in Stacks Denovo execution" />
+  </stdio>
   <help>
 
 **Description**