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

[Seqan-dev] changing intervals within IntervalTree

<-- thread -->
<-- date -->
  • From: Konstantin Okonechnikov <k.okonechnikov@gmail.com>
  • To: seqan-dev@lists.fu-berlin.de
  • Date: Tue, 21 Aug 2012 12:03:38 +0200
  • Reply-to: k.okonechnikov@gmail.com, SeqAn Development <seqan-dev@lists.fu-berlin.de>
  • Subject: [Seqan-dev] changing intervals within IntervalTree

Hi everyone,

I am using an interval tree structure to work with genomic regions.
However, I am not sure what is the correct way to change or remove an
existing interval in the tree.
Here is the code example:

IntervalTree<int,long> intervals;

for (int i = 0, sz = candidates.size(); i < sz; ++i ) {
        const BreakpointCandidate& c = candidates.at(i);
        int queryStart = c.pos1;
        int queryEnd = c.pos1 + c.length1 - 1;

        String<long> res;
        findIntervals(intervals, queryStart, queryEnd, res);
        if (length(res) > 0) {

             // TODO:
             // replace the found interval with its union with query interval

        } else {
            addInterval(intervals, queryStart, queryEnd);
        }

    }

Should I directly modify the underlying graph structure in order to
implement the TODO comment? If yes, how can I access the corresponding
interval?

Or would it be better to change the behavior of addInterval() function?

 Thanks in advance,
   Konstantin



<-- thread -->
<-- date -->
  • Follow-Ups:
    • Re: [Seqan-dev] changing intervals within IntervalTree
      • From: "Emde, Anne-Katrin" <Anne-Katrin.Emde@fu-berlin.de>
  • seqan-dev - August 2012 - 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