FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

Re: [Seqan-dev] How to extract alignment information from an Align object when doing a Smith-Waterman alignment?

<-- thread -->
<-- date -->
  • From: "Kehr, Birte" <Birte.Kehr@fu-berlin.de>
  • To: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Date: Wed, 1 Aug 2012 14:02:46 +0000
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: Re: [Seqan-dev] How to extract alignment information from an Align object when doing a Smith-Waterman alignment?

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
<-- thread -->
<-- date -->
  • Follow-Ups:
    • Re: [Seqan-dev] How to extract alignment information from an Align object when doing a Smith-Waterman alignment?
      • From: Tianyang Li 李天阳 Tommy Li <tmy1018@gmail.com>
  • References:
    • [Seqan-dev] How to extract alignment information from an Align object when doing a Smith-Waterman alignment?
      • From: Tianyang Li 李天阳 Tommy Li <tmy1018@gmail.com>
  • seqan-dev - August 2012 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the seqan-dev mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal