changeset 26:5f57967aac3e draft

implement prefetch caching and accession input for fastq_dump
author Matt Shirley <mdshw5@gmail.com>
date Sat, 29 Jun 2013 11:14:03 -0400
parents 7e033744cb20
children 2295c666e6ce
files fastq_dump.xml tool_dependencies.xml
diffstat 2 files changed, 22 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/fastq_dump.xml	Wed Jun 19 16:48:18 2013 -0400
+++ b/fastq_dump.xml	Sat Jun 29 11:14:03 2013 -0400
@@ -1,9 +1,26 @@
-<tool id="fastq_dump" name="Extract fastq" version="1.0.2">
+<tool id="fastq_dump" name="Extract fastq" version="1.0.3">
   <description> format reads from NCBI sra.</description>
-  <command>fastq-dump --log-level fatal --accession '${input.name}' --stdout $split $aligned '$input' > $output </command>
+  <command>
+    #if $input.input_select=="file"
+        fastq-dump --log-level fatal --accession '${input.sra.name}' --stdout $split $aligned $input.sra > $output 
+    #else
+        fastq-dump --log-level fatal --accession $input.accession --stdout $split $aligned $input.accession > $output 
+    #end if
+  </command>
   <version_string>fastq-dump --version</version_string>
   <inputs>
-    <param format="sra" name="input" type="data" label="sra archive"/>
+    <conditional name="input">
+      <param name="input_select" type="select" label="Select input type">
+        <option value="accession">SRR accession</option>
+        <option value="sra">SRA archive in current history</option>
+      </param>
+      <when value="file">
+	<param format="sra" name="input" type="data" label="sra archive"/>
+      </when>
+      <when value="accession_number">
+	<param format="text" name="input" type="text" label="accession"/>
+      </when>
+    </conditional>
     <param format="text" name="split" type="select" value="">
       <label>Split read pairs</label>
       <option value="">No</option>
--- a/tool_dependencies.xml	Wed Jun 19 16:48:18 2013 -0400
+++ b/tool_dependencies.xml	Sat Jun 29 11:14:03 2013 -0400
@@ -7,7 +7,8 @@
 	<action type="shell_command">make release</action>
 	<action type="shell_command">make static</action>
 	<action type="shell_command">make</action>
-	<action type="make_directory">$INSTALL_DIR/bin</action>
+	<action type="make_directory">$INSTALL_DIR/bin</action>	
+	<action type="shell_command">sed -i -e 's/HOME/INSTALL_DIR/g' bin64/ncbi/default.kfg</action>
 	<action type="shell_command">cp --recursive --dereference bin64/* $INSTALL_DIR/bin</action>
 	<action type="set_environment"><environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable></action>
       </actions>