changeset 1:b112efe1994a draft default tip

planemo upload for repository https://github.com/jj-umn/galaxytools/tree/master/mixcr commit d027d2142cfcd0169c5c24f9bea63dd2d6cfe887-dirty
author jjohnson
date Tue, 26 Mar 2019 13:01:34 -0400
parents 445a02a846f3
children
files mixcr_analyze.xml
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mixcr_analyze.xml	Sat Mar 23 20:56:38 2019 -0400
+++ b/mixcr_analyze.xml	Tue Mar 26 13:01:34 2019 -0400
@@ -5,17 +5,24 @@
     </macros>
     <expand macro="requirements" />
     <command detect_errors="exit_code"><![CDATA[
+        #import os.path
+        #import re
+        #def clean(name)
+            #set $base_name = $os.path.basename($name)
+            #set $name_clean = re.sub('[^\w\-_\.]', '_', $base_name)
+            #return $name_clean
+        #end def
         #if $imgt.library_selector == 'history':
-            #set $libname = $imgt.library.name
+            #set $libname = $re.sub('.gz$','',$clean($imgt.library.name))
             ln -s -f $imgt.library $libname &&
         #end if
         #if str( $fastq_input.fastq_input_selector ) == "paired":
-          #set $fq1 = $fastq_input.fastq_input1.name
+          #set $fq1 = $clean($fastq_input.fastq_input1.name)
           ln -s -f $fastq_input.fastq_input1 $fq1 &&
-          #set $fq2 = $fastq_input.fastq_input2.name
+          #set $fq2 = $clean($fastq_input.fastq_input2.name)
           ln -s -f $fastq_input.fastq_input2 $fq2 &&
         #else:
-          #set $fq1 = $fastq_input.fastq_input1.name
+          #set $fq1 = $clean($fastq_input.fastq_input1.name)
           ln -s -f $fastq_input.fastq_input1 $fq1 &&
         #end if
         mixcr analyze $analyze.pipeline --starting-material $starting_material