Audit cleanup: remove dead param, dead commented code, stale docs

- Drop dead mask_unknown_residues=true from default(_rescore).groovy
  (param removed from Params.groovy in 1b7809a6, 2019; configs missed)
- Rewrite distro/models/readme.md to match models on disk (add rescore_2024,
  rescore_conservation; remove nonexistent conservation.model)
- Remove broken documentation/rescoring.md link from distro/README.md
- distro/config/readme.md: drop nonexistent working.groovy reference,
  fix github link master->develop
- Delete dead commented-out method bodies in PdbUtils, RPlotter,
  PredictionVisualizer
- Fix typo in Main.groovy javadoc
This commit is contained in:
rdk
2026-05-15 09:34:28 +02:00
parent 9fd7ffe0db
commit c6ee163ece
8 changed files with 15 additions and 137 deletions

View File

@@ -119,8 +119,6 @@ import cz.siret.prank.program.params.Params
*/
neutral_points_margin = 5.5
mask_unknown_residues = true
/**
* chem. properties representation neighbourhood radius in A
*/

View File

@@ -111,8 +111,6 @@ import cz.siret.prank.program.params.Params
*/
neutral_points_margin = 5.5
mask_unknown_residues = true
/**
* chem. properties representation neighbourhood radius in A
*/

View File

@@ -11,7 +11,7 @@ Parameters can be then overridden in a custom config file (`-c <config.file>`) o
Parameters can be set in 2 ways:
1. on the command line `-<param_name> <value>`
2. in config groovy file specified with `-c <config.file>` (see working.groovy for an example... `prank -c example.groovy`).
2. in config groovy file specified with `-c <config.file>` (see `example.groovy` for an example: `prank -c example.groovy`).
Parameters on the command line override those in the config file, which override defaults.
@@ -23,4 +23,4 @@ Parameter application priority (last wins):
5. parameters on the command line
To see a comprehensive list of all possible params see `Params.groovy` in the source code:
https://github.com/rdk/p2rank/blob/master/src/main/groovy/cz/siret/prank/program/params/Params.groovy
https://github.com/rdk/p2rank/blob/develop/src/main/groovy/cz/siret/prank/program/params/Params.groovy

View File

@@ -1,22 +1,26 @@
# Directory with pre-trained models
Prank looks here for the model specified by (`-model`/`-m`) parameter.
Prank looks here for the model specified by the `-model` / `-m` parameter.
The model should be always used only in combination with the parameters or config file that was used to train it.
The model should always be used only in combination with the parameters or config file that was used to train it.
I.e.: the feature extraction has to be executed with the same parameters.
## List of models
### P2Rank (pocket prediction)
* `default.model` ... trained on `chen11-fpocket.ds` using config `default.groovy`
* `conservation.model` ... trained on `chen11-fpocket.ds` using config `conservation.groovy`
* `conservation_hmm.model` ... trained on `chen11-fpocket.ds` using config `conservation_hmm.groovy`
* `alphafold.model` ... trained on `chen11-fpocket.ds` using config `alphafold.groovy`
* `alphafold_conservation_hmm.model` ... trained on `chen11-fpocket.ds` using config `alphafold_conservation_hmm.groovy`
* `default` ... config `default.groovy`
* `conservation_hmm` ... config `conservation_hmm.groovy` (uses HMMER-based sequence conservation)
* `alphafold` ... config `alphafold.groovy` (tuned for AlphaFold / NMR / cryo-EM structures, no b-factor)
* `alphafold_conservation_hmm` ... config `alphafold_conservation_hmm.groovy`
### PRANK (pocket rescoring)
* `default_rescore.model` ... trained on chen11-fpocket.ds using config `default_rescore.groovy`
* `default_rescore` ... config `default_rescore.groovy`
* `rescore_2024` ... config `rescore_2024.groovy` (newer model, recommended for AlphaFold / NMR / cryo-EM)
* `rescore_conservation` ... config `rescore_conservation.groovy` (rescoring with conservation features)
## Auxiliary
* `_score_transform/` — score-transformer JSON files (probability calibration, z-score) loaded by the models above.

View File

@@ -462,7 +462,7 @@ class Main implements Parametrized, Writable {
}
/**
* @return false if successful, true it there was some (recoverable) error during execution
* @return false if successful, true if there was some (recoverable) error during execution
*/
boolean run() {

View File

@@ -55,21 +55,6 @@ class PredictionVisualizer implements Parametrized {
pdb.close()
}
// void conditionallyZipVisualizations(List<File> fileList, String label) {
// if (params.zip_visualizations) {
// List<File> fileList = [new File(pmlf), new File(pointsf)]
// if (params.vis_copy_proteins) {
// fileList.add(new File(proteinfAbs))
// }
// File zipFile = new File("$outdir/${label}_visualization.zip")
// NameMapper mapper = { String fileName ->
// return fileName.endsWith(".pml") ? fileName : "data/".concat(fileName)
// }
// ZipUtil.packEntries(fileList.toArray(new File[0]) as File[], zipFile, mapper)
// fileList.forEach({ File f -> f.delete() })
// }
// }
//===========================================================================================================//
void generateVisualizations(Dataset.Item item, ModelBasedRescorer rescorer, PredictionPair pair) {

View File

@@ -391,78 +391,4 @@ class PdbUtils {
return newS;
}
// /**
// * Original code from Biojava 5.4 for comparison
// * see https://github.com/biojava/biojava/blob/9dcddeb0072ecc29aca8d8b1d43c3b18a430ac30/biojava-structure/src/main/java/org/biojava/nbio/structure/StructureTools.java#L1286
// *
// * Reduce a structure to provide a smaller representation . Only takes the
// * first model of the structure. If chainName is provided only return a
// * structure containing that Chain ID. Converts lower case chain IDs to
// * upper case if structure does not contain a chain with that ID.
// *
// * @param s
// * @param chainId
// * @return Structure
// * @since 3.0
// * @deprecated Use {@link StructureIdentifier#reduce(Structure)} instead (v. 4.2.0)
// */
// @Deprecated
// public static Structure getReducedStructure(Structure s,
// String chainId) throws StructureException {
// // since we deal here with structure alignments,
// // only use Model 1...
//
// Structure newS = new StructureImpl();
// newS.setPDBCode(s.getPDBCode());
// newS.setPDBHeader(s.getPDBHeader());
// newS.setName(s.getName());
// newS.setSSBonds(s.getSSBonds());
// newS.setDBRefs(s.getDBRefs());
// newS.setSites(s.getSites());
// newS.setBiologicalAssembly(s.isBiologicalAssembly());
// newS.setEntityInfos(s.getEntityInfos());
// newS.setSSBonds(s.getSSBonds());
// newS.setSites(s.getSites());
//
// if (chainId != null)
// chainId = chainId.trim();
//
// if (chainId == null || chainId.equals("")) {
// // only get model 0
// List<Chain> model0 = s.getModel(0);
// for (Chain c : model0) {
// newS.addChain(c);
// }
// return newS;
//
// }
//
// Chain c = null;
// try {
// c = s.getChainByPDB(chainId);
// } catch (StructureException e) {
// logger.warn(e.getMessage() + ". Chain id " + chainId
// + " did not match, trying upper case Chain id.");
// c = s.getChainByPDB(chainId.toUpperCase());
//
// }
// if (c != null) {
// newS.addChain(c);
// for (EntityInfo comp : s.getEntityInfos()) {
// if (comp.getChainIds() != null
// && comp.getChainIds().contains(c.getChainID())) {
// // found matching entity info. set description...
// newS.getPDBHeader().setDescription(
// "Chain " + c.getChainID() + " of " + s.getPDBCode()
// + " " + comp.getDescription());
// }
// }
// }
//
// return newS;
// }
}

View File

@@ -132,39 +132,6 @@ class RPlotter implements Parametrized {
rexec.runCode(rcode, label, outdir)
}
// @Deprecated
// void plot1DVariableOld(String name) {
//
// int column = header.indexOf(name)
//
// String tabf = "../"+Futils.shortName(csvfile) //FileUtils.relativize(csvfile, outdir)
//
// String rcode = """
// if (!require("ggplot2")) {
// install.packages("ggplot2", dependencies = TRUE, repos = "http://cran.us.r-project.org")
// library(ggplot2)
// }
// library(scales)
//
// r <- c("green4","green3","yellow","gold","red3")
//
// data <- read.csv("$tabf")
//
// xx = names(data)[1]
// yy = names(data)[${column+1}]
//
// p <- ggplot(data, aes_string(x=xx, y=yy, colour=yy, fill = yy))
//
// p + geom_bar(stat="identity", position = 'dodge', alpha = 3/4, color="gray20") + scale_fill_gradientn(colours=r) + theme(axis.text.x = element_text(angle = 340, hjust = 0))
//
// fname <- paste(yy,".png", sep="")
// ggsave(file=fname, dpi=$dpi)
// """
// // to add line plot: p + geom_line(size = 1, color="gray40") + geom_point(shape=18, size=4, color="gray20")
//
// rexec.runCode(rcode, name, outdir)
// }
/**
*
* @param tablef 2d csv table