File: SAM_entry.hpp

package info (click to toggle)
trinityrnaseq 2.11.0%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 417,528 kB
  • sloc: perl: 48,420; cpp: 17,749; java: 12,695; python: 3,124; sh: 1,030; ansic: 983; makefile: 688; xml: 62
file content (87 lines) | stat: -rw-r--r-- 1,525 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef __SAM_ENTRY__

#define __SAM_ENTRY__

#include <string>
#include <vector>
#include <utility>

typedef struct {
    unsigned long genome_lend;
    unsigned long genome_rend;
    
    unsigned long query_lend;
    unsigned long query_rend;
    
} alignment_segment;



using namespace std;

class SAM_entry {
    
public:
    
    SAM_entry(string sam_line);
    
    string get_sam_string();
    
    string toString();
    
    string get_read_name();
    
    string get_full_read_name();
    
    string get_scaffold_name();
    
    unsigned long get_scaffold_position();
    
    void set_scaffold_position(unsigned long position);
    
    unsigned int get_mapping_quality();
    
    string get_cigar_alignment();
    
    void set_cigar_alignment(string cigar_string);
    
    vector<alignment_segment> get_alignment_coords();
    
    string get_mate_scaffold_name();
    
    unsigned long get_mate_scaffold_position();
    
    string get_sequence();
    
    string get_quality_scores();
    
    unsigned int get_flag();
    
    bool is_paired();
    
    bool is_proper_pair();
    
    bool is_query_unmapped();
    
    bool is_mate_unmapped();
    
    char get_query_strand();
    
    char get_query_transcribed_strand(); // takes into account strand-specific sequencing and left/right pair info assuming our dUTP protocol.
    
    char get_mate_strand();
    
    bool is_first_in_pair();
    
    bool is_second_in_pair();
    
private:
  string line;
  vector<string> tokens;
  

};


#endif