diff deepTools_macros.xml @ 14:b0d64a9930d6 draft

Uploaded
author bgruening
date Thu, 14 Nov 2013 05:43:15 -0500
parents 46ddfceb1bb2
children 351cd1f8791b
line wrap: on
line diff
--- a/deepTools_macros.xml	Wed Oct 30 09:44:05 2013 -0400
+++ b/deepTools_macros.xml	Thu Nov 14 05:43:15 2013 -0500
@@ -68,7 +68,7 @@
     </token>
 
     <macro name="multiple_input_bams">
-        <repeat name="inputs" title="Input files" min="2">
+        <repeat name="input_files" title="Input files" min="2">
             <param name="bamfile" type="data" format="bam" 
                 label="Bam file" 
                 help="The BAM file must be sorted."/>
@@ -78,6 +78,24 @@
           </repeat>
     </macro>
 
+    <token name="@multiple_input_bams@">
+        #for $i in $input_files:
+            #set $temp_input_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
+            #set $temp_input_path = $temp_input_handle.name
+            #silent $temp_input_handle.close()
+            #silent os.system("ln -s %s %s.bam" % (str($i.bamfile), $temp_input_path))
+            #silent os.system("ln -s %s %s.bam.bai" % (str($i.bamfile.metadata.bam_index), $temp_input_path))
+            #silent $files.append('%s.bam' % $temp_input_path)
+
+            ##set $files += [str($i.bamfile)]
+            #if str($i.label.value) != "":
+                #set $labels += ["\"%s\"" % ($i.label.value)]
+            #else
+                #set $labels += ["\"%s\"" % ($i.bamfile.name)]
+            #end if
+        #end for
+    </token>
+
     <macro name="reference_genome_source">
         <conditional name="source">
             <param name="ref_source" type="select" label="Reference genome">