Commit e003700b authored by Mathieu Giraud's avatar Mathieu Giraud

vidjil.cpp: factorize code, reads = OnlineFasta()

This code was duplicated in 60a8bf4a.
parent 033ddb95
......@@ -703,6 +703,23 @@ int main (int argc, char **argv)
}
}
//////////////////////////////////
//$$ Read sequence files
OnlineFasta *reads;
try {
reads = new OnlineFasta(f_reads, 1, " ");
} catch (const std::ios_base::failure e) {
cout << "Error while reading reads file " << f_reads << ": " << e.what()
<< endl;
exit(1);
}
out_dir += "/";
//////////////////////////////://////////
// DISCOVER GERMLINES //
/////////////////////////////////////////
......@@ -721,19 +738,6 @@ int main (int argc, char **argv)
stats_kmer[key] = 0 ;
stats_max[key] = 0 ;
}
// Open read file (copied frow below)
OnlineFasta *reads;
try {
reads = new OnlineFasta(f_reads, 1, " ");
} catch (const std::ios_base::failure e) {
cout << "Error while reading reads file " << f_reads << ": " << e.what()
<< endl;
exit(1);
}
// init forbidden for .max()
set<KmerAffect> forbidden;
......@@ -800,23 +804,6 @@ int main (int argc, char **argv)
}
//////////////////////////////////
//$$ Read sequence files
OnlineFasta *reads;
try {
reads = new OnlineFasta(f_reads, 1, " ");
} catch (const std::ios_base::failure e) {
cout << "Error while reading reads file " << f_reads << ": " << e.what()
<< endl;
exit(1);
}
out_dir += "/";
////////////////////////////////////////
// CLONE ANALYSIS //
////////////////////////////////////////
......@@ -1338,10 +1325,6 @@ int main (int argc, char **argv)
// V(D)J SEGMENTATION //
////////////////////////////////////////
// déja déclaré ?
//reads = OnlineFasta(f_reads, 1, " ");
while (reads->hasNext())
{
reads->next();
......
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