Hi Manuel! Thanks for your reply. I can send you some source later, but i think its a more simple problem. I figured out that the pairMatchId of the FragmentStore's alignedReadStore is in general not the same as the matePairId from the matePairStore by looking into the source. What still is missing is: I would like to know on which contig the two reads of a mate-pair aligned. So far i got: - First i iterate over the alignedReadStore to get a readId - i get the matePairId via the readStore - then i get the mate's id via the matePairStore - now i need a function to search for a readId in alignedReadStore efficiently - is there something like that? The code looks now like this: ... sortAlignedReads(fragStore.alignedReadStore, SortReadId()); for (unsigned int n=0;n<nrAlignments;++n){ //get the current readId TValue currentReadId=fragStore.alignedReadStore[n].readId; //get the correct mate-pair id TValue pair_id = fragStore.readStore[currentReadId].matePairId; if(pair_id!=TReadStoreElement::INVALID_ID){ ++mateCounter; std::cout << "read-id: " << currentReadId << "n: " << n << std::endl; TValue r1 = fragStore.matePairStore[pair_id].readId[0]; TValue r2 = fragStore.matePairStore[pair_id].readId[1]; TValue other = 0; //now r1 or r2 should equal currentReadId if(r1==currentReadId){ other = r2; std::cout << "other is r2:" << other << std::endl; //now get the alignId TValue alignId; ...how to do that? So how do i get the alignId(s) of a mate's readId? Thanks! best, mat Am 1/4/11 4:16 PM, schrieb Holtgrewe, Manuel: It turns out that the both pair_id's never match and the loop breaks with:Trying to access an element behind the last one!<<This assertion is in the operator[]/value(str, pos) function for the String class. Did you try to run the program within a debugger to see where the problem occurs in your program? Please provide a complete, compiling problem and a minimal SAM file (should be 2 lines after the header, right?) that allow us to reproduce the problem. Bests, Manuel _______________________________________________ seqan-dev mailing list seqan-dev@lists.fu-berlin.de https://lists.fu-berlin.de/listinfo/seqan-dev |