comparison sam_dump.xml @ 0:9f74a22d2060 draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sra-tools commit 70fadb7e8972b1db550d0e067584930ce1ec8673-dirty
author mvdbeek
date Wed, 04 Nov 2015 06:57:32 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9f74a22d2060
1 <tool id="sam_dump" name="Extract reads" version="1.2.4">
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 <command>
8 <![CDATA[
9 ## Need to set the home directory to the current working directory,
10 ## else the tool tries to write to home/.ncbi and fails when used
11 ## with a cluster manager.
12 export HOME=\$PWD;
13 vdb-config --restore-defaults;
14 vdb-config -s "/repository/user/main/public/root=\$PWD";
15 ## Do not use prefetch if region is specified, to avoid downloading
16 ## the complete sra file.
17 #if ( str( $adv.region ) == "" ):
18 ASCP_PATH=`which ascp`;
19 ASCP_KEY=`dirname \$ASCP_PATH`/asperaweb_id_dsa.openssh;
20 prefetch --ascp-path "\$ASCP_PATH|\$ASCP_KEY" "$input.accession";
21 ##Duplicate vdb-config, in case settings changed between prefetch and
22 ##dump command.
23 #end if
24 vdb-config -s "/repository/user/main/public/root=\$PWD";
25 sam-dump --log-level fatal --disable-multithreading
26 #if str( $adv.region ) != "":
27 --aligned-region "$adv.region"
28 #end if
29 #if str( $adv.matepairDist ) != "":
30 --matepair-distance "$adv.matepairDist"
31 #end if
32 #if str( $adv.minMapq ) != "":
33 --min-mapq "$adv.minMapq"
34 #end if
35 #if str( $adv.header ) == "yes":
36 --header
37 #else:
38 --no-header
39 #end if
40 #if str( $adv.alignments ) == "both":
41 --unaligned
42 #end if
43 #if str( $adv.alignments ) == "unaligned":
44 --unaligned-spots-only
45 #end if
46 #if (str( $adv.primary ) == "yes") and (str ( $adv.alignments != "unaligned") ):
47 --primary
48 #end if
49 #if $input.input_select == "file":
50 "$input.file"
51 #elif $input.input_select == "accession_number":
52 "$input.accession"
53 #end if
54 #if str( $outputformat ) == "bam":
55 | samtools view -Sb - 2> /dev/null
56 #end if
57 #if $input.input_select == "file":
58 > "$output_file"
59 #elif $input.input_select == "accession_number":
60 > "$output_accession"
61 #end if
62 ]]>
63 </command>
64 <version_string>sam-dump --version</version_string>
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" 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 </tool>