Commit f5098f53 authored by Mathieu Giraud's avatar Mathieu Giraud

segment.cpp: info_extra field to store anything that is not constrained by .vdj.fa

'removeChevauchement' and possibly other infos
parent bea5d4bd
......@@ -84,7 +84,7 @@ string Segmenter::removeChevauchement()
if (Vend >= Jstart)
{
int middle = (Vend + Jstart) / 2 ;
chevauchement = "!" + string_of_int (Vend - Jstart) + "!" ;
chevauchement = " !" + string_of_int (Vend - Jstart) + "!" ;
Vend = middle ;
Jstart = middle+1 ;
}
......@@ -141,6 +141,7 @@ ostream &operator<<(ostream &out, const Segmenter &s)
{
out << ">" << s.label << " " ;
out << (s.segmented ? "" : "! ") << s.info ;
out << " " << s.info_extra ;
out << endl ;
if (s.segmented)
......@@ -166,6 +167,7 @@ KmerSegmenter::KmerSegmenter(Sequence seq, IKmerStore<KmerAffect> *index,
label = seq.label ;
sequence = seq.sequence ;
info = "" ;
info_extra = "seed";
segmented = false;
Dend=0;
......@@ -217,7 +219,8 @@ KmerSegmenter::KmerSegmenter(Sequence seq, IKmerStore<KmerAffect> *index,
because = reversed ? SEG_MINUS : SEG_PLUS ;
info = string_of_int(Vend + FIRST_POS) + " " + string_of_int(Jstart + FIRST_POS) ;
info += " " + removeChevauchement();
// removeChevauchement is called once info was already computed: it is only to output info_extra
info_extra += removeChevauchement();
finishSegmentation();
}
}
......@@ -441,7 +444,7 @@ FineSegmenter::FineSegmenter(Sequence seq, Fasta &rep_V, Fasta &rep_J,
int delta_min, int delta_max, Cost segment_c)
{
info_extra = "" ;
label = seq.label ;
sequence = seq.sequence ;
Dend=0;
......
......@@ -49,7 +49,8 @@ protected:
string code;
string code_short;
string code_light;
string info;
string info; // .vdj.fa header, fixed fields
string info_extra; // .vdj.fa header, other information, at the end of the header
int best_V, best_J ;
int del_V, del_D_left, del_D_right, del_J ;
string seg_V, seg_N, seg_J;
......
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