ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/seqalign/GXAlign.h
(Generate patch)
# Line 137 | Line 137
137   };
138  
139  
140 /* ----- pool allocator ----- */
140   struct GX3Val {
141 <    int I, C, D;
141 >        int I, C, D;
142   };
143  
144 + // ----- pool allocator -----
145   struct GXAlnSpace {
146      GX3Val* space_array;
147      int used, size;
# Line 196 | Line 196
196   #define ERROR_FRACTION 6  // 1/this : the higher it is, the smaller the diagonal band
197  
198   struct GXAlnMem { //GreedyAlignMem
199 <  int** flast_d;
199 >  int** flast_d; //flast_d[][]
200    int* max_row_free;
201    int* uplow_free;
202    GXAlnSpace* space;
# Line 411 | Line 411
411     int b_ofs; //0-based coordinate on seq b (x coordinate)
412     int a_ofs; //0-based coordinate on seq a (y coordinate)
413     int len; //length of exact match after extension
414   bool edited; //if it's an edited (cut) seed
414     bool operator<(GXSeed& d){
415        return ((b_ofs==d.b_ofs) ? a_ofs<d.a_ofs : b_ofs<d.b_ofs);
416        }
# Line 424 | Line 423
423     GXSeed(int aofs=0, int bofs=0, int l=4) {
424       a_ofs=aofs;
425       b_ofs=bofs;
427     edited=false;
426       len=l;
427       }
428   };
429  
430 < int cmpSeedLen(const pointer s1, const pointer s2);
430 > int cmpSeedDiag(const pointer p1, const pointer p2);
431 >  //seeds are "equal" if they're on the same diagonal (for selection purposes only)
432 >
433 > int cmpSeedScore(const pointer p1, const pointer p2); //also takes position into account
434 >   //among seeds with same length, prefer those closer to the left end of the read (seq_b)
435  
436   struct GXBand {
437    //bundle of seed matches on 3 adjacent diagonals
# Line 529 | Line 531
531  
532   void printEditScript(GXEditScript* ed_script);
533  
534 +
535 + // reward MUST be >1, always
536   GXAlnInfo* GreedyAlignRegion(const char* q_seq, int q_alnstart, int q_max,
537                    const char* s_seq, int s_alnstart, int s_max,
538 <                     bool editscript=false, int reward=2, int penalty=-3, int xdrop=22);
538 >                     bool editscript=false, int reward=2, int penalty=-2, int xdrop=14);
539   GXAlnInfo* GreedyAlign(const char* q_seq,  int q_alnstart, const char* s_seq, int s_alnstart,
540 <        bool editscript=false, int reward=2, int penalty=-3, int xdrop=22);
540 >        bool editscript=false, int reward=2, int penalty=-2, int xdrop=14);
541  
542   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines