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

Re: [Seqan-dev] Merging seeds

<-- thread
<-- date
  • From: "Kehr, Birte" <Birte.Kehr@fu-berlin.de>
  • To: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Date: Mon, 31 May 2010 13:23:12 +0200
  • Acceptlanguage: en-US, de-DE
  • Cc: Carsten Kemena <carsten.kemena@crg.es>, "andreas.doering@mdc-berlin.de" <andreas.doering@mdc-berlin.de>
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: Re: [Seqan-dev] Merging seeds

Hi Fabian,

I am currently not working on the seeds module in SeqAn but I will do my best to answer your questions. For more help, we will have to contact the authors of the module.

> I found that the seed merging depends on the order of the merge. 

The algorithm is a heuristic so it could be that it depends on the order of insertion. However, I am not sure about it in your case, so if you think that you have found a bug, please report it at: http://trac.mi.fu-berlin.de/seqan/newticket

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

You do not need to specify a gapDistance (third parameter) for adding seeds with the tag Single. This is only needed for merging seeds:
addSeed(seedset, Seed<int,SimpleSeed>(1, 1, 4), Single());

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

This was probably a design question. I cannot help you with this. I cc the authors of the module.

> 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? 

It has the advantage that the user can decide whether to add the seed with the tag Single afterwards, or not to add the seed when merging is unsuccessful. If it would be added by default, the latter would clearly not be possible.

> Using appendValue() does also give a compiler error.

Try
    Seed<int,SimpleSeed> seed(4, 4, 4);
    appendValue(seedset, seed);

Cheers, 
Birte


-----Original Message-----
From: Fabian Buske [mailto:f.buske@uq.edu.au] 
Sent: Montag, 31. Mai 2010 07:34
To: '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


_______________________________________________
seqan-dev mailing list
seqan-dev@lists.fu-berlin.de
https://lists.fu-berlin.de/listinfo/seqan-dev



<-- thread
<-- date
  • References:
    • [Seqan-dev] Merging seeds
      • From: Fabian Buske <f.buske@uq.edu.au>
  • 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