Mercurial > repos > matt-shirley > ncbi_sra_toolkit
comparison bam_dump.xml @ 27:8be4f23d1018
Add bam-dump and test data.
author | Matt Shirley <mdshw5@gmail.com> |
---|---|
date | Mon, 30 Mar 2015 22:40:59 -0400 |
parents | |
children | fdc981664a43 |
comparison
equal
deleted
inserted
replaced
26:7d80b2b24270 | 27:8be4f23d1018 |
---|---|
1 <tool id="bam_dump" name="Extract reads" version="1.1.2"> | |
2 <description> in BAM format from NCBI SRA.</description> | |
3 <command> | |
4 sam-dump --log-level fatal | |
5 #if str( $region ) != "": | |
6 --aligned-region $region | |
7 #end if | |
8 #if str( $matepairDist ) != "": | |
9 --matepair-distance $matepairDist | |
10 #end if | |
11 #if str( $minMapq ) != "": | |
12 --minmapq $minMapq | |
13 #end if | |
14 #if $header == "yes": | |
15 --header | |
16 #else: | |
17 --no-header | |
18 #end if | |
19 #if str( $alignments ) == "both": | |
20 --unaligned | |
21 #end if | |
22 #if str( $alignments ) == "unaligned": | |
23 --unaligned-spots-only | |
24 #end if | |
25 #if (str( $primary ) == "yes") and (str ( $alignments != "unaligned") ): | |
26 --primary | |
27 #end if | |
28 #if $input.input_select == "file": | |
29 $input.file | |
30 #elif $input.input_select == "accession_number": | |
31 $input.accession | |
32 #elif $input.input_select == "text": | |
33 `cat $input.text` | |
34 #end if | |
35 | samtools view -Sb - > $output | |
36 </command> | |
37 <version_string>sam-dump --version</version_string> | |
38 <inputs> | |
39 <conditional name="input"> | |
40 <param name="input_select" type="select" label="select input type"> | |
41 <option value="accession_number">SRR accession</option> | |
42 <option value="file">SRA archive in current history</option> | |
43 <option value="text">text file containing SRR accession</option> | |
44 </param> | |
45 <when value="file"> | |
46 <param format="sra" name="file" type="data" label="sra archive"/> | |
47 </when> | |
48 <when value="accession_number"> | |
49 <param format="text" name="accession" type="text" label="accession"/> | |
50 </when> | |
51 <when value="text"> | |
52 <param format="txt" name="text" type="data" label="text file"/> | |
53 </when> | |
54 </conditional> | |
55 <param format="text" name="region" type="text" label="aligned region"/> | |
56 <param format="text" name="matepairDist" type="text" label="mate-pair distance (from-to|unknown)"/> | |
57 <param format="text" name="header" type="select" value="yes"> | |
58 <label>output BAM header</label> | |
59 <option value="yes">Yes</option> | |
60 <option value="no">No</option> | |
61 </param> | |
62 <param format="text" name="alignments" type="select" value="both"> | |
63 <label>aligned or unaligned reads</label> | |
64 <option value="both">both</option> | |
65 <option value="aligned">aligned only</option> | |
66 <option value="unaligned">unaligned only</option> | |
67 </param> | |
68 <param format="text" name="primary" type="select" value="no"> | |
69 <label>only primary aligments</label> | |
70 <option value="no">No</option> | |
71 <option value="yes">Yes</option> | |
72 </param> | |
73 <param format="text" name="minMapq" type="text" label="minimum mapping quality"/> | |
74 </inputs> | |
75 <outputs> | |
76 <data name="output" format="bam"/> | |
77 </outputs> | |
78 <requirements> | |
79 <requirement type="package" version="2.4.5">sra_toolkit</requirement> | |
80 <requirement type="package" version="1.2">samtools</requirement> | |
81 </requirements> | |
82 <help> | |
83 This tool extracts reads from sra archives using sam-dump. | |
84 Browse the NCBI SRA for SRR accessions at http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies. | |
85 The sam-dump program is developed at NCBI, and is available at: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software. | |
86 Contact Matt Shirley at mdshw5@gmail.com for support and bug reports. | |
87 </help> | |
88 </tool> |