Mercurial > repos > devteam > sam2interval
comparison sam2interval.xml @ 0:71c1ee1ef131 draft
Uploaded
| author | devteam |
|---|---|
| date | Tue, 20 Aug 2013 12:32:17 -0400 |
| parents | |
| children | 2c13da4885e2 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:71c1ee1ef131 |
|---|---|
| 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" label="Converted Interval" /> | |
| 14 </outputs> | |
| 15 <tests> | |
| 16 <test> | |
| 17 <param name="input1" value="sam_bioinf_example.sam" ftype="sam"/> | |
| 18 <param name="print_all" value="Yes"/> | |
| 19 <output name="out_file1" file="sam2interval_printAll.dat" ftype="interval"/> | |
| 20 </test> | |
| 21 <test> | |
| 22 <param name="input1" value="sam_bioinf_example.sam" ftype="sam"/> | |
| 23 <param name="print_all" value="No"/> | |
| 24 <output name="out_file1" file="sam2interval_noprintAll.dat" ftype="interval"/> | |
| 25 </test> | |
| 26 <test> | |
| 27 <param name="input1" value="sam2interval-test3.sam" ftype="sam"/> | |
| 28 <param name="print_all" value="No"/> | |
| 29 <output name="out_file1" file="sam2interval_with_unmapped_reads_noprintAll.dat" ftype="interval"/> | |
| 30 </test> | |
| 31 | |
| 32 </tests> | |
| 33 <help> | |
| 34 | |
| 35 **What it does** | |
| 36 | |
| 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. | |
| 38 | |
| 39 ----- | |
| 40 | |
| 41 **Example** | |
| 42 | |
| 43 Converting the following dataset:: | |
| 44 | |
| 45 r001 163 ref 7 30 8M2I4M1D3M = 37 39 TTAGATAAAGGATACTA * | |
| 46 r002 0 ref 9 30 3S6M1P1I4M * 0 0 AAAAGATAAGGATA * | |
| 47 r003 0 ref 9 30 5H6M * 0 0 AGCTAA * NM:i:1 | |
| 48 r004 0 ref 16 30 6M14N5M * 0 0 ATAGCTTCAGC * | |
| 49 r003 16 ref 29 30 6H5M * 0 0 TAGGC * NM:i:0 | |
| 50 r001 83 ref 37 30 9M = 7 -39 CAGCGCCAT * | |
| 51 | |
| 52 into Interval format will produce the following if *Print all?* is set to **Yes**:: | |
| 53 | |
| 54 ref 6 22 + r001 163 ref 7 30 8M2I4M1D3M = 37 39 TTAGATAAAGGATACTA * | |
| 55 ref 8 19 + r002 0 ref 9 30 3S6M1P1I4M * 0 0 AAAAGATAAGGATA * | |
| 56 ref 8 14 + r003 0 ref 9 30 5H6M * 0 0 AGCTAA * NM:i:1 | |
| 57 ref 15 40 + r004 0 ref 16 30 6M14N5M * 0 0 ATAGCTTCAGC * | |
| 58 ref 28 33 - r003 16 ref 29 30 6H5M * 0 0 TAGGC * NM:i:0 | |
| 59 ref 36 45 - r001 83 ref 37 30 9M = 7 -39 CAGCGCCAT * | |
| 60 | |
| 61 Setting *Print all?* to **No** will generate the following:: | |
| 62 | |
| 63 ref 6 22 + r001 | |
| 64 ref 8 19 + r002 | |
| 65 ref 8 14 + r003 | |
| 66 ref 15 40 + r004 | |
| 67 ref 28 33 - r003 | |
| 68 ref 36 45 - r001 | |
| 69 | |
| 70 | |
| 71 </help> | |
| 72 </tool> |
