changeset 3:4ffcf0672e81 draft

Uploaded
author bgruening
date Thu, 14 Aug 2014 07:40:02 -0400
parents b1a42223e9f9
children bb468ee178d8
files vt_normalize.xml
diffstat 1 files changed, 30 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/vt_normalize.xml	Thu Aug 14 06:18:37 2014 -0400
+++ b/vt_normalize.xml	Thu Aug 14 07:40:02 2014 -0400
@@ -12,9 +12,19 @@
             -o "${ outfile }"
             ##-q  do not print options and summary []
             -w  window size for local sorting of variants [10000]
-            -I  $intervals_file
+
+            #if str( $intervals_file ) != 'None':
+                -I  "${intervals_file}"
+            #end if
+
             ##-i  intervals []
-            -r  $reference_genome
+
+            #if $reference_source.reference_source_selector != "history":
+                -r "${reference_source.reference_genome.fields.path}"'
+            #else:
+                -r "${reference_source.reference_genome}"
+            #end if
+
             "${ infile }"
 ]]>
     </command>
@@ -22,12 +32,24 @@
     <inputs>
         <param name="infile" type="data" format="vcf" label="VCF file to be normalised" />
 
-        <param name="reference_genome" type="select" label="Using reference genome">
-              <options from_data_table="fasta_indexes">
-                <filter type="data_meta" ref="infile" key="dbkey" column="1" />
-                <validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" />
-              </options>
-        </param>
+
+        <conditional name="reference_source">
+            <param name="reference_source_selector" type="select" label="Choose the source for the reference list">
+                <option value="cached" selected="True">Locally cached</option>
+                <option value="history">History</option>
+            </param>
+            <when value="cached">
+                <param name="reference_genome" type="select" label="Using reference genome">
+                    <options from_data_table="fasta_indexes">
+                        <filter type="data_meta" ref="infile" key="dbkey" column="1" />
+                        <validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" />
+                    </options>
+                </param>
+          </when>
+          <when value="history">
+                <param name="reference_genome" type="data" format="fasta" label="Using reference file" />
+          </when>
+        </conditional>
 
         <param name="intervals_file" type="data" format="bed" optional="True" label="File containing list of intervals" />
         <param name="window" type="integer" value="10000" size="10" label="Window size for local sorting of variants"