Skip to content

Commit

Permalink
add report-paths argument to toggle paths in msa2lddt output
Browse files Browse the repository at this point in the history
  • Loading branch information
gamcil committed Jul 30, 2024
1 parent e19eb74 commit dc66166
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/commons/FoldmasonParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FoldmasonParameters::FoldmasonParameters() :
PARAM_BITFACTOR_3DI(PARAM_BITFACTOR_3DI_ID, "--bitfactor-3di", "3Di matrix bit factor", "3Di matrix bit factor", typeid(float), (void *) &bitFactor3Di, "^([0-9]*\\.[0-9]*)$"),
PARAM_PAIR_THRESHOLD(PARAM_PAIR_THRESHOLD_ID, "--pair-threshold", "LDDT pair threshold", "% of pair subalignments with LDDT information [0.0,1.0]",typeid(float), (void *) &pairThreshold, "^0(\\.[0-9]+)?|1(\\.0+)?$"),
PARAM_REPORT_COMMAND(PARAM_REPORT_COMMAND_ID, "--report-command", "", "", typeid(std::string), (void *) &reportCommand, ""),
PARAM_REPORT_PATHS(PARAM_REPORT_PATHS_ID, "--report-paths", "", "", typeid(bool), (void *) &reportPaths, ""),
PARAM_REFINE_SEED(PARAM_REFINE_SEED_ID, "--refine-seed", "Random number generator seed", "Random number generator seed", typeid(int), (void *) &refinementSeed, "^([-]?[0-9]*)$")
{
// structuremsa
Expand Down Expand Up @@ -59,6 +60,7 @@ FoldmasonParameters::FoldmasonParameters() :
msa2lddt.push_back(&PARAM_GUIDE_TREE);
msa2lddt.push_back(&PARAM_V);
msa2lddt.push_back(&PARAM_REPORT_COMMAND);
msa2lddt.push_back(&PARAM_REPORT_PATHS);
// refinemsa
refinemsa = combineList(refinemsa, structuremsa);
Expand All @@ -81,6 +83,7 @@ FoldmasonParameters::FoldmasonParameters() :
matchRatio = 0.51;
guideTree = "";
reportCommand = "";
reportPaths = true;
recomputeScores = false;
regressive = false;
precluster = false;
Expand Down
2 changes: 2 additions & 0 deletions src/commons/FoldmasonParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class FoldmasonParameters : public LocalParameters {
PARAMETER(PARAM_BITFACTOR_3DI)
PARAMETER(PARAM_PAIR_THRESHOLD)
PARAMETER(PARAM_REPORT_COMMAND)
PARAMETER(PARAM_REPORT_PATHS)
PARAMETER(PARAM_REFINE_SEED)

MultiParam<PseudoCounts> pcaAa;
Expand All @@ -62,6 +63,7 @@ class FoldmasonParameters : public LocalParameters {
float bitFactorAa;
float bitFactor3Di;
std::string reportCommand;
bool reportPaths;
float pairThreshold;
int refinementSeed;
};
Expand Down
14 changes: 9 additions & 5 deletions src/strucclustutils/msa2lddt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,15 @@ R"html(<!DOCTYPE html>
end.append(tree);
end.append("\",");
}
end.append("\"statistics\": {\"db\":\"");
end.append(par.db1);
end.append("\",\"msaFile\":\"");
end.append(par.db2);
end.append("\",\"msaLDDT\":");
end.append("\"statistics\": {");
if (par.reportPaths) {
end.append("\"db\":\"");
end.append(par.db1);
end.append("\",\"msaFile\":\"");
end.append(par.db2);
end.append("\",");
}
end.append("\"msaLDDT\":");
end.append(std::to_string(lddtScore));

if (par.reportCommand != "") {
Expand Down

0 comments on commit dc66166

Please sign in to comment.