root/galaxy-central/tools/samtools/sam2interval.xml

リビジョン 2, 2.5 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1<tool id="sam2interval" name="Convert SAM" version="1.0.1">
2  <description>to interval</description>
3  <command interpreter="python">sam2interval.py --input_sam_file=$input1 $print_all > $out_file1
4  </command>
5  <inputs>
6    <param format="sam" name="input1" type="data" label="Select dataset to convert"/>
7    <param name="print_all" type="select" label="Print all?" help="Do you want to retain original SAM fields? See example below.">
8        <option value="-p">Yes</option>
9        <option value="">No</option>
10    </param>
11  </inputs>
12 <outputs>
13    <data format="interval" name="out_file1" />
14  </outputs>
15<tests>
16    <test>         
17        <param name="input1" value="sam_bioinf_example.sam" ftype="sam"/>
18        <param name="flags" value="Read is mapped in a proper pair"/>
19        <param name="print_all" value="Yes"/>
20        <output name="out_file1" file="sam2interval_printAll.dat" ftype="interval"/>
21    </test>
22    <test>         
23        <param name="input1" value="sam_bioinf_example.sam" ftype="sam"/>
24        <param name="flags" value="Read is mapped in a proper pair"/>
25        <param name="print_all" value="No"/>
26        <output name="out_file1" file="sam2interval_noprintAll.dat" ftype="interval"/>
27    </test>
28
29</tests>
30  <help>
31
32**What it does**
33
34Converts 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.
35
36-----
37
38**Example**
39
40Converting the following dataset::
41
42 r001 163 ref  7 30 8M2I4M1D3M = 37  39 TTAGATAAAGGATACTA *
43 r002   0 ref  9 30 3S6M1P1I4M *  0   0 AAAAGATAAGGATA    *
44 r003   0 ref  9 30       5H6M *  0   0 AGCTAA            * NM:i:1
45 r004   0 ref 16 30    6M14N5M *  0   0 ATAGCTTCAGC       *
46 r003  16 ref 29 30       6H5M *  0   0 TAGGC             * NM:i:0
47 r001  83 ref 37 30         9M =  7 -39 CAGCGCCAT         *
48
49into Interval format will produce the following if *Print all?* is set to **Yes**::
50
51 ref  6 22 + r001 163 ref  7 30 8M2I4M1D3M = 37  39 TTAGATAAAGGATACTA *
52 ref  8 19 + r002   0 ref  9 30 3S6M1P1I4M *  0   0 AAAAGATAAGGATA    *
53 ref  8 14 + r003   0 ref  9 30 5H6M       *  0   0 AGCTAA            * NM:i:1
54 ref 15 40 + r004   0 ref 16 30 6M14N5M    *  0   0 ATAGCTTCAGC       *
55 ref 28 33 - r003  16 ref 29 30 6H5M       *  0   0 TAGGC             * NM:i:0
56 ref 36 45 - r001  83 ref 37 30 9M         =  7 -39 CAGCGCCAT         *
57 
58Setting  *Print all?* to **No** will generate the following::
59
60 ref  6 22 + r001
61 ref  8 19 + r002
62 ref  8 14 + r003
63 ref 15 40 + r004
64 ref 28 33 - r003
65 ref 36 45 - r001
66
67
68  </help>
69</tool>
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。