temp.parentAligned = db[seqIndex]->getAligned();
temp.nastRegionStart = spotMap[regionStart];
temp.nastRegionEnd = spotMap[regionEnd];
- temp.regionStart = regionStart;
- temp.regionEnd = regionEnd;
+ temp.regionStart = unalignedMap[regionStart];
+ temp.regionEnd = unalignedMap[regionEnd];
string parentInRange = refSeqs[seqIndex]->getAligned();
parentInRange = parentInRange.substr(traceStart, (traceEnd-traceStart+1));
seqs[i]->setAligned(newAligned);
}
-
+
+ string query = seqs[seqs.size()-1]->getAligned();
+ int queryLength = query.length();
+
+ unalignedMap.resize(queryLength, 0);
+
+
+ for(int i=1;i<queryLength;i++){
+ if(query[i] != '.' && query[i] != '-'){
+ unalignedMap[i] = unalignedMap[i-1] + 1;
+ }
+ else{
+ unalignedMap[i] = unalignedMap[i-1];
+ }
+ }
+
spotMap = newMap;
}
catch(exception& e) {
}
}
-// cout << highestScore << endl;
vector<score_struct> path;
int rowIndex = highestStruct.row;
int pos = highestStruct.col;
int score = highestStruct.score;
+
+// cout << rowIndex << '\t' << pos << '\t' << score << endl;
while (pos >= 0 && score > 0) {
score_struct temp = ms[rowIndex][pos];