comparison 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
comparison
equal deleted inserted replaced
6:30775c836c77 7:c7620aa7e1f0
1 <tool id="sam_dump" name="Extract reads" version="@VERSION@"> 1 <tool id="sam_dump" name="Extract reads in BAM" version="@VERSION@.2">
2 <description>in SAM or BAM format from NCBI SRA.</description> 2 <description>format from NCBI SRA</description>
3 <macros> 3 <macros>
4 <import>sra_macros.xml</import> 4 <import>sra_macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
7 <version_command>sam-dump --version</version_command> 7 <version_command>sam-dump --version</version_command>
9 <![CDATA[ 9 <![CDATA[
10 #if $input.input_select=="file_list": 10 #if $input.input_select=="file_list":
11 for acc in `cat $input.file_list` ; 11 for acc in `cat $input.file_list` ;
12 do 12 do
13 #elif $input.input_select=="accession_number": 13 #elif $input.input_select=="accession_number":
14 acc="$input.accession" && 14 acc="${input.accession}" &&
15 #end if 15 #end if
16 16
17 #if $input.input_select=="file_list" or $input.input_select=="accession_number": 17 #if $input.input_select=="file_list" or $input.input_select=="accession_number":
18 [ ""\$acc" =~ ^[E|S|D]RR[0-9]{1,}$" ] && ( 18 [ ""\$acc" =~ ^[E|S|D]RR[0-9]{1,}$" ] && (
19 #end if 19 #end if
89 89
90 ]]> 90 ]]>
91 </command> 91 </command>
92 <inputs> 92 <inputs>
93 <expand macro="input_conditional"/> 93 <expand macro="input_conditional"/>
94 <param name="outputformat" type="select" label="select output format"> 94 <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.">
95 <option value="bam">bam</option> 95 <option value="bam">bam</option>
96 <option value="sam">sam</option> 96 <option value="sam">sam</option>
97 </param> 97 </param>
98 <section name="adv" title="Advanced Options" expanded="False"> 98 <section name="adv" title="Advanced Options" expanded="False">
99 <param name="header" type="select" value="yes"> 99 <param name="header" type="select" value="yes">
111 </param> 111 </param>
112 <expand macro="minMapq"></expand> 112 <expand macro="minMapq"></expand>
113 </section> 113 </section>
114 </inputs> 114 </inputs>
115 <outputs> 115 <outputs>
116 <collection name="output_collection" type='list'> 116 <collection name="output_collection" type="list" label="SAM/BAM data (fastq-dump)">
117 <filter>input['input_select'] == "file_list"</filter> 117 <filter>input['input_select'] == "file_list"</filter>
118 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.bam" directory="." ext='bam'/> 118 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.bam" directory="." ext='bam'/>
119 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.sam" directory="." ext='sam'/> 119 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.sam" directory="." ext='sam'/>
120 </collection> 120 </collection>
121 <data name="output_accession" format="bam" label="${input.accession}.${outputformat}"> 121 <data name="output_accession" format="bam" label="${input.accession} (sam-dump)">
122 <filter>input['input_select'] == "accession_number"</filter> 122 <filter>input['input_select'] == "accession_number"</filter>
123 <change_format> 123 <change_format>
124 <when input="outputformat" value="sam" format="sam"/> 124 <when input="outputformat" value="sam" format="sam"/>
125 </change_format> 125 </change_format>
126 </data> 126 </data>
127 <data name="output_file" format="bam" label="${input.file.name}.${outputformat}"> 127 <data name="output_file" format="bam" label="${input.file.name} (sam-dump)">
128 <filter>input['input_select'] == "file"</filter> 128 <filter>input['input_select'] == "file"</filter>
129 <change_format> 129 <change_format>
130 <when input="outputformat" value="sam" format="sam"/> 130 <when input="outputformat" value="sam" format="sam"/>
131 </change_format> 131 </change_format>
132 </data> 132 </data>
138 <param name="outputformat" value="sam"/> 138 <param name="outputformat" value="sam"/>
139 <param name="region" value="17:41243452-41277500"/> 139 <param name="region" value="17:41243452-41277500"/>
140 <output name="output_accession" file="sam_dump_result.sam" compare="contains" ftype="sam"/> 140 <output name="output_accession" file="sam_dump_result.sam" compare="contains" ftype="sam"/>
141 </test> 141 </test>
142 </tests> 142 </tests>
143 <help> 143 <help><![CDATA[
144 This tool extracts reads from sra archives using sam-dump. 144 **What it does?**
145 The sam-dump program is developed at NCBI, and is available at 145
146 http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software. 146 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.
147 @SRATOOLS_ATTRRIBUTION@ 147
148 </help> 148 **How to use it?**
149
150 There are three ways in which you can download data:
151
152 1. Data for single accession
153 2. Multiple datasets using a list of accessions
154 3. Extract data from already uploaded SRA dataset
155
156 Below we discuss each in detail.
157
158 ------
159
160 **Uploading data for a single accession**
161
162 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.
163
164 -----
165
166 **Uploading multiple datasets using a list of accessions**
167
168 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:
169
170 1. Upload it into your history using Galaxy's upload tool
171 2. Once the list of accessions is uploaded choose *List of SRA accessions, one per line* from **select input type** dropdown
172 3. Choose uploaded file within the **sra accession list** field
173 4. Click **Execute**
174
175 .. class:: warningmark
176
177 BAM datasets produced by this option will be saved in Galaxy's history as a collection_ - a single history element containing multiple datasets.
178
179 -----
180
181 **Extract data from already uploaded SRA dataset**
182
183 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.
184
185 @ACCESSION_LIST_HOWTO@
186
187 -----
188
189 .. _BAM: https://samtools.github.io/hts-specs/SAMv1.pdf
190 .. _sam-dump: http://ncbi.github.io/sra-tools/sam-dump.html
191 .. _collection: https://galaxyproject.org/tutorials/collections/
192 .. _link: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies
193
194
195 @SRATOOLS_ATTRRIBUTION@
196 ]]></help>
149 <expand macro="citation"/> 197 <expand macro="citation"/>
150 </tool> 198 </tool>