Skip to content

Commit

Permalink
Fix in edge subseq extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonBankevich committed Nov 25, 2024
1 parent 41c4cd4 commit d329d64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/projects/assembly_graph/assembly_graph_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ namespace ag {
const Sequence &truncSeq() const { return seq; }
const Sequence &getCode() const {return edge_code;}
void resetEdgeCode() {edge_code = seq.Subseq(0, std::min<size_t>(1, seq.size()));}
Sequence kmerSeq(size_t pos) const {return fullSubseq(pos, pos);}
Sequence kmerSeq(size_t pos) const {return fullSubseq(pos, pos + getStartSize());}


const Vertex &getFinish() const {return *finish;}
Expand Down Expand Up @@ -310,9 +310,9 @@ namespace ag {
VERIFY(from <= start->size() + truncSize());
VERIFY(to <= start->size() + truncSize());
if (from >= start->size()) {
return truncSeq().Subseq(from - start->size(), to);
return truncSeq().Subseq(from - start->size(), to - start ->size());
} else {
return getStart().getSeq().Subseq(from) + truncSeq().Subseq(0, to);
return getStart().getSeq().Subseq(from) + truncSeq().Subseq(0, to - start->size());
}
}

Expand Down

0 comments on commit d329d64

Please sign in to comment.