comparison sam_dump.xml @ 0:b723c120161a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit d555f296be01d0c0fa5ac28d28a48cf4ada98297
author iuc
date Sun, 06 Dec 2015 09:04:37 -0500
parents
children 462ee06c9358
comparison
equal deleted inserted replaced
-1:000000000000 0:b723c120161a
1 <tool id="sam_dump" name="Extract reads" version="1.2.5">
2 <description>in SAM or BAM format from NCBI SRA.</description>
3 <macros>
4 <import>sra_macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <version_command>sam-dump --version</version_command>
8 <command>
9 <![CDATA[
10 ## Need to set the home directory to the current working directory,
11 ## else the tool tries to write to home/.ncbi and fails when used
12 ## with a cluster manager.
13 export HOME=\$PWD &&
14 vdb-config --restore-defaults &&
15 vdb-config -s "/repository/user/main/public/root=\$PWD" &&
16 ## Do not use prefetch if region is specified, to avoid downloading
17 ## the complete sra file.
18 #if ( str( $adv.region ) == "" ):
19 ASCP_PATH=`command -v ascp` &&
20 ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh || true &&
21 prefetch --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "$input.accession" &&
22 ## Duplicate vdb-config, in case settings changed between prefetch and
23 ## dump command.
24 vdb-config -s "/repository/user/main/public/root=\$PWD" &&
25 #end if
26 sam-dump --log-level fatal --disable-multithreading
27 #if str( $adv.region ) != "":
28 --aligned-region "$adv.region"
29 #end if
30 #if str( $adv.matepairDist ) != "":
31 --matepair-distance "$adv.matepairDist"
32 #end if
33 #if str( $adv.minMapq ) != "":
34 --min-mapq "$adv.minMapq"
35 #end if
36 #if str( $adv.header ) == "yes":
37 --header
38 #else:
39 --no-header
40 #end if
41 #if str( $adv.alignments ) == "both":
42 --unaligned
43 #end if
44 #if str( $adv.alignments ) == "unaligned":
45 --unaligned-spots-only
46 #end if
47 #if (str( $adv.primary ) == "yes") and (str ( $adv.alignments != "unaligned") ):
48 --primary
49 #end if
50 #if $input.input_select == "file":
51 "$input.file"
52 #elif $input.input_select == "accession_number":
53 "$input.accession"
54 #end if
55 #if str( $outputformat ) == "bam":
56 | samtools view -Sb - 2> /dev/null
57 #end if
58 #if $input.input_select == "file":
59 > "$output_file"
60 #elif $input.input_select == "accession_number":
61 > "$output_accession"
62 #end if
63 ]]>
64 </command>
65 <inputs>
66 <expand macro="input_conditional"/>
67 <param name="outputformat" type="select" label="select output format">
68 <option value="bam">bam</option>
69 <option value="sam">sam</option>
70 </param>
71 <section name="adv" title="Advanced Options" expanded="False">
72 <param name="header" type="select" value="yes">
73 <label>output header</label>
74 <option value="yes">Yes</option>
75 <option value="no">No</option>
76 </param>
77 <expand macro="alignments"/>
78 <expand macro="region"/>
79 <expand macro="matepairDist"/>
80 <param name="primary" type="select" value="no">
81 <label>only primary aligments</label>
82 <option value="no">No</option>
83 <option value="yes">Yes</option>
84 </param>
85 <expand macro="minMapq"></expand>
86 </section>
87 </inputs>
88 <outputs>
89 <data name="output_accession" format="bam" label="${input.accession}.${outputformat}">
90 <filter>input['input_select'] == "accession_number"</filter>
91 <change_format>
92 <when input="outputformat" value="sam" format="sam"/>
93 </change_format>
94 </data>
95 <data name="output_file" format="bam" label="${input.file.name}.${outputformat}">
96 <filter>input['input_select'] == "file"</filter>
97 <change_format>
98 <when input="outputformat" value="sam" format="sam"/>
99 </change_format>
100 </data>
101 </outputs>
102 <tests>
103 <test>
104 <param name="input_select" value="accession_number"/>
105 <param name="accession" value="SRR925743"/>
106 <param name="outputformat" value="sam"/>
107 <param name="region" value="17:41243452-41277500"/>
108 <output name="output_accession" file="sam_dump_result.sam" compare="contains" ftype="sam"/>
109 </test>
110 </tests>
111 <help>
112 This tool extracts reads from sra archives using sam-dump.
113 The sam-dump program is developed at NCBI, and is available at
114 http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
115 @SRATOOLS_ATTRRIBUTION@
116 </help>
117 <expand macro="citation"/>
118 </tool>