Hi Tianyang, what kind of alignment information are you looking for? You can iterate the Align object (or the rows of the Align object) to extract information about the position of gaps. You might have found it yourself already but if not, the Alignments tutorial gives a good introduction to the Align data structure: http://trac.seqan.de/wiki/Tutorial/Alignments Birte -----Original Message----- From: Tianyang Li 李天阳 Tommy Li [mailto:tmy1018@gmail.com] Sent: Mittwoch, 1. August 2012 15:48 To: SeqAn Development Subject: [Seqan-dev] How to extract alignment information from an Align object when doing a Smith-Waterman alignment? Hi, I have a question about how to extract alignment information from an Align object when doing Smith-Waterman alignment. For example, #include <iostream> #include <seqan/align.h> #include <string> using namespace seqan; int main() { Align< String<Dna> > ali; ::std::string s1 = "CGCGGGGCATATATTTTTTTA"; ::std::string s2 = "ATTTATTTTTTATATGCGGCCG"; appendValue(rows(ali), s1); appendValue(rows(ali), s2); ::std::cout << "Score = " << localAlignment(ali, Score<int>(3,-3,-2, -2), SmithWaterman()) << ::std::endl; ::std::cout << ali; ::std::cout << "Aligns Seq1[" << clippedBeginPosition(row(ali, 0)) << ":" << (clippedEndPosition(row(ali, 0))-1) << "]"; ::std::cout << " and Seq2[" << clippedBeginPosition(row(ali, 1)) << ":" << (clippedEndPosition(row(ali, 1))-1) << "]" << ::std::endl << ::std::endl; return 0; } I'd like to get the the information when I do `::std::cout << ali;` as some kind of object that I can use without parsing the output. Thanks! Best, Tianyang _______________________________________________ seqan-dev mailing list seqan-dev@lists.fu-berlin.de https://lists.fu-berlin.de/listinfo/seqan-dev