1 #include "Transcriptome.h" 2 #include "serviceFuns.cpp" 3 #include "ReadAnnotations.h" 4 geneFullAlignOverlap(uint nA,Transcript ** aAll,int32 strandType,ReadAnnotations & readAnnot)5void Transcriptome::geneFullAlignOverlap(uint nA, Transcript **aAll, int32 strandType, ReadAnnotations &readAnnot) 6 { 7 readAnnot.geneFull={}; 8 9 for (uint32 iA=0; iA<nA; iA++) { 10 Transcript &a = *aAll[iA];//one unique alignment only 11 12 int64 gi1=-1; 13 14 for (int64 ib=a.nExons-1; ib>=0; ib--) {//scan through all blocks of the alignments 15 16 uint64 be1=a.exons[ib][EX_G]+a.exons[ib][EX_L]-1;//end of the block 17 gi1=binarySearch1a<uint64>(be1, geneFull.s, (int32) nGe); 18 19 while (gi1>=0 && geneFull.eMax[gi1]>=a.exons[ib][EX_G]) {//these exons may overlap this block 20 if (geneFull.e[gi1]>=a.exons[ib][EX_G]) {//this gene overlaps the block 21 int32 str1 = geneFull.str[gi1]==1 ? a.Str : 1-a.Str; 22 if (strandType==-1 || strandType==str1) { 23 readAnnot.geneFull.insert(geneFull.g[gi1]); 24 readAnnot.geneFullTr=iA; 25 }; 26 }; 27 --gi1;// go to the previous gene 28 }; 29 }; 30 }; 31 }; 32 33 34