}
int chimeraPenalty = computeChimeraPenalty();
-
+
//fills outputResults
chimera = chimeraMaligner(chimeraPenalty, decalc);
if (m->control_pressed) { return chimera; }
vector<trace_struct> trace = mapTraceRegionsToAlignment(path, refSeqs);
-
+
if (trace.size() > 1) { chimera = "yes"; }
else { chimera = "no"; return chimera; }
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));
temp.queryToParentLocal = computePercentID(queryInRegion, parentInRegion);
-// cout << query->getName() << '\t' << temp.parent << '\t' << "NAST:" << temp.nastRegionStart << '-' << temp.nastRegionEnd << " G:" << temp.queryToParent << " L:" << temp.queryToParentLocal << ", " << temp.divR << endl;
+ //cout << query->getName() << '\t' << temp.parent << '\t' << "NAST:" << temp.nastRegionStart << '-' << temp.nastRegionEnd << " G:" << temp.queryToParent << " L:" << temp.queryToParentLocal << ", " << temp.divR << endl;
outputResults.push_back(temp);
}
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];
for (int i = 1; i < path.size(); i++) {
int next_region_index = path[i].row;
-// cout << i << '\t' << next_region_index << endl;
+ //cout << i << '\t' << next_region_index << endl;
if (next_region_index != region_index) {