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

[Seqan-dev] compatibility of repeat_base's operators with stl container adaptations

<-- thread -->
<-- date -->
  • From: Fabian Buske <f.buske@uq.edu.au>
  • To: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Date: Mon, 09 May 2011 14:04:27 +1000
  • Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: [Seqan-dev] compatibility of repeat_base's operators with stl container adaptations

Hi,

I observed that findRepeats() from repeat_base.h relies on _operator[]_ and _resize()_ to work for the given type TRepeatStore &repString.

line 504:
    findRepeats(TRepeatStore &repString, ..){
        ...
        // copy low-complex regions to result string
        resize(repString, list.size());
        typename TRepeatList::const_iterator lit = list.begin();
        typename TRepeatList::const_iterator litEnd = list.end();
        for (TSize i = 0; lit != litEnd; ++lit, ++i)
            repString[i] = (*lit).second;
    }

I'm currently the adaptation of std::list rather than a StringSet, which does not (yet) contain proper functionality for these functions.

I like to propose the following change to this class:

    findRepeats(TRepeatStore &repString, ..){
        ...
        // copy low-complex regions to result string
        typename TRepeatList::const_iterator lit = list.begin();
        typename TRepeatList::const_iterator litEnd = list.end();
        for (TSize i = 0; lit != litEnd; ++lit, ++i)
            appendValue(repString, (*lit).second);
    }

Alternatively, the adaptions from the STL should probably get some additional functionality.

Cheers,
Fabian

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



<-- thread -->
<-- date -->
  • Follow-Ups:
    • Re: [Seqan-dev] compatibility of repeat_base's operators with stl container adaptations
      • From: "Holtgrewe, Manuel" <manuel.holtgrewe@fu-berlin.de>
  • seqan-dev - May 2011 - 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