[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