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

Re: [Seqan-dev] loading SeedSets cargos into maps

<-- thread -->
<-- date -->
  • From: "Reinert, Knut" <Knut.Reinert@fu-berlin.de>
  • To: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Date: Tue, 22 Jun 2010 07:43:14 +0200
  • Acceptlanguage: en-US, de-DE
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: Re: [Seqan-dev] loading SeedSets cargos into maps

Dear Fabian,

thank you very much for your reports and the bug fixes. Here in Germany we have the last 3 weeks of the Semester
and hence we are a bit bogged down and slow with fixing bugs.

All the best,

Knut Reinert

On Jun 22, 2010, at 3:51 AM, Fabian Buske wrote:

> Hi,
> 
> I figured out a solution for the issue. Basically, the missing 
> assignment operator (=) in several classes were causing the problem. I'm 
> in the process of updating the related bug report in the bugtracker 
> (which seems awfully slow by the way). I will attach all files modified 
> by myself. I recommend a prompt merge with the current version of the 
> library to avoid conflicts with subsequent file changes.
> 
> Thanks & cheers,
> Fabian
> 
> Fabian Buske wrote:
>> Hi,
>> 
>> After not attracting any attention on this one I worked myself through 
>> the MemoryManager, which seems to cause all the problems.
>> 
>> First, the part the compiler complains about doesn't make any sense to 
>> me at all. So I put the following lines in comments:
>> 
>> memoryManager_int.h:
>> 
>> //hmmmmmmmmmmm < this was not my comment; its not useful whatsoever
>> size_t x = supremumValue<size_t>();
>> while (tmpSource != x){
>> tmpSource = source[tmpSource];
>> target[tmpTarget] = tmpSource;
>> tmpTarget = target[tmpTarget];
>> }
>> 
>> I also had to change a couple of lines above to prevent a bad memory 
>> access. Changed:
>> 
>> target.lastValue = &target[length(source)-1];
>> 
>> to
>> if (length(source) > 0) target.lastValue = &target[length(source)-1];
>> 
>> I also have the other bugfixes that I did submit to the bug-tracker 
>> (bug + fix) but unfortunately nobody has actually made the changes in 
>> the library so far.
>> 
>> *What I figured out:*
>> The SeedSet is instantiated as a local variable and then added to the 
>> map. That means everything is copied, at least it should, otherwise 
>> its lost when the program leaves the scope of the SeedSet. However, 
>> the memoryManager seems to recycle certain memory regions that contain 
>> seeds. At least I loose the seed data when I leave the scope.
>> 
>> TMap map;
>> {
>> TSeedSet seedset(100, 0);
>> TSeed seed(1, 2, 4);
>> if (!addSeed(seedset, seed, Single()))
>> ::std::cerr << "adding seed went wrong" << ::std::endl;
>> insert(map, 0, seedset); // insert the seedset at key=0
>> printMap(map,-2,2); // Seeds still in map
>> }
>> printMap(map,-2,2); // Seeds gone from map
>> 
>> Here, the second printMap() throws a memory access exception. The data 
>> for the seed are lost:
>> 
>> first printMap(map,-2,2):
>> -2 missed
>> -1 missed
>> 0 found
>> 1 1-4 2-5
>> 1 missed
>> 
>> second printMap(map,-2,2):
>> -2 missed
>> -1 missed
>> 0 found
>> Current language: auto; currently c++
>> Program received signal: “EXC_BAD_ACCESS”.
>> 
>> Any idea on how to fix this is very much appreciated since this bug 
>> proves himself a stopper.
>> 
>> Thanks a lot!
>> 
>> Cheers,
>> Fabian
>> 
>> Fabian Buske wrote:
>>> Hi,
>>> 
>>> I tried to use a map (skiplist) loaded with an __int64 key and a 
>>> seedSet cargo but get a compiler error.
>>> Is there a size limit as to what load of a cargo or what type of 
>>> cargo can be used?
>>> 
>>> Sample code:
>>> 
>>> typedef SeedSet< int, SimpleSeed, DefaultNoScore , void > TSeedSet;
>>> typedef Pair< int, TSeedSet> TSkipValue;
>>> typedef Map< TSkipValue , Skiplist< > > TDiagMap;
>>> SeedSet< int, SimpleSeed, DefaultNoScore , void > seedset(100, 0);
>>> TDiagMap diagMap;
>>> insert(diagMap, 1, seedset);
>>> 
>>> throws:
>>> 
>>> seqan/seeds/memoryManager_int.h:185: error: cannot convert 'const 
>>> seqan::Seed<int, const seqan::Tag<seqan::_Seed_simple> >' to 'size_t' 
>>> in assignment
>>> seqan/seeds/memoryManager_int.h:185: error: cannot convert 'const 
>>> seqan::Seed<int, const seqan::Tag<seqan::_Seed_simple> >' to 'size_t' 
>>> in assignment
>>> seqan/seeds/memoryManager_int.h:185: error: cannot convert 'const 
>>> seqan::Seed<int, const seqan::Tag<seqan::_Seed_simple> >' to 'size_t' 
>>> in assignment
>>> 
>>> I did put in a ticket for this as well.
>>> 
>>> On a minor note seed_base and the seedSet_base are missing the "= 
>>> operator" implementation.
>>> 
>>> Seed & operator = (Seed const &orig)
>>> 
>>> 
>>> Cheers,
>>> Fabian
>>> 
>> 
>> 
>> -- 
>> Fabian Buske
>> Institute for Molecular Bioscience
>> The University of Queensland 
>> Brisbane, Qld. 4072 Australia
>> Phone: (61)-(7)-334-62608
>> 
> 
> 
> -- 
> 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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

<-- thread -->
<-- date -->
  • Follow-Ups:
    • Re: [Seqan-dev] loading SeedSets cargos into maps
      • From: Fabian Buske <f.buske@uq.edu.au>
  • References:
    • [Seqan-dev] loading SeedSets cargos into maps
      • From: Fabian Buske <f.buske@uq.edu.au>
    • Re: [Seqan-dev] loading SeedSets cargos into maps
      • From: Fabian Buske <f.buske@uq.edu.au>
    • Re: [Seqan-dev] loading SeedSets cargos into maps
      • From: Fabian Buske <f.buske@uq.edu.au>
  • seqan-dev - June 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