Commit 40e85c6f authored by Mathieu Giraud's avatar Mathieu Giraud

merge - two commits updating the '-g' option

parents 8fb9d286 7ca20a8d
......@@ -109,10 +109,10 @@ void MultiGermline::insert(Germline *germline)
germlines.push_back(germline);
}
void MultiGermline::load_default_set()
void MultiGermline::load_default_set(string path)
{
germlines.push_back(new Germline("TRG", 'G', "germline/TRGV.fa", "", "germline/TRGJ.fa", "#####-#####", -10, 20));
germlines.push_back(new Germline("IGH", 'H', "germline/IGHV.fa", "germline/IGHD.fa", "germline/IGHJ.fa", "######-######", 0, 80));
germlines.push_back(new Germline("TRG", 'G', path + "/TRGV.fa", "", path + "/TRGJ.fa", "#####-#####", -10, 20));
germlines.push_back(new Germline("IGH", 'H', path + "/IGHV.fa", path + "/IGHD.fa", path + "/IGHJ.fa", "######-######", 0, 80));
}
......
......@@ -68,7 +68,7 @@ class MultiGermline {
~MultiGermline();
void insert(Germline *germline);
void load_default_set();
void load_default_set(string path);
void out_stats(ostream &out);
};
......
......@@ -147,7 +147,7 @@ void usage(char *progname)
<< " -D <file> D germline multi-fasta file (automatically implies -d)" << endl
<< " -J <file> J germline multi-fasta file" << endl
<< " -G <prefix> prefix for V (D) and J repertoires (shortcut for -V <prefix>V.fa -D <prefix>D.fa -J <prefix>J.fa)" << endl
<< " -g multiple germlines (experimental)" << endl
<< " -g <path> multiple germlines (experimental)" << endl
<< endl
<< "Window prediction" << endl
......@@ -279,6 +279,7 @@ int main (int argc, char **argv)
bool output_segmented = false;
bool output_unsegmented = false;
bool multi_germline = false;
string multi_germline_file = "";
string forced_edges = "" ;
......@@ -294,7 +295,7 @@ int main (int argc, char **argv)
//$$ options: getopt
while ((c = getopt(argc, argv, "AhagG:V:D:J:k:r:vw:e:C:t:l:dc:m:M:N:s:p:Sn:o:L%:Z:y:z:uU")) != EOF)
while ((c = getopt(argc, argv, "Ahag:G:V:D:J:k:r:vw:e:C:t:l:dc:m:M:N:s:p:Sn:o:L%:Z:y:z:uU")) != EOF)
switch (c)
{
......@@ -355,7 +356,8 @@ int main (int argc, char **argv)
break;
case 'g':
multi_germline = true ;
multi_germline = true;
multi_germline_file = string(optarg);
break;
case 'G':
......@@ -747,9 +749,6 @@ int main (int argc, char **argv)
if (!segment_D) // TODO: add other constructor to Fasta, and do not load rep_D in this case
f_rep_D = "";
Fasta rep_V(f_rep_V, 2, "|", cout);
Fasta rep_D(f_rep_D, 2, "|", cout);
Fasta rep_J(f_rep_J, 2, "|", cout);
OnlineFasta *reads;
......@@ -785,10 +784,14 @@ int main (int argc, char **argv)
if (multi_germline)
{
multigermline->load_default_set();
multigermline->load_default_set(multi_germline_file);
}
else
{
Fasta rep_V(f_rep_V, 2, "|", cout);
Fasta rep_D(f_rep_D, 2, "|", cout);
Fasta rep_J(f_rep_J, 2, "|", cout);
Germline *germline;
germline = new Germline(germline_system, 'X',
rep_V, rep_D, rep_J, seed,
......@@ -1309,6 +1312,11 @@ int main (int argc, char **argv)
<< "* They should be checked with other softwares such as IgBlast, iHHMune-align or IMGT/V-QUEST." << endl
;
Fasta rep_V(f_rep_V, 2, "|", cout);
Fasta rep_D(f_rep_D, 2, "|", cout);
Fasta rep_J(f_rep_J, 2, "|", cout);
Germline *germline;
// Here, it could be run without building the index
......
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