diff sam_dump.xml @ 7:c7620aa7e1f0 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit d1347141d384ed404f674d7ce408b6769e763ea1
author iuc
date Wed, 10 May 2017 10:45:41 -0400
parents 62e4d56ebb6f
children 6c60903f70ac
line wrap: on
line diff
--- a/sam_dump.xml	Wed Mar 22 05:23:31 2017 -0400
+++ b/sam_dump.xml	Wed May 10 10:45:41 2017 -0400
@@ -1,5 +1,5 @@
-<tool id="sam_dump" name="Extract reads" version="@VERSION@">
-    <description>in SAM or BAM format from NCBI SRA.</description>
+<tool id="sam_dump" name="Extract reads in BAM" version="@VERSION@.2">
+    <description>format from NCBI SRA</description>
     <macros>
         <import>sra_macros.xml</import>
     </macros>
@@ -11,7 +11,7 @@
       for acc in `cat $input.file_list` ;
       do
     #elif $input.input_select=="accession_number":
-      acc="$input.accession" &&
+      acc="${input.accession}" &&
     #end if
 
     #if $input.input_select=="file_list" or $input.input_select=="accession_number":
@@ -91,7 +91,7 @@
     </command>
     <inputs>
         <expand macro="input_conditional"/>
-        <param name="outputformat" type="select" label="select output format">
+        <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.">
             <option value="bam">bam</option>
             <option value="sam">sam</option>
         </param>
@@ -113,18 +113,18 @@
         </section>
     </inputs>
     <outputs>
-        <collection name="output_collection" type='list'>
+        <collection name="output_collection" type="list" label="SAM/BAM data (fastq-dump)">
           <filter>input['input_select'] == "file_list"</filter>
           <discover_datasets pattern="(?P&lt;designation&gt;.+)\.bam" directory="." ext='bam'/>
           <discover_datasets pattern="(?P&lt;designation&gt;.+)\.sam" directory="." ext='sam'/>
         </collection>
-        <data name="output_accession" format="bam" label="${input.accession}.${outputformat}">
+        <data name="output_accession" format="bam" label="${input.accession} (sam-dump)">
             <filter>input['input_select'] == "accession_number"</filter>
             <change_format>
                 <when input="outputformat" value="sam" format="sam"/>
             </change_format>
         </data>
-        <data name="output_file" format="bam" label="${input.file.name}.${outputformat}">
+        <data name="output_file" format="bam" label="${input.file.name} (sam-dump)">
             <filter>input['input_select'] == "file"</filter>
             <change_format>
                 <when input="outputformat" value="sam" format="sam"/>
@@ -140,11 +140,59 @@
             <output name="output_accession" file="sam_dump_result.sam" compare="contains" ftype="sam"/>
         </test>
     </tests>
-    <help>
-        This tool extracts reads from sra archives using sam-dump.
-        The sam-dump program is developed at NCBI, and is available at
-        http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
-        @SRATOOLS_ATTRRIBUTION@
-    </help>
+    <help><![CDATA[
+**What it does?**
+
+This tool extracts data (in BAM_ format) from the Short Read Archive (SRA) at the National Center for Biotechnology Information (NCBI). It is based on the sam-dump_ utility of the SRA Toolkit.
+
+**How to use it?**
+
+There are three ways in which you can download data:
+
+ 1. Data for single accession
+ 2. Multiple datasets using a list of accessions
+ 3. Extract data from already uploaded SRA dataset
+
+Below we discuss each in detail.
+
+------
+
+**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. 
+
+-----
+
+**Uploading multiple datasets using a list of accessions**
+
+A more realistic scenario is when you want to upload a number of datasets at once. To do this you need a list of accession, where there is only one accession per line (see below for information on how to generate such a file). Once you have this file:
+
+ 1. Upload it into your history using Galaxy's upload tool
+ 2. Once the list of accessions is uploaded choose *List of SRA accessions, one per line* from **select input type** dropdown
+ 3. Choose uploaded file within the **sra accession list** field
+ 4. Click **Execute**
+
+.. 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. 
+
+-----
+
+**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. 
+
+@ACCESSION_LIST_HOWTO@
+
+-----
+
+.. _BAM: https://samtools.github.io/hts-specs/SAMv1.pdf
+.. _sam-dump: http://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
+
+
+@SRATOOLS_ATTRRIBUTION@
+    ]]></help>
     <expand macro="citation"/>
 </tool>