diff flair_macros.xml @ 1:c784170f3b5e draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/flair commit 41f4293e4db957a23f3be9ff76874a8619e803a2"
author iuc
date Fri, 09 Apr 2021 21:15:31 +0000
parents 6927379c9ede
children
line wrap: on
line diff
--- a/flair_macros.xml	Fri Nov 27 21:55:45 2020 +0000
+++ b/flair_macros.xml	Fri Apr 09 21:15:31 2021 +0000
@@ -13,10 +13,17 @@
 
     <token name="@PREPARE_REF@"><![CDATA[
         #if str($reference_source_genome.ref_selector_genome) == 'history':
-            ln -s '$reference_source_genome.reffile' reference.fa &&
+            #set reference = $reference_source_genome.reffile
+            #set ext = $reference.ext
             samtools faidx 'reference.fa' 2>&1 || echo "Error running samtools faidx for indexing fasta reference for flair" >&2 &&
         #else
-            ln -s '${reference_source_genome.reffile.fields.path}' reference.fa &&
+            #set reference = $reference_source_genome.reffile.fields.path
+            #set ext = $reference_source_genome.reffile.fields.path
+        #end if
+        #if $ext.endswith(".gz"):
+            gunzip -c '$reference' > reference.fa &&
+        #else:
+            ln -sf '$reference' reference.fa &&
         #end if
     ]]></token>
 
@@ -34,7 +41,7 @@
                 </param>
             </when>
             <when value="history">
-                <param name="reffile" argument="-g" type="data" format="fasta" label="Reference" help="Reference sequence" />
+                <param name="reffile" argument="-g" type="data" format="fasta,fasta.gz" label="Reference" help="Reference sequence" />
             </when>
         </conditional>
     </xml>