Repository 'sra_tools'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/sra_tools

Changeset 18:7068f48d0ef9 (2020-06-08)
Previous changeset 17:c441583adae5 (2020-04-29) Next changeset 19:248f85ff0733 (2020-06-23)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit d22c001db39b52ebaa54837bebe2765c17b5c876"
modified:
README.rst
fasterq_dump.xml
fastq_dump.xml
sam_dump.xml
sra_macros.xml
b
diff -r c441583adae5 -r 7068f48d0ef9 README.rst
--- a/README.rst Wed Apr 29 12:12:23 2020 -0400
+++ b/README.rst Mon Jun 08 05:49:21 2020 -0400
[
@@ -1,43 +1,7 @@
 The Galaxy tool wrappers contained in this tool shed repository rely on software developed by
-the NCBI: http://github.com/ncbi/sra-tools.
-
-NCBI Sequence Read Archive: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
-Use of SRA Toolkit software herein should comply with the GPL v2 or greater.
-
-Copyright (C) 2013  Matthew Shirley
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+the NCBI: https://github.com/ncbi/sra-tools.
 
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# INSTALLATION
-
-This software release was designed to install using the Galaxy toolshed under Linux and MacOS operating systems on Intel x86-compatible 32/64 bit architectures.
-
-*Build Requirements*
-
-- bash
-- make
-- gcc
-- g++
-- libxml2
-
-On a Debian OS use:
-
-    apt-get install build-essential libxml2-dev
-
-On a Mac with [command line tools](https://developer.apple.com/downloads/index.action) installed:
-
-    brew install libxml2
+NCBI Sequence Read Archive Toolkit: https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software
 
 # Installation of Aspera connect ascp binary
 
b
diff -r c441583adae5 -r 7068f48d0ef9 fasterq_dump.xml
--- a/fasterq_dump.xml Wed Apr 29 12:12:23 2020 -0400
+++ b/fasterq_dump.xml Mon Jun 08 05:49:21 2020 -0400
[
@@ -1,4 +1,4 @@
-<tool id="fasterq_dump" name="Faster Download and Extract Reads in FASTQ" version="@VERSION@+galaxy2" profile="18.01">
+<tool id="fasterq_dump" name="Faster Download and Extract Reads in FASTQ" version="@VERSION@+galaxy0" profile="18.01">
     <description>format from NCBI SRA</description>
     <macros>
         <import>sra_macros.xml</import>
@@ -6,12 +6,12 @@
     <expand macro="requirements"/>
     <version_command>fasterq-dump --version</version_command>
     <command detect_errors="exit_code"><![CDATA[
+    @COPY_CONFIGFILE@
     @SET_ACCESSIONS@
     #if $input.input_select == "file":
         acc='${input.file.name}' &&
         ln -s '${input.file}' "\$acc" &&
     #end if
-    @CONFIGURE_TIMEOUT@
     @CONFIGURE_RETRY@
     while [ \$SRA_PREFETCH_ATTEMPT -le \$SRA_PREFETCH_RETRIES ] ; do
         fasterq-dump "\$acc" -e \${GALAXY_SLOTS:-1}
@@ -20,7 +20,7 @@
             --min-read-len "$adv.minlen"
         #end if
         $adv.skip_technical >> $log 2>&1 ;
-        if [ \$? == 0 ] ; then
+        if [ \$? == 0 ] && [ \$(ls *.fastq | wc -l) -ge 1 ]; then
             break ;
         else
             echo "Prefetch attempt \$SRA_PREFETCH_ATTEMPT of \$SRA_PREFETCH_RETRIES exited with code \$?" ;
@@ -30,7 +30,7 @@
     done &&
     mkdir -p output &&
     mkdir -p outputOther &&
-    count=`ls *.fastq | wc -l` &&
+    count="\$(ls *.fastq | wc -l)" &&
     echo "There are \$count fastq" &&
     data=(\$(ls *.fastq)) &&
     if [ "\$count" -eq 1 ]; then
@@ -68,6 +68,7 @@
     #end if
     ]]>
     </command>
+    <expand macro="configfile_hack"/>
     <inputs>
         <expand macro="input_conditional"/>
         <section name="adv" title="Advanced Options" expanded="False">
@@ -236,7 +237,7 @@
 .. _fastq-dump: https://ncbi.github.io/sra-tools/fastq-dump.html
 .. _fasterq-dump: https://github.com/ncbi/sra-tools/wiki/HowTo:-fasterq-dump
 .. _collection: https://galaxyproject.org/tutorials/collections/
-.. _link: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies
+.. _link: https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies
 
 @SRATOOLS_ATTRRIBUTION@
 
b
diff -r c441583adae5 -r 7068f48d0ef9 fastq_dump.xml
--- a/fastq_dump.xml Wed Apr 29 12:12:23 2020 -0400
+++ b/fastq_dump.xml Mon Jun 08 05:49:21 2020 -0400
[
@@ -1,4 +1,4 @@
-<tool id="fastq_dump" name="Download and Extract Reads in FASTA/Q" version="@VERSION@+galaxy1" profile="18.01">
+<tool id="fastq_dump" name="Download and Extract Reads in FASTA/Q" version="@VERSION@+galaxy0" profile="18.01">
     <description>format from NCBI SRA</description>
     <macros>
         <import>sra_macros.xml</import>
@@ -6,23 +6,16 @@
     <expand macro="requirements"/>
     <version_command>fastq-dump --version</version_command>
     <command detect_errors="exit_code"><![CDATA[
+    @COPY_CONFIGFILE@
     @SET_ACCESSIONS@
 
-    ## Need to set the home directory to the current working directory,
-    ## else the tool tries to write to home/.ncbi and fails when used
-    ## with a cluster manager.
-    @CONFIGURE_TIMEOUT@
     #if $input.input_select == "file":
         fastq-dump --log-level fatal --accession '${input.file.name}'
     #else:
-        vdb-config -s "/repository/user/main/public/root=\$PWD" &&
         ## Do not use prefetch if region is specified, to avoid downloading
         ## the complete sra file.
         #if ( str( $adv.region ) == "" ) and ( str( $adv.minID ) == "" ) and ( str( $adv.maxID ) == "" ):
             prefetch -X 200000000 "\$acc" &&
-            ## Duplicate vdb-config, in case settings changed between prefetch and
-            ## dump command.
-            vdb-config -s "/repository/user/main/public/root=\$PWD" &&
         #end if
         fastq-dump --accession "\$acc"
         --split-files
@@ -104,6 +97,7 @@
 
     ]]>
     </command>
+    <expand macro="configfile_hack"/>
     <inputs>
         <expand macro="input_conditional"/>
         <param name="outputformat" type="select" display="radio" label="Select output format" help="Compression will greatly reduce the amount of space occupied by downloaded data. Downstream applications such as a short-read mappers will accept compressed data as input. Consider this example: an uncoimpressed 400 Mb fastq datasets compresses to 100 Mb or 80 Mb by gzip or bzip2, respectively. " argument="--gzip --bzip2">
@@ -343,7 +337,7 @@
 .. _fastq: https://en.wikipedia.org/wiki/FASTQ_format
 .. _fastq-dump: https://ncbi.github.io/sra-tools/fastq-dump.html
 .. _collection: https://galaxyproject.org/tutorials/collections/
-.. _link: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies
+.. _link: https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies
 
 @SRATOOLS_ATTRRIBUTION@
 
b
diff -r c441583adae5 -r 7068f48d0ef9 sam_dump.xml
--- a/sam_dump.xml Wed Apr 29 12:12:23 2020 -0400
+++ b/sam_dump.xml Mon Jun 08 05:49:21 2020 -0400
[
@@ -1,4 +1,4 @@
-<tool id="sam_dump" name="Download and Extract Reads in BAM" version="@VERSION@+galaxy1" profile="18.01">
+<tool id="sam_dump" name="Download and Extract Reads in BAM" version="@VERSION@+galaxy0" profile="18.01">
     <description>format from NCBI SRA</description>
     <macros>
         <import>sra_macros.xml</import>
@@ -9,13 +9,9 @@
     <version_command>sam-dump --version</version_command>
     <command detect_errors="exit_code">
 <![CDATA[
+        @COPY_CONFIGFILE@
         @SET_ACCESSIONS@
 
-        ## Need to set the home directory to the current working directory,
-        ## else the tool tries to write to home/.ncbi and fails when used
-        ## with a cluster manager.
-        @CONFIGURE_TIMEOUT@
-        vdb-config -s "/repository/user/main/public/root=\$PWD" &&
         ## Do not use prefetch if region is specified, to avoid downloading
         ## the complete sra file.
 
@@ -24,9 +20,6 @@
         #else:
             #if ( str( $adv.region ) == "" ):
                 prefetch -X 200000000 "\$acc" &&
-                ## Duplicate vdb-config, in case settings changed between prefetch and
-                ## dump command.
-                vdb-config -s "/repository/user/main/public/root=\$PWD" &&
             #end if
             sam-dump --log-level fatal --disable-multithreading
         #end if
@@ -79,6 +72,7 @@
 
         ]]>
     </command>
+    <expand macro="configfile_hack"/>
     <inputs>
         <expand macro="input_conditional"/>
         <param name="outputformat" type="select" display="radio" label="select output format" help="In vast majority of cases you want to download data in bam format. It is more compact and is accepted by all downstream tools.">
@@ -173,9 +167,9 @@
 -----
 
 .. _BAM: https://samtools.github.io/hts-specs/SAMv1.pdf
-.. _sam-dump: http://ncbi.github.io/sra-tools/sam-dump.html
+.. _sam-dump: https://ncbi.github.io/sra-tools/sam-dump.html
 .. _collection: https://galaxyproject.org/tutorials/collections/
-.. _link: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies
+.. _link: https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies
 
 @SRATOOLS_ATTRRIBUTION@
     ]]></help>
b
diff -r c441583adae5 -r 7068f48d0ef9 sra_macros.xml
--- a/sra_macros.xml Wed Apr 29 12:12:23 2020 -0400
+++ b/sra_macros.xml Mon Jun 08 05:49:21 2020 -0400
[
@@ -1,16 +1,22 @@
 <macros>
-    <token name="@VERSION@">2.10.4</token>
+    <token name="@VERSION@">2.10.7</token>
     <token name="@ACCESSIONS_FROM_FILE@">
         grep '^[[:space:]]*[E|S|D]RR[0-9]\{1,\}[[:space:]]*$'
     </token>
     <token name="@COMPRESS@"><![CDATA[pigz -cqp \${GALAXY_SLOTS:-1}]]></token>
-    <token name="@CONFIGURE_TIMEOUT@"><![CDATA[
-        vdb-config --restore-defaults && vdb-config -s /http/timeout/read=10000 || true &&
-    ]]></token>
     <token name="@CONFIGURE_RETRY@"><![CDATA[
         export SRA_PREFETCH_RETRIES=3 &&
         export SRA_PREFETCH_ATTEMPT=1 &&
     ]]></token>
+    <token name="@COPY_CONFIGFILE@"><![CDATA[
+    mkdir -p ~/.ncbi &&
+    cp '$user_settings_mkfg' ~/.ncbi/user-settings.mkfg &&
+    vdb-config -s "/repository/user/main/public/root=\$PWD" &&
+    vdb-config -s "/repository/user/ad/public/root=\$PWD" &&
+    vdb-config -s "/repository/user/default-path=\$PWD" &&
+    vdb-config -s "/repository/user/main/public/root=\$PWD" &&
+    vdb-config -s /http/timeout/read=10000 &&
+    ]]></token>
     <token name="@SET_ACCESSIONS@"><![CDATA[
         #if $input.input_select=="file_list":
             for acc in `@ACCESSIONS_FROM_FILE@ '$input.file_list'` ;
@@ -22,11 +28,21 @@
 
     <macro name="requirements">
         <requirements>
-            <requirement type="package" version="2.10.3">sra-tools</requirement>
+            <requirement type="package" version="@VERSION@">sra-tools</requirement>
             <requirement type="package" version="2.3.4">pigz</requirement>
             <yield/>
         </requirements>
     </macro>
+    <macro name="configfile_hack">
+        <configfiles>
+            <configfile name="user_settings_mkfg"><![CDATA[
+/LIBS/GUID = "3cdc38d0-711a-49ce-9536-f544eaf69eec"
+/config/default = "false"
+/libs/temp_cache = "."
+/tools/prefetch/download_to_cache = "false"
+            ]]></configfile>
+        </configfiles>
+    </macro>
     <macro name="sanitize_query">
         <sanitizer>
             <valid initial="string.printable">