Skip to content

Commit

Permalink
Rework masking parameter to solve #408
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed Jan 13, 2025
1 parent 00adfe4 commit c438b91
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 40 deletions.
34 changes: 22 additions & 12 deletions src/commons/LocalParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,36 +286,46 @@ LocalParameters::LocalParameters() :
convert2pdb.push_back(&PARAM_THREADS);
convert2pdb.push_back(&PARAM_V);

// set masking
maskMode = 0;
maskNrepeats = 10;
maskProb = 0.999995;
maskLowerCaseMode = 1;

// createdb
maskBfactorThreshold = 0;
chainNameMode = 0;
writeMapping = 0;
coordStoreMode = COORD_STORE_MODE_CA_DIFF;
inputFormat = 0; // auto detect
fileInclude = ".*";
fileExclude = "^$";
prostt5SplitLength = 1024;
prostt5Model = "";

// search parameter
alignmentType = ALIGNMENT_TYPE_3DI_AA;
tmScoreThr = 0.0;
tmScoreThrMode = TMSCORE_THRESHOLD_MODE_ALIGNMENT;
tmAlignHitOrder = TMALIGN_HIT_ORDER_AVG;
lddtThr = 0.0;
evalThr = 10;
sortByStructureBits = 1;
clusterSearch = 0;
minDiagScoreThr = 30;
maskBfactorThreshold = 0;
chainNameMode = 0;
minAssignedChainsThreshold = 0.0;
monomerIncludeMode = 0;
writeMapping = 0;
tmAlignFast = 1;
exactTMscore = 0;
gapOpen = 10;
gapExtend = 1;
nsample = 5000;
maskLowerCaseMode = 1;
coordStoreMode = COORD_STORE_MODE_CA_DIFF;
clusterSearch = 0;
inputFormat = 0; // auto detect
fileInclude = ".*";
fileExclude = "^$";
dbSuffixList = "_h,_ss,_ca";
indexExclude = 0;
multimerReportMode = 1;

// multimer
eValueThrExpandMultimer = 10000.0;
prostt5SplitLength = 1024;
prostt5Model = "";
multimerReportMode = 1;
dbExtractionMode = DB_EXTRACT_MODE_CHAIN;
distanceThreshold = 8.0;
filtMultimerTmThr = 0.0;
Expand Down
9 changes: 0 additions & 9 deletions src/workflow/EasyStructureSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,15 @@
void setEasyStructureSearchDefaults(Parameters *p) {
// TODO: 7-mer sensitivity is not optimized yet
p->kmerSize = 6;
p->maskMode = 0;
p->maskProb = 0.99995;
p->sensitivity = 9.5;
p->maxResListLen = 1000;
p->gapOpen = 10;
p->gapExtend = 1;
p->alignmentMode = Parameters::ALIGNMENT_MODE_SCORE_COV_SEQID;
p->removeTmpFiles = true;
p->reportMode = 2;
}
void setEasyStructureSearchMustPassAlong(Parameters *p) {
p->PARAM_K.wasSet = true;
p->PARAM_MASK_RESIDUES.wasSet = true;
p->PARAM_MASK_PROBABILTY.wasSet = true;
p->PARAM_NO_COMP_BIAS_CORR.wasSet = true;
p->PARAM_S.wasSet = true;
p->PARAM_GAP_OPEN.wasSet = true;
p->PARAM_GAP_EXTEND.wasSet = true;
p->PARAM_ALIGNMENT_MODE.wasSet = true;
p->PARAM_REMOVE_TMP_FILES.wasSet = true;
}
Expand Down
3 changes: 0 additions & 3 deletions src/workflow/StructureCluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ void setStructureClusterWorkflowDefaults(LocalParameters *p) {
p->maxResListLen = 1000;
p->kmersPerSequence = 300;
p->alignmentMode = Parameters::ALIGNMENT_MODE_SCORE_COV_SEQID;
p->maskMode = 0;
p->compBiasCorrection = 0;
p->gapOpen = 10;
p->gapExtend = 1;
}

//TODO this makes no sense for structures
Expand Down
2 changes: 1 addition & 1 deletion src/workflow/StructureIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int structureindex(int argc, const char **argv, const Command& command) {

par.parseParameters(argc, argv, command, true, 0, 0);
setStructureSearchMustPassAlong(&par);

par.PARAM_MASK_RESIDUES.wasSet = true;
std::string tmpDir = par.db2;
std::string hash = SSTR(par.hashParameter(command.databases, par.filenames, par.createindex));
if (par.reuseLatest) {
Expand Down
3 changes: 0 additions & 3 deletions src/workflow/StructureRbh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ namespace structureRbh{


void setStructureRbhDefaults(LocalParameters *p) {
p->maskMode = 0;
p->compBiasCorrection = 0;
p->sortByStructureBits = 0;
p->maskProb = 0.99995;
p->sensitivity = 9.5;
p->maxResListLen = 1000;
p->gapOpen = 10;
Expand Down
13 changes: 1 addition & 12 deletions src/workflow/StructureSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,16 @@

void setStructureSearchWorkflowDefaults(LocalParameters *p) {
p->kmerSize = 0;
p->maskMode = 0;
p->maskNrepeats = 10;
p->maskProb = 0.999995;
p->sensitivity = 9.5;
p->maxResListLen = 1000;
p->gapOpen = 10;
p->gapExtend = 1;
p->alignmentMode = Parameters::ALIGNMENT_MODE_SCORE_COV_SEQID;
p->removeTmpFiles = true;

}

void setStructureSearchMustPassAlong(LocalParameters *p) {
p->PARAM_K.wasSet = true;
p->PARAM_MASK_RESIDUES.wasSet = true;
p->PARAM_MASK_PROBABILTY.wasSet = true;
p->PARAM_MASK_N_REPEAT.wasSet = true;
p->PARAM_NO_COMP_BIAS_CORR.wasSet = true;
p->PARAM_S.wasSet = true;
p->PARAM_GAP_OPEN.wasSet = true;
p->PARAM_GAP_EXTEND.wasSet = true;
p->PARAM_MAX_SEQS.wasSet = true;
p->PARAM_ALIGNMENT_MODE.wasSet = true;
p->PARAM_REMOVE_TMP_FILES.wasSet = true;
}
Expand Down

0 comments on commit c438b91

Please sign in to comment.