ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/gff.h
(Generate patch)
# Line 136 | Line 136
136        ftype=NULL;
137        fstart=0;
138        fend=0;
139 +      strand=0;phase=0;
140 +      llen=0;score=0;
141        info=NULL;
142        _parents=NULL;
143        _parents_len=0;
# Line 223 | Line 225
225     int idx;
226   public:
227     char* name;
228 <   GffNameInfo() { name=NULL; idx=-1; }
229 <   GffNameInfo(const char* n) {
228 <     name=Gstrdup(n);
228 >   GffNameInfo(const char* n=NULL):idx(-1),name(NULL) {
229 >     if (n) name=Gstrdup(n);
230       }
231  
232     ~GffNameInfo() {
# Line 235 | Line 236
236     bool operator==(GffNameInfo& d){
237         return (strcmp(this->name, d.name)==0);
238         }
238   bool operator>(GffNameInfo& d){
239      return (strcmp(this->name, d.name)>0);
240      }
239     bool operator<(GffNameInfo& d){
240       return (strcmp(this->name, d.name)<0);
241       }
# Line 256 | Line 254
254       byName.shkAdd(f->name,f);
255       }
256   public:
257 < GffNameList():GList<GffNameInfo>(false,true,true), byName(false) {
257 > GffNameList(int init_capacity=6):GList<GffNameInfo>(init_capacity, false,true,true), byName(false) {
258      idlast=-1;
259 +    setCapacity(init_capacity);
260      }
261   char* lastNameUsed() { return idlast<0 ? NULL : Get(idlast)->name; }
262   int lastNameId() { return idlast; }
# Line 269 | Line 268
268  
269   int addName(const char* tname) {//returns or create an id for the given name
270     //check idlast first, chances are it's the same feature name checked
271 <   if (idlast>=0 && strcmp(fList[idlast]->name,tname)==0)
272 <       return idlast;
271 >   /*if (idlast>=0 && strcmp(fList[idlast]->name,tname)==0)
272 >       return idlast;*/
273     GffNameInfo* f=byName.Find(tname);
274     int fidx=-1;
275     if (f!=NULL) fidx=f->idx;
# Line 1023 | Line 1022
1022    //void gfoRemove(const char* id, const char* ctg);
1023    GfoHolder* gfoAdd(GffObj* gfo, int idx);
1024    GfoHolder* gfoAdd(GVec<GfoHolder>& glst, GffObj* gfo, int idx);
1025 <  GfoHolder* gfoFind(const char* id, const char* ctg=NULL, char strand=0, uint start=0,
1026 <                                                             GVec<GfoHolder>** glst = NULL);
1025 >  // const char* id, const char* ctg, char strand, GVec<GfoHolder>** glst, uint start, uint end
1026 >  GfoHolder* gfoFind(const char* id, const char* ctg=NULL, GVec<GfoHolder>** glst=NULL,
1027 >                                                 char strand=0, uint start=0, uint end=0);
1028    CNonExon* subfPoolCheck(GffLine* gffline, GHash<CNonExon>& pex, char*& subp_name);
1029    void subfPoolAdd(GHash<CNonExon>& pex, GfoHolder* newgfo);
1030    GfoHolder* promoteFeature(CNonExon* subp, char*& subp_name, GHash<CNonExon>& pex,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines