changeset 14:1790dcf3c32d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit 30ec06de1f3056967f5cc2d8ef57f9692d5533d7
author iuc
date Tue, 04 Dec 2018 15:00:55 -0500
parents c38286ea7047
children f5ea3ce9b9b0
files sam_dump.xml sra_macros.xml
diffstat 2 files changed, 21 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/sam_dump.xml	Wed Oct 17 11:44:12 2018 -0400
+++ b/sam_dump.xml	Tue Dec 04 15:00:55 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="sam_dump" name="Download and Extract Reads in BAM" version="@VERSION@.3">
+<tool id="sam_dump" name="Download and Extract Reads in BAM" version="@VERSION@.4">
     <description>format from NCBI SRA</description>
     <macros>
         <import>sra_macros.xml</import>
@@ -17,15 +17,21 @@
         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 ) == "" ):
-            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
-            ## dump command.
-            vdb-config -s "/repository/user/main/public/root=\$PWD" &&
+
+        #if $input.input_select == "file":
+            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" &&
+                ## 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
-        sam-dump --log-level fatal --disable-multithreading
+
         #if str( $adv.region ) != "":
             --aligned-region '$adv.region'
         #end if
@@ -39,6 +45,7 @@
         #if str( $adv.alignments ) == "both":
             --unaligned
         #end if
+
         #if str( $adv.alignments ) == "unaligned":
             --unaligned-spots-only
         #end if
@@ -139,7 +146,7 @@
 
 **Uploading data for a single accession**
 
-When you type a single accession number (e.g., `SRR1582967`) into **Accession** box and click **Execute** the tool will fetch data for you. As a result you will get a single BAM (or SAM) dataset in the history. 
+When you type a single accession number (e.g., `SRR1582967`) into **Accession** box and click **Execute** the tool will fetch data for you. As a result you will get a single BAM (or SAM) dataset in the history.
 
 -----
 
@@ -154,13 +161,13 @@
 
 .. class:: warningmark
 
-BAM datasets produced by this option will be saved in Galaxy's history as a collection_ - a single history element containing multiple datasets. 
+BAM datasets produced by this option will be saved in Galaxy's history as a collection_ - a single history element containing multiple datasets.
 
 -----
 
 **Extract data from already uploaded SRA dataset**
 
-If a SRA dataset is present in the history, it can be converted into BAM dataset by setting **select input type** drop-down to *SRA archive in current history*. Just like in the case of extracting data for single accession number a single BAM dataset will be generated in the history. 
+If a SRA dataset is present in the history, it can be converted into BAM dataset by setting **select input type** drop-down to *SRA archive in current history*. Just like in the case of extracting data for single accession number a single BAM dataset will be generated in the history.
 
 @ACCESSION_LIST_HOWTO@
 
--- a/sra_macros.xml	Wed Oct 17 11:44:12 2018 -0400
+++ b/sra_macros.xml	Tue Dec 04 15:00:55 2018 -0500
@@ -15,6 +15,7 @@
     <macro name="requirements">
         <requirements>
             <requirement type="package" version="2.9.1">sra-tools</requirement>
+            <requirement type="package" version="1.9">samtools</requirement>
         </requirements>
     </macro>
     <macro name="sanitize_query">
@@ -79,7 +80,7 @@
 **How to generate accession lists**
 
  1. Go to **SRA Run Selector** by clicking this link_
- 2. Find the study you are interested in by typing a search term within the **Search** box. This can be a word (e.g., *mitochondria*) or an accession you have gotten from a paper (e.g., *SRR1582967*). 
+ 2. Find the study you are interested in by typing a search term within the **Search** box. This can be a word (e.g., *mitochondria*) or an accession you have gotten from a paper (e.g., *SRR1582967*).
  3. Once you click on the study of interest you will see the number of datasets in this study within the **Related SRA data** box
  4. Click on the Runs number
  5. On the page that would open you will see **Accession List** button