Commit 94fa2a42 authored by Mathieu Giraud's avatar Mathieu Giraud

vidjil.cpp, core/germline.{h,c}: remove (in)complete filtering mechanism that was used with -i.

This should fix #2153.
parent a51e62a3
......@@ -256,7 +256,7 @@ void MultiGermline::add_germline(Germline *germline)
germlines.push_back(germline);
}
void MultiGermline::build_from_json(string path, string json_filename_and_filter, int filter, int max_indexing)
void MultiGermline::build_from_json(string path, string json_filename_and_filter, int max_indexing)
{
//extract json_filename and systems_filter
......@@ -309,19 +309,6 @@ void MultiGermline::build_from_json(string path, string json_filename_and_filter
continue ;
}
switch (filter) {
case GERMLINES_REGULAR:
if (code.find("+") != string::npos) continue ;
break ;
case GERMLINES_INCOMPLETE:
if (code.find("+") == string::npos) continue ;
break ;
default:
break ;
}
map<string, string> seedMap;
seedMap["13s"] = SEED_S13;
seedMap["12s"] = SEED_S12;
......
......@@ -119,11 +119,6 @@ class Germline {
ostream &operator<<(ostream &out, const Germline &germline);
enum GERMLINES_FILTER { GERMLINES_ALL,
GERMLINES_REGULAR,
GERMLINES_INCOMPLETE } ;
class MultiGermline {
private:
IndexTypes indexType;
......@@ -147,10 +142,9 @@ class MultiGermline {
* Build from a json .g germline file
* path: path, such as 'germline/'
* json_filename_and_filter: filename, optionally embedding a filter, such as 'homo-sapiens.g:IGH,TRG'
* filter: see GERMLINES_FILTER
* max_indexing:
*/
void build_from_json(string path, string json_filename_and_filter, int filter, int max_indexing);
void build_from_json(string path, string json_filename_and_filter, int max_indexing);
/**
* Finishes the construction of the multi germline so that it can be used
......
......@@ -849,7 +849,7 @@ int main (int argc, char **argv)
for (pair <string, string> path_file: multi_germline_paths_and_files)
{
try {
multigermline->build_from_json(path_file.first, path_file.second, GERMLINES_REGULAR, trim_sequences);
multigermline->build_from_json(path_file.first, path_file.second, trim_sequences);
} catch (std::exception& e) {
cerr << ERROR_STRING << "Vidjil cannot properly read " << path_file.first << "/" << path_file.second << ": " << e.what() << endl;
exit(1);
......@@ -897,10 +897,9 @@ int main (int argc, char **argv)
multigermline->germlines.push_back(pseudo_u);
}
// Should come after the initialization of regular (and possibly pseudo) germlines
// Should come after the initialization of all germlines
{
for (pair <string, string> path_file: multi_germline_paths_and_files)
multigermline->build_from_json(path_file.first, path_file.second, GERMLINES_INCOMPLETE, trim_sequences);
if ((! multigermline->one_index_per_germline) && (command != CMD_GERMLINES)) {
multigermline->insert_in_one_index(multigermline->index, true);
}
......
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