Commit 32d7fe59 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

core/segment.cpp, core/windowExtractor.cpp: factorize Segment::getInfoLine()

parent e522c813
......@@ -147,13 +147,21 @@ bool Segmenter::finishSegmentationD()
return true ;
}
string Segmenter::getInfoLine() const
{
string s = ">" ;
s += label + " " ;
s += (segmented ? "" : "! ") + info ;
s += " " + info_extra ;
s += " " + segmented_germline->code ;
s += " " + string(segmented_mesg[because]) ;
return s ;
}
ostream &operator<<(ostream &out, const Segmenter &s)
{
out << ">" << s.label << " " ;
out << (s.segmented ? "" : "! ") << s.info ;
out << " " << s.info_extra ;
out << " " << s.segmented_germline->code ;
out << endl ;
out << s.getInfoLine() << endl;
if (s.segmented)
{
......
......@@ -56,8 +56,7 @@ WindowsStorage *WindowExtractor::extract(OnlineFasta *reads, MultiGermline *mult
// Last line of detailed affects output
if (out_affects) {
*out_affects << "#>" << reads->getSequence().label << (seg->isSegmented() ? "" : " not") << " segmented "
<< segmented_mesg[seg->getSegmentationStatus()] << " on " << seg->segmented_germline->code << endl << endl;
*out_affects << "#" << seg->getInfoLine() << endl;
}
}
return windowsStorage;
......
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