Commit 2d59131c authored by Mathieu Giraud's avatar Mathieu Giraud

core/dynprog.{h,cpp}: affine gaps: Cost constructor, VDJaffine

Affine gaps are enabled only when using some Costs such as VDJaffine.
parent 18616d4e
......@@ -50,8 +50,22 @@ Cost::Cost(int match, int mismatch, int indel, int del_end, int homopolymer)
this -> deletion_end = del_end ;
this -> homopolymer = (homopolymer == MINUS_INF ? indel: homopolymer);
this -> open_insertion = this -> open_deletion = -15 ;
this -> extend_insertion = this -> extend_deletion = -1 ;
this -> open_insertion = this -> open_deletion = MINUS_INF ;
this -> extend_insertion = this -> extend_deletion = MINUS_INF ;
this -> affine_gap = false ;
}
Cost::Cost(int match, int mismatch, int open_gap, int extend_gap, int del_end, int homopolymer)
{
this -> match = match ;
this -> mismatch = mismatch ;
this -> insertion = MINUS_INF ;
this -> deletion = MINUS_INF ;
this -> deletion_end = del_end ;
this -> homopolymer = homopolymer ;
this -> open_insertion = this -> open_deletion = open_gap ;
this -> extend_insertion = this -> extend_deletion = extend_gap ;
this -> affine_gap = true ;
}
......@@ -62,6 +76,8 @@ ostream& operator<<(ostream& out, const Cost& cost)
<< ", " << cost.mismatch
<< "/" << cost.insertion
<< "/" << cost.deletion
<< ", " << cost.open_insertion << cost.extend_insertion
<< "/" << cost.open_deletion << cost.extend_deletion
<< ", " << cost.deletion_end
<< ", " << cost.homopolymer
<< ")" ;
......
......@@ -35,6 +35,8 @@ class Cost
// del_end -> utilise seulement pour LocalEndWithSomeDeletions
Cost (int match, int mismatch, int indel, int del_end = 0, int homopolymer = MINUS_INF);
// affine gaps
Cost(int match, int mismatch, int open_gap, int extend_gap, int del_end, int homopolymer);
Cost ();
int insertion;
......@@ -63,6 +65,7 @@ ostream& operator<<(ostream& out, const Cost& cost);
const Cost DNA = Cost(+5, -4, -10, 0, 0);
const Cost VDJ = Cost(+4, -6, -10, -1, -2);
const Cost VDJaffine = Cost(+4, -6, -15, -1, -1, -2);
const Cost Identity = Cost(+1, -1, -1, 0, 0);
const Cost Homopolymers = Cost(+1, MINUS_INF, -1); // TODO: true homopolymer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment