diff getfastaBed.xml @ 10:c78cf6fe3018 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 44bebb8a97d64015cbba59f0663e2541035112b6
author iuc
date Mon, 03 Oct 2016 07:36:08 -0400
parents 607c0576c6ab
children 7308cc546a36
line wrap: on
line diff
--- a/getfastaBed.xml	Wed Sep 14 17:30:10 2016 -0400
+++ b/getfastaBed.xml	Mon Oct 03 07:36:08 2016 -0400
@@ -7,19 +7,38 @@
     <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)" />