comparison sam_dump.xml @ 0:68527898a9ea draft

planemo upload for repository https://bitbucket.org/drosofff/gedtools/ commit 92d32947393757598262fbaed175b2c6fd84c181
author mvdbeek
date Fri, 25 Sep 2015 09:28:56 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:68527898a9ea
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( $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( $region ) != "":
27 --aligned-region "$region"
28 #end if
29 #if str( $matepairDist ) != "":
30 --matepair-distance "$matepairDist"
31 #end if
32 #if str( $minMapq ) != "":
33 --min-mapq "$minMapq"
34 #end if
35 #if str( $header ) == "yes":
36 --header
37 #else:
38 --no-header
39 #end if
40 #if str( $alignments ) == "both":
41 --unaligned
42 #end if
43 #if str( $alignments ) == "unaligned":
44 --unaligned-spots-only
45 #end if
46 #if (str( $primary ) == "yes") and (str ( $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 <param name="header" type="select" value="yes">
72 <label>output header</label>
73 <option value="yes">Yes</option>
74 <option value="no">No</option>
75 </param>
76 <expand macro="alignments"/>
77 <expand macro="region"/>
78 <expand macro="matepairDist"/>
79 <param name="primary" type="select" value="no">
80 <label>only primary aligments</label>
81 <option value="no">No</option>
82 <option value="yes">Yes</option>
83 </param>
84 <expand macro="minMapq"></expand>
85 </inputs>
86 <outputs>
87 <data name="output_accession" format="bam" label="${input.accession}.${outputformat}">
88 <filter>input['input_select'] == "accession_number"</filter>
89 <change_format>
90 <when input="outputformat" value="sam" format="sam"/>
91 </change_format>
92 </data>
93 <data name="output_file" format="bam" label="${input.file.name}.${outputformat}">
94 <filter>input['input_select'] == "file"</filter>
95 <change_format>
96 <when input="outputformat" value="sam" format="sam"/>
97 </change_format>
98 </data>
99 </outputs>
100 <tests>
101 <test>
102 <param name="input_select" value="accession_number"/>
103 <param name="accession" value="SRR925743"/>
104 <param name="outputformat" value="sam"/>
105 <param name="region" value="17:41243452-41277500"/>
106 <output name="output_accession" file="sam_dump_result.sam" ftype="sam"/>
107 </test>
108 </tests>
109 <help>
110 This tool extracts reads from sra archives using sam-dump.
111 The sam-dump program is developed at NCBI, and is available at
112 http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software.
113 @SRATOOLS_ATTRRIBUTION@
114 </help>
115 </tool>