annotate tools/samtools/sam2interval.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="sam2interval" name="Convert SAM" version="1.0.1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>to interval</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">sam2interval.py --input_sam_file=$input1 $print_all > $out_file1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <param format="sam" name="input1" type="data" label="Select dataset to convert"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 <param name="print_all" type="select" label="Print all?" help="Do you want to retain original SAM fields? See example below.">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <option value="-p">Yes</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <option value="">No</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <data format="interval" name="out_file1" label="Converted Interval" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <param name="input1" value="sam_bioinf_example.sam" ftype="sam"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <param name="print_all" value="Yes"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <output name="out_file1" file="sam2interval_printAll.dat" ftype="interval"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <param name="input1" value="sam_bioinf_example.sam" ftype="sam"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <param name="print_all" value="No"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <output name="out_file1" file="sam2interval_noprintAll.dat" ftype="interval"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <param name="input1" value="sam2interval-test3.sam" ftype="sam"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <param name="print_all" value="No"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <output name="out_file1" file="sam2interval_with_unmapped_reads_noprintAll.dat" ftype="interval"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 Converts positional information from a SAM dataset into interval format with 0-based start and 1-based end. CIGAR string of SAM format is used to compute the end coordinate.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 **Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 Converting the following dataset::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 r001 163 ref 7 30 8M2I4M1D3M = 37 39 TTAGATAAAGGATACTA *
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 r002 0 ref 9 30 3S6M1P1I4M * 0 0 AAAAGATAAGGATA *
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 r003 0 ref 9 30 5H6M * 0 0 AGCTAA * NM:i:1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 r004 0 ref 16 30 6M14N5M * 0 0 ATAGCTTCAGC *
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 r003 16 ref 29 30 6H5M * 0 0 TAGGC * NM:i:0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 r001 83 ref 37 30 9M = 7 -39 CAGCGCCAT *
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 into Interval format will produce the following if *Print all?* is set to **Yes**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 ref 6 22 + r001 163 ref 7 30 8M2I4M1D3M = 37 39 TTAGATAAAGGATACTA *
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 ref 8 19 + r002 0 ref 9 30 3S6M1P1I4M * 0 0 AAAAGATAAGGATA *
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 ref 8 14 + r003 0 ref 9 30 5H6M * 0 0 AGCTAA * NM:i:1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 ref 15 40 + r004 0 ref 16 30 6M14N5M * 0 0 ATAGCTTCAGC *
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 ref 28 33 - r003 16 ref 29 30 6H5M * 0 0 TAGGC * NM:i:0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 ref 36 45 - r001 83 ref 37 30 9M = 7 -39 CAGCGCCAT *
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 Setting *Print all?* to **No** will generate the following::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 ref 6 22 + r001
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 ref 8 19 + r002
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 ref 8 14 + r003
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 ref 15 40 + r004
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 ref 28 33 - r003
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 ref 36 45 - r001
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 </tool>