ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/fqtrim/fqtrim.cpp
(Generate patch)
# Line 94 | Line 94
94   int qv_cvtadd=0; //could be -31 or +31
95  
96   // adaptor matching metrics -- for X-drop ungapped extension
97 + //const int match_reward=2;
98 + //const int mismatch_penalty=3;
99   const int match_reward=2;
100 < const int mismatch_penalty=3;
101 < const int Xdrop=8;
100 > const int mismatch_penalty=4;
101 > const int Xdrop=10;
102  
103   const int poly_m_score=2; //match score
104   const int poly_mis_score=-3; //mismatch
# Line 324 | Line 326
326    char* infile=NULL;
327  
328    if (adapters5.Count()>0)
329 <    gxmem_l=new CGreedyAlignData(match_reward, mismatch_penalty, Xdrop-2);
329 >    //gxmem_l=new CGreedyAlignData(match_reward, mismatch_penalty, Xdrop-2);
330 >        gxmem_l=new CGreedyAlignData(match_reward, mismatch_penalty, Xdrop);
331    if (adapters3.Count()>0)
332      gxmem_r=new CGreedyAlignData(match_reward, mismatch_penalty, Xdrop);
333  
# Line 991 | Line 994
994    GXAlnInfo* bestaln=match_LeftEnd(seqdata, gxmem_l, 90);
995    if (bestaln) {
996       trimmed=true;
997 <     if (bestaln->sl > wlen-bestaln->sr) {
997 >     if (bestaln->sl-1 > wlen-bestaln->sr) {
998           //keep left side
999           l3-=(wlen-bestaln->sl+1);
1000           if (l3<0) l3=0;
# Line 1077 | Line 1080
1080  
1081   #ifdef GDEBUG
1082   void showTrim(GStr& s, int l5, int l3) {
1083 <  if (l5>0) {
1083 >  if (l5>0 || l3==0) {
1084      color_bg(c_red);
1085      }
1086    for (int i=0;i<s.length()-1;i++) {
1087      if (i && i==l5) color_resetbg();
1088      fprintf(stderr, "%c", s[i]);
1089 <    if (i==l3) color_bg(c_red);
1089 >    if (i && i==l3) color_bg(c_red);
1090     }
1091    fprintf(stderr, "%c", s[s.length()-1]);
1092    color_reset();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines