Commit 1a05fe6a authored by Mathieu Giraud's avatar Mathieu Giraud

core/germline.{h,cpp}: each Germline store f_reps_[345] lists, new constructor

One may want to use several V (or D, or J) files for a unique germline, for example with TRDV + TRDD(D2).
(Now only the last file is really stored and indexed, but this will change soon.)
parent aaeea2c6
......@@ -9,6 +9,10 @@ Germline::Germline(string _code, char _shortcut,
shortcut = _shortcut ;
index = 0 ;
f_reps_5.push_back(f_rep_5);
f_reps_4.push_back(f_rep_4);
f_reps_3.push_back(f_rep_3);
affect_5 = "V" ;
affect_4 = "";
affect_3 = "J" ;
......@@ -24,6 +28,38 @@ Germline::Germline(string _code, char _shortcut,
}
Germline::Germline(string _code, char _shortcut,
list <string> _f_reps_5, list <string> _f_reps_4, list <string> _f_reps_3,
int _delta_min, int _delta_max)
{
code = _code ;
shortcut = _shortcut ;
index = 0 ;
f_reps_5 = _f_reps_5 ;
f_reps_4 = _f_reps_4 ;
f_reps_3 = _f_reps_3 ;
affect_5 = "V" ;
affect_4 = "";
affect_3 = "J" ;
for (list<string>::const_iterator it = f_reps_5.begin(); it != f_reps_5.end(); ++it)
rep_5 = Fasta(*it, 2, "|", cout); // TODO: something like 'rep_5 += ...'
for (list<string>::const_iterator it = f_reps_4.begin(); it != f_reps_4.end(); ++it)
rep_4 = Fasta(*it, 2, "|", cout);
for (list<string>::const_iterator it = f_reps_3.begin(); it != f_reps_3.end(); ++it)
rep_3 = Fasta(*it, 2, "|", cout);
delta_min = _delta_min ;
delta_max = _delta_max ;
stats.setLabel(code);
}
Germline::Germline(string _code, char _shortcut,
Fasta _rep_5, Fasta _rep_4, Fasta _rep_3,
int _delta_min, int _delta_max)
......@@ -133,6 +169,7 @@ void MultiGermline::insert(Germline *germline)
void MultiGermline::build_default_set(string path)
{
// Should parse 'data/germlines.data'
Germline *germline;
germline = new Germline("TRG", 'G', path + "/TRGV.fa", "", path + "/TRGJ.fa", -10, 20);
......
......@@ -24,6 +24,10 @@ class Germline {
* (left bound: end of V, right bound : start of J)
*/
Germline(string _code, char _shortcut,
list <string> f_rep_5, list <string> f_rep_4, list <string> f_rep_3,
int _delta_min, int _delta_max);
Germline(string _code, char _shortcut,
string f_rep_5, string f_rep_4, string f_rep_3,
int _delta_min, int _delta_max);
......@@ -40,6 +44,10 @@ class Germline {
void new_index(string seed);
void use_index(IKmerStore<KmerAffect> *index);
list <string> f_reps_5 ;
list <string> f_reps_4 ;
list <string> f_reps_3 ;
// KmerAffect affect_5 ;
// KmerAffect affect_3 ;
string affect_5 ;
......
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