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

[Seqan-dev] Merging seeds

<-- thread -->
<-- date -->
  • From: Fabian Buske <f.buske@uq.edu.au>
  • To: "'seqan-dev@lists.fu-berlin.de'" <seqan-dev@lists.fu-berlin.de>
  • Date: Mon, 31 May 2010 15:33:33 +1000
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: [Seqan-dev] Merging seeds

Hi,

I found that the seed merging depends on the order of the merge. For example:

SeedSet< int, SimpleSeed, DefaultNoScore , void > seedset(100, 0);bool yep = addSeed(seedset, Seed<int,SimpleSeed>(1, 1, 4),Single()); ::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;
yep = addSeed(seedset, Seed<int,SimpleSeed>(0, 0, 4), 0, Merge());
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;

results in:
1 1 1-4
0 1 1-4

the seed containing a preceding location is not added.
On the other hand adding the seeds in reverse order, i.e.:

SeedSet< int, SimpleSeed, DefaultNoScore , void > seedset(100, 0);bool yep = addSeed(seedset, Seed<int,SimpleSeed>(0, 0, 4),Single()); ::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;
yep = addSeed(seedset, Seed<int,SimpleSeed>(1, 1, 4), 0, Merge());
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;

gives what one expects:
1 1 0-3
1 1 0-4

Is this a feature or a bug? It should be annotated if it is the former.
It would also be nice to have an example for seed merging in demos (although I found some in tests).

Secondly, If I use the tag Single() while adding the second seed I get a compiler error:

SeedSet< int, SimpleSeed,  DefaultNoScore , void > seedset(100, 0);
bool yep = addSeed(seedset, Seed<int,SimpleSeed>(0, 0, 4),Single());
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;
yep = addSeed(seedset, Seed<int,SimpleSeed>(1, 1, 4), 0, Single());
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;

Thirdly, two adjacent seeds are currently not concatenated though it would make sense to join them I think:

SeedSet< int, SimpleSeed,  DefaultNoScore , void > seedset(100, 0);
bool yep = addSeed(seedset, Seed<int,SimpleSeed>(0, 0, 4),Single());
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;
yep = addSeed(seedset, Seed<int,SimpleSeed>(4, 4, 4), 0, Merge());
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl; gives:
1 1 0-3
0 1 0-3

rather than:
1 1 0-3
1 1 0-7

And finally, its called SeedSet but if a merge is not successful, like in the last example, no new member in the set is added (by default). Why so? Using appendValue() does also give a compiler error:

SeedSet< int, SimpleSeed,  DefaultNoScore , void > seedset(100, 0);
bool yep = addSeed(seedset, Seed<int,SimpleSeed>(0, 0, 4),Single());
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;
yep = addSeed(seedset, Seed<int,SimpleSeed>(4, 4, 4), 0, Merge());
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;
if (not yep)
   appendValue(seedset, Seed<int,SimpleSeed>(4, 4, 4));
::std::cout << yep << " " << length(seedset) << " " << leftDim0(*begin(seedset)) << "-" << rightDim0(*begin(seedset)) << ::std::endl;

Cheers,
Fabian

--
Fabian Buske
Institute for Molecular Bioscience
The University of Queensland Brisbane, Qld. 4072 Australia
Phone: (61)-(7)-334-62608




<-- thread -->
<-- date -->
  • Follow-Ups:
    • Re: [Seqan-dev] Merging seeds
      • From: "Kehr, Birte" <Birte.Kehr@fu-berlin.de>
  • seqan-dev - May 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