From f2f065b087fa332fae88e5436db6b1927c130162 Mon Sep 17 00:00:00 2001 From: rdk Date: Fri, 13 Nov 2020 17:42:27 +0100 Subject: [PATCH] bump version and update readme, update some scripts --- README.md | 43 +++++++++++++++++++++++++------------------ build.gradle | 2 +- changelog.md | 24 ------------------------ commit.sh | 2 +- distro/README.md | 43 +++++++++++++++++++++++++------------------ distro/prank | 2 +- experiment.sh | 2 +- logc.sh | 2 +- make-clean.sh | 2 +- make-distro.sh | 6 ++++-- make.sh | 2 +- prank.sh | 2 +- push.sh | 2 +- tests.sh | 6 ++++++ unit-tests.sh | 6 ++++++ update.sh | 2 +- 16 files changed, 76 insertions(+), 72 deletions(-) delete mode 100644 changelog.md create mode 100644 unit-tests.sh diff --git a/README.md b/README.md index 029bf325..5fbf50d3 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Ligand-binding site prediction based on machine learning.

-[![version 2.1](https://img.shields.io/badge/version-2.1-green.svg)](/build.gradle) +[![version 2.2](https://img.shields.io/badge/version-2.2-green.svg)](/build.gradle) [![Build Status](https://travis-ci.org/rdk/p2rank.svg?branch=master)](https://travis-ci.org/rdk/p2rank) [![License: MIT](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](/LICENSE.txt) @@ -17,14 +17,16 @@ P2Rank is a stand-alone command line program that predicts ligand-binding pocket ### Requirements -* Java 8 or newer +* Java 8 to 15 * PyMOL 1.7 (or newer) for viewing visualizations (optional) +Program is tested on Linux, macOS and Windows. On Windows, using `bash` console is recommended to execute the program instead of `cmd` or `PowerShell`. + ### Setup -P2Rank requires no installation. Binary packages can be downloaded from the project website. +P2Rank requires no installation. Binary packages are available as GitHub Releases. -* **Download**: http://siret.ms.mff.cuni.cz/p2rank +* **Download**: https://github.com/rdk/p2rank/releases * Source code: https://github.com/rdk/p2rank * Datasets: https://github.com/rdk/p2rank-datasets @@ -36,17 +38,27 @@ P2Rank requires no installation. Binary packages can be downloaded from the proj See more usage examples below... -### Build +### Build from sources This project uses [Gradle](https://gradle.org/) build system via included Gradle wrapper. +On Windows use `bash` to execute build comands (`bash` is installed as a part of [Git for Windows](https://git-scm.com/download/win)). -Build with `./make.sh` or `./gradlew assemble`. +```bash +git clone https://github.com/rdk/p2rank.git && cd p2rank +./make.sh +./unit-tests.sh # optionally you can run tests to check everything works on your machine +``` +Now you can run the program via: +```bash +distro/prank # standard mode that logs to distro/log/prank.log +./prank.sh # development mode that logs to console +``` ### Algorithm P2Rank makes predictions by scoring and clustering points on the protein's solvent accessible surface. Ligandability score of individual points is determined by a machine learning based model trained on the dataset of known protein-ligand complexes. For more details see slides and publications. -Slides introducing original version of the algotithm: http://bit.ly/p2rank_slides +Presentation slides introducing original version of the algotithm: [Slides (pdf)](http://bit.ly/p2rank_slides) ### Publications @@ -82,10 +94,10 @@ prank predict test.ds # run on whole dataset (contai prank predict -f test_data/1fbl.pdb # run on single pdb file prank predict -f test_data/1fbl.pdb.gz # run on single gzipped pdb file -prank predict -threads 8 test.ds # specify no. of working threads for parallel processing -prank predict -o output_here test.ds # explicitly specify output directory -prank predict -c predict2.groovy test.ds # specify configuration file (predict2.groovy uses - different prediction model and combination of parameters) +prank predict -threads 8 test.ds # specify no. of working threads for parallel processing +prank predict -o output_here test.ds # explicitly specify output directory +prank predict -c conservation.groovy test.ds # specify configuration file (conservation.groovy + # uses different prediction model and parameters) ~~~ ### Evaluate prediction model @@ -135,13 +147,8 @@ P2Rank is also able to rescore pockets predicted by other methods ~~~bash prank rescore test_data/fpocket.ds prank rescore fpocket.ds # test_data/ is default 'dataset_base_dir' -prank rescore fpocket.ds -o output_dir # test_output/ is default 'output_base_dir' -~~~ - -### Evaluate rescoring model - -~~~ -prank eval-rescore fpocket.ds +prank rescore fpocket.ds -o output_dir # test_output/ is default 'output_base_dir' +prank eval-rescore fpocket.ds # evaluate rescoring model ~~~ ## Comparison with Fpocket diff --git a/build.gradle b/build.gradle index 5cb52f6d..2a4d3de6 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'idea' group = 'cz.siret' -version = '2.2-rc.1' +version = '2.2' description = 'Ligand binding site prediction based on machine learning.' diff --git a/changelog.md b/changelog.md deleted file mode 100644 index 61b6fc43..00000000 --- a/changelog.md +++ /dev/null @@ -1,24 +0,0 @@ - -# Changelog - -This files track major changes in development versions of P2RANK since version 2.0-dev.6. - - -## 2.0-dev.7 - -- "chem" and "volsite" feature sets - - original features were moved to those two feature sets and can be turned off through `-estra_features` param -- FasterForest - - streamlined implementation of FastRandomForest (~ 0.75x time, 0.5x memory, same algorithm) -- AUC (area under ROC curve) and AUPRC (area under Precision-Recall curve) metrics - - can be turned on with `-stats_collect_predictions 1` param -- improved logging - - possible to log to a file inside the output directory - - related params: `-log_to_file 1`, `-zip_log_file 1`, `-log_to_console 1`, `-log_level WARN` - - - ## 2.0-dev.6 - - - - diff --git a/commit.sh b/commit.sh index ee0a6730..b37abce7 100755 --- a/commit.sh +++ b/commit.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash MSG="$1" if [[ -z "$1" ]]; then diff --git a/distro/README.md b/distro/README.md index 029bf325..5fbf50d3 100644 --- a/distro/README.md +++ b/distro/README.md @@ -7,7 +7,7 @@ Ligand-binding site prediction based on machine learning.

-[![version 2.1](https://img.shields.io/badge/version-2.1-green.svg)](/build.gradle) +[![version 2.2](https://img.shields.io/badge/version-2.2-green.svg)](/build.gradle) [![Build Status](https://travis-ci.org/rdk/p2rank.svg?branch=master)](https://travis-ci.org/rdk/p2rank) [![License: MIT](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](/LICENSE.txt) @@ -17,14 +17,16 @@ P2Rank is a stand-alone command line program that predicts ligand-binding pocket ### Requirements -* Java 8 or newer +* Java 8 to 15 * PyMOL 1.7 (or newer) for viewing visualizations (optional) +Program is tested on Linux, macOS and Windows. On Windows, using `bash` console is recommended to execute the program instead of `cmd` or `PowerShell`. + ### Setup -P2Rank requires no installation. Binary packages can be downloaded from the project website. +P2Rank requires no installation. Binary packages are available as GitHub Releases. -* **Download**: http://siret.ms.mff.cuni.cz/p2rank +* **Download**: https://github.com/rdk/p2rank/releases * Source code: https://github.com/rdk/p2rank * Datasets: https://github.com/rdk/p2rank-datasets @@ -36,17 +38,27 @@ P2Rank requires no installation. Binary packages can be downloaded from the proj See more usage examples below... -### Build +### Build from sources This project uses [Gradle](https://gradle.org/) build system via included Gradle wrapper. +On Windows use `bash` to execute build comands (`bash` is installed as a part of [Git for Windows](https://git-scm.com/download/win)). -Build with `./make.sh` or `./gradlew assemble`. +```bash +git clone https://github.com/rdk/p2rank.git && cd p2rank +./make.sh +./unit-tests.sh # optionally you can run tests to check everything works on your machine +``` +Now you can run the program via: +```bash +distro/prank # standard mode that logs to distro/log/prank.log +./prank.sh # development mode that logs to console +``` ### Algorithm P2Rank makes predictions by scoring and clustering points on the protein's solvent accessible surface. Ligandability score of individual points is determined by a machine learning based model trained on the dataset of known protein-ligand complexes. For more details see slides and publications. -Slides introducing original version of the algotithm: http://bit.ly/p2rank_slides +Presentation slides introducing original version of the algotithm: [Slides (pdf)](http://bit.ly/p2rank_slides) ### Publications @@ -82,10 +94,10 @@ prank predict test.ds # run on whole dataset (contai prank predict -f test_data/1fbl.pdb # run on single pdb file prank predict -f test_data/1fbl.pdb.gz # run on single gzipped pdb file -prank predict -threads 8 test.ds # specify no. of working threads for parallel processing -prank predict -o output_here test.ds # explicitly specify output directory -prank predict -c predict2.groovy test.ds # specify configuration file (predict2.groovy uses - different prediction model and combination of parameters) +prank predict -threads 8 test.ds # specify no. of working threads for parallel processing +prank predict -o output_here test.ds # explicitly specify output directory +prank predict -c conservation.groovy test.ds # specify configuration file (conservation.groovy + # uses different prediction model and parameters) ~~~ ### Evaluate prediction model @@ -135,13 +147,8 @@ P2Rank is also able to rescore pockets predicted by other methods ~~~bash prank rescore test_data/fpocket.ds prank rescore fpocket.ds # test_data/ is default 'dataset_base_dir' -prank rescore fpocket.ds -o output_dir # test_output/ is default 'output_base_dir' -~~~ - -### Evaluate rescoring model - -~~~ -prank eval-rescore fpocket.ds +prank rescore fpocket.ds -o output_dir # test_output/ is default 'output_base_dir' +prank eval-rescore fpocket.ds # evaluate rescoring model ~~~ ## Comparison with Fpocket diff --git a/distro/prank b/distro/prank index 0a034def..b1a170b1 100755 --- a/distro/prank +++ b/distro/prank @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Set maximum memory for JVM heap diff --git a/experiment.sh b/experiment.sh index 2335f3c1..49e4e2ad 100755 --- a/experiment.sh +++ b/experiment.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # run experiment ant push results to p2rank-results git repo diff --git a/logc.sh b/logc.sh index 1bd7c2d4..482e444e 100755 --- a/logc.sh +++ b/logc.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # color lines of log output diff --git a/make-clean.sh b/make-clean.sh index d93c8b13..81e8a50f 100755 --- a/make-clean.sh +++ b/make-clean.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash ./gradlew clean assemble \ No newline at end of file diff --git a/make-distro.sh b/make-distro.sh index 9ecd1ac4..7ac3510f 100755 --- a/make-distro.sh +++ b/make-distro.sh @@ -1,6 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash -# creates binary distribution package +# +# creates binary distribution package for release +# set -e diff --git a/make.sh b/make.sh index 2c13b251..9922bfa0 100755 --- a/make.sh +++ b/make.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash ./gradlew assemble \ No newline at end of file diff --git a/prank.sh b/prank.sh index 97abbad7..f756a4d7 100755 --- a/prank.sh +++ b/prank.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # script for running development builds in-place from this directory diff --git a/push.sh b/push.sh index 597a027c..1ac91d8f 100755 --- a/push.sh +++ b/push.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/tests.sh b/tests.sh index b9e2d91c..7efef94b 100755 --- a/tests.sh +++ b/tests.sh @@ -3,5 +3,11 @@ # # run test sets # +# Examples: +# +# ./tests.sh quick # fast set of basic tests +# ./tests.sh all # comprehensive set of tests that include training an evaluation on real datasets +# # datasets from https://github.com/rdk/p2rank-datasets have to be downloaded first +# misc/test-scripts/testsets.sh $@ \ No newline at end of file diff --git a/unit-tests.sh b/unit-tests.sh new file mode 100644 index 00000000..feacdc8d --- /dev/null +++ b/unit-tests.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# +# run unit tests +# +./gradlew test \ No newline at end of file diff --git a/update.sh b/update.sh index e0aadaae..a776fcb7 100755 --- a/update.sh +++ b/update.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # fail fast