ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/gff.h
(Generate patch)
# Line 98 | Line 98
98         num_parents=0;
99         parents=NULL;
100         }
101 <    char* extractAttr(const char* pre, bool caseStrict=true, bool enforce_GTF2=false);
101 >    char* extractAttr(const char* pre, bool caseStrict=false, bool enforce_GTF2=false);
102      GffLine(GffLine* l) { //a copy constructor
103        memcpy((void*)this, (void*)l, sizeof(GffLine));
104        line=NULL;
# Line 608 | Line 608
608       if (sid==gff_fid_exon && isCDS) sid=gff_fid_CDS;
609       return names->feats.getName(sid);
610       }
611 +   void addCDS(uint cd_start, uint cd_end, char phase=0);
612 +  
613     bool monoFeature() {
614       return (exons.Count()==0 ||
615 <          (exons.Count()==1 && exon_ftype_id==ftype_id));
615 >          (exons.Count()==1 &&  //exon_ftype_id==ftype_id &&
616 >              exons[0]->end==this->end && exons[0]->start==this->start));
617       }
618  
619     bool hasCDS() { return (CDstart>0); }
# Line 671 | Line 674
674       }
675     bool exonOverlap(uint s, uint e) {//check if ANY exon overlaps given segment
676        //ignores strand!
677 <      if (s>e) swap(s,e);
677 >      if (s>e) Gswap(s,e);
678        for (int i=0;i<exons.Count();i++) {
679           if (exons[i]->overlap(s,e)) return true;
680           }
# Line 694 | Line 697
697      int exonOverlapIdx(uint s, uint e, int* ovlen=NULL) {
698        //return the exons' index for the overlapping OR ADJACENT exon
699        //ovlen, if given, will return the overlap length
700 <      if (s>e) swap(s,e);
700 >      if (s>e) Gswap(s,e);
701        s--;e++; //to also catch adjacent exons
702        for (int i=0;i<exons.Count();i++) {
703              if (exons[i]->start>e) break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines