comparison SNV/SNVMix2_source/SNVMix2-v0.12.1-rc1/notes.h @ 0:74f5ea818cea

Uploaded
author ryanmorin
date Wed, 12 Oct 2011 19:50:38 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:74f5ea818cea
1 /*
2 * File: notes.h
3 * Author: rgoya
4 *
5 * Created on February 3, 2010, 12:37 PM
6 */
7
8 /*! @typedef
9 @abstract Structure for one alignment covering the pileup position.
10 @field b pointer to the alignment
11 @field qpos position of the read base at the pileup site, 0-based
12 @field indel indel length; 0 for no indel, positive for ins and negative for del
13 @field is_del 1 iff the base on the padded read is a deletion
14 @field level the level of the read in the "viewer" mode
15
16 @discussion See also bam_plbuf_push() and bam_lplbuf_push(). The
17 difference between the two functions is that the former does not
18 set bam_pileup1_t::level, while the later does. Level helps the
19 implementation of alignment viewers, but calculating this has some
20 overhead.
21 */
22 typedef struct {
23 bam1_t *b;
24 int32_t qpos;
25 int indel, level;
26 uint32_t is_del:1, is_head:1, is_tail:1;
27 } bam_pileup1_t;
28
29 /*! @typedef
30 @abstract Structure for core alignment information.
31 @field tid chromosome ID, defined by bam_header_t
32 @field pos 0-based leftmost coordinate
33 @field strand strand; 0 for forward and 1 otherwise
34 @field bin bin calculated by bam_reg2bin()
35 @field qual mapping quality
36 @field l_qname length of the query name
37 @field flag bitwise flag
38 @field n_cigar number of CIGAR operations
39 @field l_qseq length of the query sequence (read)
40 */
41 typedef struct {
42 int32_t tid;
43 int32_t pos;
44 uint32_t bin:16, qual:8, l_qname:8;
45 uint32_t flag:16, n_cigar:16;
46 int32_t l_qseq;
47 int32_t mtid;
48 int32_t mpos;
49 int32_t isize;
50 } bam1_core_t;
51
52 /*! @typedef
53 @abstract Structure for one alignment.
54 @field core core information about the alignment
55 @field l_aux length of auxiliary data
56 @field data_len current length of bam1_t::data
57 @field m_data maximum length of bam1_t::data
58 @field data all variable-length data, concatenated; structure: cigar-qname-seq-qual-aux
59
60 @discussion Notes:
61
62 1. qname is zero tailing and core.l_qname includes the tailing '\0'.
63 2. l_qseq is calculated from the total length of an alignment block
64 on reading or from CIGAR.
65 */
66 typedef struct {
67 bam1_core_t core;
68 int l_aux, data_len, m_data;
69 uint8_t *data;
70 } bam1_t;
71
72
73 /*! @typedef
74 @abstract Structure for one alignment covering the pileup position.
75 @field b pointer to the alignment
76 @field qpos position of the read base at the pileup site, 0-based
77 @field indel indel length; 0 for no indel, positive for ins and negative for del
78 @field is_del 1 iff the base on the padded read is a deletion
79 @field level the level of the read in the "viewer" mode
80
81 @discussion See also bam_plbuf_push() and bam_lplbuf_push(). The
82 difference between the two functions is that the former does not
83 set bam_pileup1_t::level, while the later does. Level helps the
84 implementation of alignment viewers, but calculating this has some
85 overhead.
86 */
87 typedef struct {
88 bam1_t *b;
89 int32_t qpos;
90 int indel, level;
91 uint32_t is_del:1, is_head:1, is_tail:1;
92 } bam_pileup1_t;