On Feb 17, 2014, at 3:41 PM, Samuel Flores <firstname.lastname@example.org>
It is really hard to tell what went wrong without a proper code example. Could you please provide all the code associated with the alignment computation?
At the moment we don't store any state of the alignment. Thus it is not possible to receive such information. However, we have the function isGap(gaps, viewPosition) or isGap(GapsIterator). In this case the code could look like this, avoiding the string comparisons:
typedef Row<Align<DnaString> >::Type TRow;
typedef Iterator<TRow, Standard>::Type TRowIterator;
TRowIterator itRow0 = begin(row(align, 0), Standard());
TRowIterator itRow0End = end(row(align, 0), Standard());
TRowIterator itRow1 = begin(row(align, 1), Standard());
for (; itRow0 != itRow0End; ++itRow0, ++itRow1)
if (!isGap(itRow0) && !isGap(itRow1))
// Count aligned residues.
Since this is only a linear scan over the aligned sequences, this won't add much to the overall runtime considering the quadratic runtime for the alignments you have to do before.
You can also have a glance at our alignment tutorials at http://trac.seqan.de/wiki/Tutorial/PairwiseSequenceAlignment. Here you can find all information about the pairwise sequence alignments in SeqAn.