diff getfastaBed.xml @ 26:c0fbce5dc84a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 19967671ddd4e750f53d71274e5c12325a402811
author iuc
date Mon, 17 Oct 2016 10:13:20 -0400
parents a2d4c30ba2f9
children da6d7bc0a8b0
line wrap: on
line diff
--- a/getfastaBed.xml	Wed Sep 14 17:29:56 2016 -0400
+++ b/getfastaBed.xml	Mon Oct 17 10:13:20 2016 -0400
@@ -7,19 +7,37 @@
     <expand macro="stdio" />
     <command>
 <![CDATA[
+        #if str( $fasta_source.fasta_source_selector ) == 'history':
+          #set $fasta_file = $fasta_source.fasta
+        #else
+          #set $fasta_file = $fasta_source.fasta_id.fields.path
+        #end if
         bedtools getfasta
         $name
         $tab
         $strand
         $split
-        -fi $fasta 
-        -bed $input
-        -fo $output
+        -fi '$fasta_file'
+        -bed '$input'
+        -fo '$output'
 ]]>
     </command>
     <inputs>
         <param format="bed,vcf,gff,gff3" name="input" type="data" label="BED/VCF/GFF file" />
-        <param format="fasta" name="fasta" type="data" label="Fasta file" />
+        <conditional name="fasta_source">
+            <param name="fasta_source_selector" type="select" label="Choose the source for the fasta file">
+                <option value="history" selected="True">History</option>
+                <option value="preloaded">Server indexed files</option>
+            </param>
+            <when value="history">
+                <param name="fasta" format="fasta" type="data" label="Fasta file" />
+            </when>
+            <when value="preloaded">
+               <param name="fasta_id" type="select">
+                  <options from_data_table="all_fasta" />
+               </param>
+            </when>
+        </conditional>
         <param name="name" type="boolean" checked="false" truevalue="-name" falsevalue=""
             label="Use the 'name' column in the BED file for the FASTA headers in the output FASTA file"
             help="(-name)" />