Commit 45a462ae authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

core/germline.{h,cpp}: load_standard_set (for CMD_GERMLINES)

parent c77b2496
......@@ -131,7 +131,7 @@ void MultiGermline::insert(Germline *germline)
germlines.push_back(germline);
}
void MultiGermline::load_default_set(string path)
void MultiGermline::build_default_set(string path)
{
Germline *germline;
......@@ -146,6 +146,31 @@ void MultiGermline::load_default_set(string path)
}
void MultiGermline::load_standard_set(string path)
{
germlines.push_back(new Germline("TRA", 'A', path + "/TRAV.fa", "", path + "/TRAJ.fa", -10, 20));
germlines.push_back(new Germline("TRB", 'B', path + "/TRBV.fa", path + "/TRBD.fa", path + "/TRBJ.fa", -10, 20));
germlines.push_back(new Germline("TRG", 'G', path + "/TRGV.fa", "", path + "/TRGJ.fa", -10, 20));
germlines.push_back(new Germline("TRD", 'D', path + "/TRDV.fa", path + "/TRDD.fa", path + "/TRDJ.fa", 0, 80));
germlines.push_back(new Germline("IGH", 'H', path + "/IGHV.fa", path + "/IGHD.fa", path + "/IGHJ.fa", 0, 80));
germlines.push_back(new Germline("IGK", 'K', path + "/IGKV.fa", "", path + "/IGKJ.fa", -10, 20));
germlines.push_back(new Germline("IGL", 'L', path + "/IGLV.fa", "", path + "/IGLJ.fa", -10, 20));
}
void MultiGermline::insert_in_one_index(IKmerStore<KmerAffect> *_index)
{
for (list<Germline*>::const_iterator it = germlines.begin(); it != germlines.end(); ++it)
{
Germline *germline = *it ;
germline->affect_5 = string(1, germline->shortcut) + "-" + germline->code + "V";
if (germline->rep_4.size())
germline->affect_4 = string(1, 14 + germline->shortcut) + "-" + germline->code + "D";
germline->affect_3 = string(1, tolower(germline->shortcut)) + "-" + germline->code + "J";
germline->use_index(_index) ;
}
}
void MultiGermline::out_stats(ostream &out)
{
for (list<Germline*>::const_iterator it = germlines.begin(); it != germlines.end(); ++it)
......
......@@ -72,7 +72,10 @@ class MultiGermline {
~MultiGermline();
void insert(Germline *germline);
void load_default_set(string path);
void build_default_set(string path);
void load_standard_set(string path);
void insert_in_one_index(IKmerStore<KmerAffect> *_index);
void out_stats(ostream &out);
};
......
......@@ -785,7 +785,7 @@ int main (int argc, char **argv)
if (multi_germline)
{
multigermline->load_default_set(multi_germline_file);
multigermline->build_default_set(multi_germline_file);
}
else
{
......
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