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

Re: [Seqan-dev] HMM Demo with modified alphabet

<-- thread -->
<-- date -->
  • From: Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de>
  • To: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Date: Mon, 6 Sep 2010 00:59:44 +0200
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: Re: [Seqan-dev] HMM Demo with modified alphabet

Hi Konstantin (? or Klaus or Mark?)

You might want to reconsider whether you want to use the implementation SeqAn. Currently, the HMM specialization of the class Graph assumes that the number of states is fixed at compile time and changes to this would require major changes in the code and any code that uses it.

If you want to use this, however, you can simply define the alphabet as a new Simple Type (analogue to TraceBack in module graph_align, for example):

struct _MyType;
typedef SimpleType<unsigned char, _MyType> MyType; // use unsigned short for > 255 values

For this type, you then at least have to specialize the ValueSize<> and BitsPerValue Metafunctions:

template <> struct ValueSize<MyType> { enum { VALUE = 128 }; };
template <> struct BitsPerValue<MyType> { enum { VALUE = 7 }; }; // must be ceil(log(value size))

Then, try to parametrize the HMM graph class with this alphabet and add any missing functions, metafunctions and operators for your new alphabet. However, deriving your new type from SimpleType, should automagically use the code for SimpleType that the DNA and Amino Acid alphabets use, too.

Cheers,
Manuel

Am 05.09.2010 um 22:43 schrieb Klaus Klapperon:

Hello again,

I want to create a hidden markov model with an alphabet of (at least) 128 values (it has nothing to do with bioinformatics). I started with the hmm demo (graph_hmm.cpp). But how can I define this new alphabet type?
Viele Grüße,


Konstantin

--
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/ mtl.!*
http://portal.gmx.net/de/go/dsl

_______________________________________________
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] HMM Demo with modified alphabet
      • From: kammermark@gmx.de
  • References:
    • [Seqan-dev] HMM Demo mit anderem Alphabet
      • From: kammermark@gmx.de
    • Re: [Seqan-dev] HMM Demo mit anderem Alphabet
      • From: Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de>
    • Re: [Seqan-dev] HMM Demo with modified alphabet
      • From: "Klaus Klapperon" <kammermark@gmx.de>
  • seqan-dev - September 2010 - 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