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

Re: [Seqan-dev] Disallowing gaps in an alignment

<-- thread -->
<-- date -->
  • From: Karrde <karrde.dev@gmail.com>
  • To: "Holtgrewe, Manuel" <manuel.holtgrewe@fu-berlin.de>
  • Date: Thu, 23 Jan 2014 00:19:25 -0800 (PST)
  • Cc: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: Re: [Seqan-dev] Disallowing gaps in an alignment

Sorry if you got this twice, I just realized I accidentally hit reply instead of reply-all.

First off, thanks for the response.

I tried your idea but I'm not getting the correct results, I still see several gaps in the alignment. I also tried setting the gap-extend to a high cost while leaving gap-open at 0, but this doesn't actually seem to do anything to the score returned.

Here's the code I used:

TSequence seq1 = "CDFH";
TSequence seq2 = "CAAAADAAAAFAAAAH";

TAlign align;
resize(rows(align), 2);
assignSource(row(align,0),seq1);
assignSource(row(align,1),seq2);

//trying to set the gap penalty extra high
seqan::Score<int, seqan::ScoreMatrix<seqan::AminoAcid, seqan::Blosum62_>> scoreRoutine(-100,0);

Output from scoreRoutine(-100,0)
Score: 27
      0     .    :    .  
        C----D----F----H
        |    |    |    |
        CAAAADAAAAFAAAAH

Output from scoreRoutine(-100,-100)
Score: -1173
      0     .    :    .  
        C----D----F----H
        |    |    |    |
        CAAAADAAAAFAAAAH





On Jan 23, 2014, at 1:10 AM, Holtgrewe, Manuel <manuel.holtgrewe@fu-berlin.de> wrote:

Hi, simply use very high gap costs in the constructor.

http://docs.seqan.de/seqan/dev3/?p=MatrixScore#Score

*m

________________________________
From: Karrde [karrde.dev@gmail.com]
Sent: Wednesday, January 22, 2014 11:48 PM
To: seqan-dev@lists.fu-berlin.de
Subject: [Seqan-dev] Disallowing gaps in an alignment

Hello,

I want to perform an alignment such that there are no gaps allowed using the Blosum62 mutation matrix. In practice, one of my sequences will be much smaller than the other. I want it to align as close as possible to the longer sequence without allowing any gaps. Is there a flag or something I can set to disallow any gaps or set the maximum number of gaps allowed?

I'm new to SeQan, but here's what I have so far (test data):

typedef seqan::String<char> TSequence;
typedef seqan::Align<TSequence,seqan::ArrayGaps> TAlign;

TSequence seq1 = "CDFGAAAHC";
TSequence seq2 = "CDEFGAHC";

TAlign align;
resize(rows(align), 2);
assignSource(row(align,0),seq1);
assignSource(row(align,1),seq2);

double score = globalAlignment(align, seqan::Score<int, seqan::ScoreMatrix<seqan::AminoAcid, seqan::Blosum62_>>());
std::cout << "Score: " << score << ::std::endl;
std::cout << align << ::std::endl;

Thanks for any and all help!

Hi, simply use very high gap costs in the constructor.

http://docs.seqan.de/seqan/dev3/?p=MatrixScore#Score

*m


From: Karrde [karrde.dev@gmail.com]
Sent: Wednesday, January 22, 2014 11:48 PM
To: seqan-dev@lists.fu-berlin.de
Subject: [Seqan-dev] Disallowing gaps in an alignment

Hello, 

I want to perform an alignment such that there are no gaps allowed using the Blosum62 mutation matrix. In practice, one of my sequences will be much smaller than the other. I want it to align as close as possible to the longer sequence without allowing any gaps. Is there a flag or something I can set to disallow any gaps or set the maximum number of gaps allowed?

I'm new to SeQan, but here's what I have so far (test data):

typedef seqan::String<char> TSequence;
typedef seqan::Align<TSequence,seqan::ArrayGaps> TAlign;

TSequence seq1 = "CDFGAAAHC";
TSequence seq2 = "CDEFGAHC";

TAlign align;
resize(rows(align), 2);
assignSource(row(align,0),seq1);
assignSource(row(align,1),seq2);

double score = globalAlignment(align, seqan::Score<int, seqan::ScoreMatrix<seqan::AminoAcid, seqan::Blosum62_>>());
std::cout << "Score: " << score << ::std::endl;
std::cout << align << ::std::endl;

Thanks for any and all help!
_______________________________________________
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] Disallowing gaps in an alignment
      • From: Birte Kehr <birte.kehr@fu-berlin.de>
  • References:
    • [Seqan-dev] Disallowing gaps in an alignment
      • From: Karrde <karrde.dev@gmail.com>
    • Re: [Seqan-dev] Disallowing gaps in an alignment
      • From: "Holtgrewe, Manuel" <manuel.holtgrewe@fu-berlin.de>
  • seqan-dev - January 2014 - 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