diff fasterq_dump.xml @ 24:e08a7ad4378b draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit 52d835f027b052a0a887be14a55faf9fa9e456ae"
author iuc
date Mon, 01 Feb 2021 20:03:42 +0000
parents 653e89d73fc4
children 69ebb7f46e45
line wrap: on
line diff
--- a/fasterq_dump.xml	Thu Aug 20 05:06:27 2020 -0400
+++ b/fasterq_dump.xml	Mon Feb 01 20:03:42 2021 +0000
@@ -14,13 +14,16 @@
         ln -s '${input.file}' "\$acc" &&
     #end if
     @CONFIGURE_RETRY@
+    ## fetch from public s3 bucket if we can
+    export acc_or_path="\$acc" &&
+    aws s3 cp --no-sign-request "s3://sra-pub-sars-cov2/run/\$acc/\$acc" "\$acc.sra" 2>&1 | tee '$log' && export acc_or_path="\$acc.sra"|| true &&
     while [ \$SRA_PREFETCH_ATTEMPT -le \$SRA_PREFETCH_RETRIES ] ; do
-        fasterq-dump "\$acc" -e \${GALAXY_SLOTS:-1}
+        fasterq-dump "\$acc_or_path" -e \${GALAXY_SLOTS:-1}
         $adv.split
         #if str( $adv.minlen ) != "":
             --min-read-len "$adv.minlen"
         #end if
-        $adv.skip_technical 2>&1 | tee $log;
+        $adv.skip_technical 2>&1 | tee -a '$log';
         if [ \$? == 0 ] && [ \$(ls *.fastq | wc -l) -ge 1 ]; then
             break ;
         else
@@ -192,6 +195,19 @@
                 </element>
             </output_collection>
         </test>
+        <test>
+             <!-- test accession downloaded from public bucket -->
+            <param name="input_select" value="accession_number"/>
+            <param name="accession" value="SRR11859153"/>
+            <output_collection name="output_collection" type="list">
+                <element name="SRR11859153" file="SRR11859153.fastq.gz" decompress="True"/>
+            </output_collection>
+            <output name="log">
+                <assert_contents>
+                    <has_text text="download: s3://sra-pub-sars-cov2/"/>
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help><![CDATA[
 **What it does?**