changeset 16:aad3885b3216 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit 2be63abd7e4db27fa32ecbbc10d48cacb0073115"
author iuc
date Fri, 20 Mar 2020 12:47:18 -0400
parents f5ea3ce9b9b0
children c441583adae5
files fasterq_dump.xml fastq_dump.xml sam_dump.xml sra_macros.xml sra_pileup.xml
diffstat 5 files changed, 17 insertions(+), 119 deletions(-) [+]
line wrap: on
line diff
--- a/fasterq_dump.xml	Tue Sep 10 11:35:35 2019 -0400
+++ b/fasterq_dump.xml	Fri Mar 20 12:47:18 2020 -0400
@@ -1,4 +1,4 @@
-<tool id="fasterq_dump" name="Faster Download and Extract Reads in FASTQ" version="@VERSION@.4" profile="16.01">
+<tool id="fasterq_dump" name="Faster Download and Extract Reads in FASTQ" version="@VERSION@+galaxy1" profile="18.01">
     <description>format from NCBI SRA</description>
     <macros>
         <import>sra_macros.xml</import>
@@ -6,13 +6,12 @@
     <expand macro="requirements"/>
     <version_command>fasterq-dump --version</version_command>
     <command detect_errors="exit_code"><![CDATA[
-
     @SET_ACCESSIONS@
     #if $input.input_select == "file":
         acc='${input.file.name}' &&
         ln -s '${input.file}' "\$acc" &&
     #end if
-
+    @CONFIGURE_TIMEOUT@
     fasterq-dump "\$acc" -e \${GALAXY_SLOTS:-1}
     $adv.split
     #if str( $adv.minlen ) != "":
--- a/fastq_dump.xml	Tue Sep 10 11:35:35 2019 -0400
+++ b/fastq_dump.xml	Fri Mar 20 12:47:18 2020 -0400
@@ -1,4 +1,4 @@
-<tool id="fastq_dump" name="Download and Extract Reads in FASTA/Q" version="@VERSION@.4">
+<tool id="fastq_dump" name="Download and Extract Reads in FASTA/Q" version="@VERSION@+galaxy1" profile="18.01">
     <description>format from NCBI SRA</description>
     <macros>
         <import>sra_macros.xml</import>
@@ -6,14 +6,12 @@
     <expand macro="requirements"/>
     <version_command>fastq-dump --version</version_command>
     <command detect_errors="exit_code"><![CDATA[
-
     @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.
-    export HOME=\$PWD &&
-    vdb-config --restore-defaults &&
+    @CONFIGURE_TIMEOUT@
     #if $input.input_select == "file":
         fastq-dump --log-level fatal --accession '${input.file.name}'
     #else:
@@ -21,9 +19,7 @@
         ## 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 ) == "" ):
-            ASCP_PATH=`command -v ascp` &&
-            ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh || true &&
-            prefetch -X 200G --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "\$acc" &&
+            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" &&
--- a/sam_dump.xml	Tue Sep 10 11:35:35 2019 -0400
+++ b/sam_dump.xml	Fri Mar 20 12:47:18 2020 -0400
@@ -1,9 +1,11 @@
-<tool id="sam_dump" name="Download and Extract Reads in BAM" version="@VERSION@.4">
+<tool id="sam_dump" name="Download and Extract Reads in BAM" version="@VERSION@+galaxy1" profile="18.01">
     <description>format from NCBI SRA</description>
     <macros>
         <import>sra_macros.xml</import>
     </macros>
-    <expand macro="requirements"/>
+    <expand macro="requirements">
+        <requirement type="package" version="1.10">samtools</requirement>
+    </expand>
     <version_command>sam-dump --version</version_command>
     <command detect_errors="exit_code">
 <![CDATA[
@@ -12,8 +14,7 @@
         ## 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.
-        export HOME=\$PWD &&
-        vdb-config --restore-defaults &&
+        @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.
@@ -22,9 +23,7 @@
             sam-dump --log-level fatal  '${input.file.name}'
         #else:
             #if ( str( $adv.region ) == "" ):
-                ASCP_PATH=`command -v ascp` &&
-                ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh || true &&
-                prefetch -X 200G --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "\$acc" &&
+                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" &&
--- a/sra_macros.xml	Tue Sep 10 11:35:35 2019 -0400
+++ b/sra_macros.xml	Fri Mar 20 12:47:18 2020 -0400
@@ -1,8 +1,11 @@
 <macros>
-    <token name="@VERSION@">2.10</token>
+    <token name="@VERSION@">2.10.4</token>
     <token name="@ACCESSIONS_FROM_FILE@">
         grep '^[[:space:]]*[E|S|D]RR[0-9]\{1,\}[[:space:]]*$'
     </token>
+    <token name="@CONFIGURE_TIMEOUT@"><![CDATA[
+        vdb-config --restore-defaults && vdb-config -s /http/timeout/read=10000 || true &&
+    ]]></token>
     <token name="@SET_ACCESSIONS@"><![CDATA[
         #if $input.input_select=="file_list":
             for acc in `@ACCESSIONS_FROM_FILE@ '$input.file_list'` ;
@@ -14,8 +17,8 @@
 
     <macro name="requirements">
         <requirements>
-            <requirement type="package" version="2.10">sra-tools</requirement>
-            <requirement type="package" version="1.9">samtools</requirement>
+            <requirement type="package" version="2.10.3">sra-tools</requirement>
+            <yield/>
         </requirements>
     </macro>
     <macro name="sanitize_query">
--- a/sra_pileup.xml	Tue Sep 10 11:35:35 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-<tool id="sra_pileup" name="Download and Generate Pileup Format" version="@VERSION@.3">
-    <description>from NCBI SRA</description>
-    <macros>
-        <import>sra_macros.xml</import>
-    </macros>
-    <expand macro="requirements"/>
-    <version_command>sra-pileup --version</version_command>
-    <command detect_errors="exit_code">
-        <![CDATA[
-
-        #if $input.input_select=="accession_number":
-            acc='${input.accession}' && [ ""\$acc" =~ ^[E|S|D]RR[0-9]{1,}$" ] &&
-        #end if
-
-        ## 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.
-        export HOME=\$PWD &&
-        vdb-config --restore-defaults &&
-        vdb-config -s "/repository/user/main/public/root=\$PWD" &&
-        #if ( str( $adv.region ) == "" ):
-            ASCP_PATH=`command -v ascp` &&
-            ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh || true &&
-            prefetch -X 200G --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "\$acc" &&
-            ## Duplicate vdb-config, in case settings changed between prefetch and
-            ## sra-pileup command.
-            vdb-config -s "/repository/user/main/public/root=\$PWD" &&
-        #end if
-        sra-pileup --log-level fatal
-        #if str( $adv.region ) != "":
-            --aligned-region "$adv.region"
-        #end if
-        #if str( $adv.minMapq ) != "":
-            --minmapq "$adv.minMapq"
-        #end if
-        #if $input.input_select == "file":
-            "$input.file" > "$output_file"
-        #elif $input.input_select == "accession_number":
-            "\$acc" > "$output_accession"
-        #elif $input.input_select == "text":
-            `@ACCESSIONS_FROM_FILE@ '$input.text'` > "$output_text"
-        #end if
-        ]]>
-    </command>
-    <inputs>
-        <conditional name="input">
-            <param name="input_select" type="select" label="select input type">
-                <option value="accession_number">SRR accession</option>
-                <option value="file">SRA archive in current history</option>
-                <option value="text">text file containing SRR accession</option>
-            </param>
-            <when value="file">
-                <param format="sra" name="file" type="data" label="sra archive"/>
-            </when>
-            <when value="accession_number">
-                <param format="text" name="accession" type="text" label="SRR accession" help="Must start with SRR, e.g. SRR925743">
-                    <expand macro="sanitize_query" />
-                </param>
-            </when>
-            <when value="text">
-                <param format="txt" name="text" type="data" label="text file"/>
-            </when>
-        </conditional>
-        <section name="adv" title="Advanced Options" expanded="False">
-            <expand macro="region"/>
-          <expand macro="minMapq"/>
-        </section>
-    </inputs>
-    <outputs>
-        <data format="pileup" name="output_accession" label="${input.accession} (sra-pileup)">
-            <filter>input['input_select'] == "accession_number"</filter>
-        </data>
-        <data format="pileup" name="output_file" label="${input.file.name} (sra-pileup)">
-            <filter>input['input_select'] == "file"</filter>
-        </data>
-        <data format="pileup" name="output_text" label="${input.text.name} (sra-pileup)">
-            <filter>input['input_select'] == "text"</filter>
-        </data>
-    </outputs>
-    <tests>
-        <test>
-            <param name="input_select" value="accession_number"/>
-            <param name="accession" value="SRR925743"/>
-            <param name="region" value="17:41243452-41277500"/>
-            <output name="output_accession" file="sra_pileup_result.pileup" compare="contains" ftype="pileup"/>
-        </test>
-    </tests>
-    <help>
- <![CDATA[
-
-This tool produces pileup format from sra archives using sra-pileup.
-The sra-pileup program is developed at NCBI, and is available at
-http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
-@SRATOOLS_ATTRRIBUTION@
-
-]]>
-    </help>
-    <expand macro="citation"/>
-</tool>