Skip to content
Snippets Groups Projects
Commit c915dd22 authored by Valerio Mariani's avatar Valerio Mariani
Browse files

Fiex bug with sequence offsets

parent 27066c8f
Branches
Tags
No related merge requests found
......@@ -55,7 +55,8 @@ void update_shifts(const AlignmentHandle& aln,
res_index=-1;
}
else if (i > 0) {
res_index=s1.GetResidueIndex(i-1);
res_index=s1.GetResidueIndex(i-1)-s1.GetOffset();
// res_index=s1.GetResidueIndex(i-1);
}
ShiftMap::iterator p=shifts.find(res_index);
if (p!=shifts.end()) {
......@@ -111,7 +112,8 @@ SequenceHandle realign_sequence(const AlignmentHandle& aln,
p=shifts.find(-1);
}
else if (i>0 && s1.GetOneLetterCode(i-1)!='-') {
p=shifts.find(s1.GetResidueIndex(i-1));
p=shifts.find(s1.GetResidueIndex(i-1)-s1.GetOffset());
// p=shifts.find(s1.GetResidueIndex(i-1));
}
if (p!=shifts.end()) {
int d=p->second-shift;
......@@ -139,6 +141,7 @@ AlignmentHandle MergePairwiseAlignments(const AlignmentList& pairwise_alns,
update_shifts(*i, ref_seq, shifts);
}
AlignmentHandle merged=CreateAlignment();
merged.AddSequence(shift_reference(ref_seq, shifts));
size_t ref_len=merged.GetSequence(0).GetLength();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment