ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/GBam.h
(Generate patch)
# Line 24 | Line 24
24  
25   public:
26     GPVec<GSeg> exons;
27 <   GBamRecord(bam1_t* from_b=NULL, bam_header_t* b_header=NULL):exons() {
27 >   GBamRecord(bam1_t* from_b=NULL, bam_header_t* b_header=NULL):exons(1) {
28        bam_header=NULL;
29        if (from_b==NULL) {
30             b=bam_init1();
# Line 105 | Line 105
105   bool isUnmapped() { return ((b->core.flag & BAM_FUNMAP) != 0); }
106   bool isMapped() { return ((b->core.flag & BAM_FUNMAP) == 0); }
107   bool isPaired() { return ((b->core.flag & BAM_FPAIRED) != 0); }
108 + const char* name() { return bam1_qname(b); }
109   int mateNum() {
110      int r=0;
111      if ((b->core.flag & BAM_FREAD1) != 0) r=1;
112      else if ((b->core.flag & BAM_FREAD2) != 0) r=2;
113      return r;
114      }
115 < bool onRevStrand() { return ((b->core.flag & BAM_FREVERSE) != 0); }
115 > bool revStrand() { return ((b->core.flag & BAM_FREVERSE) != 0); }
116   const char* refName() {
117       return (bam_header!=NULL) ? bam_header->target_name[b->core.tid] : NULL;
118       }
119   int32_t refId() { return b->core.tid; }
120  
121 < uint8_t* tag(const char tag[2]); //retrieves tag data
122 < int tag_int(const char tag[2]); //get the numeric value of tag (if it's numeric)
123 < char spliceStrand(); // '+', '-' from the XS tag, or 0 if no XS tag
121 > int find_tag(const char tag[2], uint8_t* & s, char& tag_type);
122 > char* tag_str(const char tag[2]); //return tag value for tag type 'Z'
123 > int tag_int(const char tag[2]); //return numeric value of tag (for numeric types)
124 > char tag_char(const char tag[2]); //return char value of tag (for type 'A')
125 > char spliceStrand(); // '+', '-' from the XS tag, or '.' if no XS tag
126   char* sequence(); //user must free this after use
127   char* qualities();//user must free this after use
128   char* cigar(); //returns text version of the CIGAR string; must be freed by user

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines