Skip to content

Commit

Permalink
Fix issues in masksequence
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed Dec 8, 2024
1 parent a2d01d0 commit b80ce10
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commons/Masker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int Masker::maskSequence(Sequence & seq, bool maskTantan, double maskProb,
if(maskTantan){
// 1. Apply tantan masking without influencing by repeat mask
maskedResidues += tantan::maskSequences(seq.numSequence,
(seq.numSequence + seq.L),
seq.numSequence + seq.L,
50 /*maxCycleLength*/,
probMatrix.probMatrixPointers,
0.005 /*repeatProb*/,
Expand Down
1 change: 1 addition & 0 deletions src/commons/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ Parameters::Parameters():
// mask sequence
masksequence.push_back(&PARAM_MASK_PROBABILTY);
masksequence.push_back(&PARAM_MASK_N_REPEAT);
masksequence.push_back(&PARAM_THREADS);
masksequence.push_back(&PARAM_COMPRESSED);
masksequence.push_back(&PARAM_V);
Expand Down
4 changes: 3 additions & 1 deletion src/util/masksequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ int masksequence(int argc, const char **argv, const Command& command) {
for (size_t id = 0; id < reader.getSize(); ++id) {
seq.mapSequence(id, reader.getDbKey(id), reader.getData(id, thread_idx), reader.getSeqLen(id));
masker.maskSequence(seq, true, par.maskProb, par.maskLowerCaseMode, par.maskNrepeats);
memcpy(charSequence, seq.getSeqData(), seq.L * sizeof(char));
masker.applySoftmasking(charSequence, seq.numSequence, seq.L);
writer.writeData((char*)charSequence, seq.L, thread_idx);
charSequence[seq.L] = '\n';
writer.writeData((const char *)charSequence, seq.L + 1, seq.getDbKey(), thread_idx);
}
delete[] charSequence;
}
Expand Down

0 comments on commit b80ce10

Please sign in to comment.