From f2f065b087fa332fae88e5436db6b1927c130162 Mon Sep 17 00:00:00 2001
From: rdk
-[](/build.gradle)
+[](/build.gradle)
[](https://travis-ci.org/rdk/p2rank)
[](/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