Finished implementing CR3 CB/UMI processing. Passed Lane 1 tests.
#include "ReadAlign.h"
#include "serviceFuns.cpp"
-
int alignToTranscript(Transcript &aG, uint trS1, uint8 trStr1, uint32 *exSE1, uint32 *exLenCum1, uint16 exN1, Transcript &aT) {
//find exon that overlaps beginning of the read
- uint32 g1=aG.exons[0][EX_G]-trS1;//start of the transcript
+ uint32 g1=aG.exons[0][EX_G]-trS1;//start of the align
uint32 ex1=binarySearch1<uint32>(g1, exSE1, 2*exN1);
+ //this sholud not be possible - we check before we call this function
if (ex1>=2*exN1) return 0; //align start is to the right of all exons
if (ex1%2==1) {//beginning of the read >=end of an exon
@@ -27,7 +27,6 @@ int alignToTranscript(Transcript &aG, uint trS1, uint8 trStr1, uint32 *exSE1, ui
if (aG.exons[iab][EX_G]+aG.exons[iab][EX_L]>exSE1[2*ex1+1]+trS1+1) {//block extends past exon end
return 0;
};
-
if (iab==0 || aG.canonSJ[iab-1]<0) {
aT.exons[aT.nExons][EX_R]=aG.exons[iab][EX_R];
aT.exons[aT.nExons][EX_G]=aG.exons[iab][EX_G]-trS1-exSE1[2*ex1]+exLenCum1[ex1];
@@ -93,7 +92,7 @@ uint32 Transcriptome::quantAlign (Transcript &aG, Transcript *aTall, vector<arra
uint32 nAtr=0; //number of alignments to the transcriptome
//binary search through transcript starts
- uint32 tr1=binarySearch1a<uint>(aG.exons[0][EX_G], trS, nTr);
+ uint32 tr1=binarySearch1a<uint>(aG.exons[0][EX_G], trS, nTr);//tr1 has the maximum transcript start such that it is still <= align start
if (tr1==(uint32) -1) return 0; //alignment outside of range of all transcripts
uint aGend=aG.exons[aG.nExons-1][EX_G];
