[Seqan-dev] problem with interval tree - assertion failed
- From: Mat <matthias.dodt@mdc-berlin.de>
- To: seqan-dev@lists.fu-berlin.de
- Date: Fri, 26 Nov 2010 13:52:26 +0100
- Reply-to: SeqAn Development <seqan-dev@lists.fu-berlin.de>
- Subject: [Seqan-dev] problem with interval tree - assertion failed
Hey guys! I got a problem with the interval tree. I want to load contigs and create intervals of the contigs sizes: //Interval tree construction typedef int TValue; //position type typedef gip::MappedFragment TCargo; // interval id type typedef IntervalAndCargo<TValue, TCargo*> TInterval;// interval type typedef IntervalTree<TValue, TCargo*> TIntervalTree;// interval tree type std::cout << "Loading contigs file..." << std::endl; if(!loadContigs(fragStore,genomeFileName)){ std::cerr << "Error opening genome file!" << std::endl; return -1; } unsigned int numberOfContigs = length(fragStore.contigNameStore); std::cout << "Found " << numberOfContigs << " contigs in genome file." << std::endl; std::map<CharString, TIntervalTree*> contigMap; for(unsigned int n=0;n<numberOfContigs;++n){ std::cout << "NAME: " << fragStore.contigNameStore[n] << std::endl; std::cout << "LENGTH: " << length(fragStore.contigStore[n].seq) << std::endl; TIntervalTree *tree = new TIntervalTree; TInterval in; in.i1 = 0; in.i2 = length(fragStore.contigStore[n].seq); in.cargo = NULL; addInterval(*tree, in); } output: ======= Loading contigs file... Found 40 contigs in genome file. /Users/mat/cpp_develop/seqan-trunk/projects/library/seqan/sequence/string_base.hNAME: 1 LENGTH: 6844 :219 Assertion failed : static_cast<TStringPos>(pos) < static_cast<TStringPos>(length(me)) was: 0 >= 0 (Trying to access an element behind the last one!) if i remove the "addInterval" statement i get the output for each contig... thanks! best, mat |
- Follow-Ups:
- Re: [Seqan-dev] problem with interval tree - assertion failed
- From: "Emde, Anne-Katrin" <Anne-Katrin.Emde@fu-berlin.de>
- Re: [Seqan-dev] problem with interval tree - assertion failed - how to use addInterval?
- From: Mat <matthias.dodt@mdc-berlin.de>
- Re: [Seqan-dev] problem with interval tree - assertion failed
-
seqan-dev - November 2010 - Archives indexes sorted by:
[ thread ] [ subject ] [ author ] [ date ] - Complete archive of the seqan-dev mailing list
- More info on this list...