Sequence::rev_comp works on subsequences
authorDiane Trout <diane@caltech.edu>
Thu, 19 Oct 2006 00:58:47 +0000 (00:58 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 19 Oct 2006 00:58:47 +0000 (00:58 +0000)
commitf2459784ce26346876ba2ec76475a579051bbd5c
treeeead4c967fff3f07bec70a7f61359fc63fa5d75e
parent7f8685be920fb02fd3ad1afedc35bd78606889d9
Sequence::rev_comp works on subsequences
ticket:197
Sequence::rev_comp when called on a Sequence which contained a subsequence
was actually reversing the entire sequence and not just the selected region.

To fix this I added rbegin and rend which return reverse iterators that
cover the subseq range and updated rev_comp to use them.

There's also some extra sequence unittests to make sure that rbegin/rend
work correctly. (and as a bonus loading several sequences out of one fasta
file works).
alg/sequence.cpp
alg/sequence.hpp
alg/test/test_sequence.cpp