Skip to content
Permalink
Browse files

2nd try to fix N-X problem

  • Loading branch information...
AnnSeidel committed Nov 6, 2019
1 parent b498bcc commit c4f7b2392f26c71e8c596466a3e620297c748fa7
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/assembler/assembleresult.cpp
@@ -66,7 +66,8 @@ inline char* getRevFragment(const char* fragment, size_t fragLen, NucleotideMatr
char *fragmentRev = new char[fragLen];
for (int pos = fragLen - 1; pos > -1; pos--) {
int res = nuclMatrix->aa2int[static_cast<int>(fragment[pos])];
fragmentRev[(fragLen - 1) - pos] = nuclMatrix->int2aa[nuclMatrix->reverseResidue(res)];
char revRes = nuclMatrix->int2aa[nuclMatrix->reverseResidue(res)];
fragmentRev[(fragLen - 1) - pos] = (revRes == 'X')? 'N' : revRes;
}
return fragmentRev;
}
@@ -133,8 +134,8 @@ int doassembly(LocalParameters &par) {
NucleotideMatrix *nuclMatrix = (NucleotideMatrix *) subMat;
for (int pos = querySeqLen - 1; pos > -1; pos--) {
int res = subMat->aa2int[static_cast<int>(querySeq[pos])];
res = (res == 'X')? 'N' : res;
queryRevSeq[(querySeqLen - 1) - pos] = subMat->int2aa[nuclMatrix->reverseResidue(res)];
char revRes = subMat->int2aa[nuclMatrix->reverseResidue(res)];
queryRevSeq[(querySeqLen - 1) - pos] = (revRes == 'X')? 'N' : revRes;
}
queryRev = std::string(queryRevSeq,querySeqLen);

0 comments on commit c4f7b23

Please sign in to comment.
You can’t perform that action at this time.