From ba41cade78c6e0d815c1d6be52e752c2aef32657 Mon Sep 17 00:00:00 2001 From: Gerardo Tauriello <gerardo.tauriello@unibas.ch> Date: Thu, 13 Jul 2017 15:22:41 +0200 Subject: [PATCH] Clarify use of numpy and scipy in QS scorer. --- modules/mol/alg/pymod/qsscoring.py | 2 ++ modules/mol/alg/tests/test_qsscoring.py | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/mol/alg/pymod/qsscoring.py b/modules/mol/alg/pymod/qsscoring.py index 935241bc6..2d0bac6de 100644 --- a/modules/mol/alg/pymod/qsscoring.py +++ b/modules/mol/alg/pymod/qsscoring.py @@ -10,6 +10,8 @@ Scoring of quaternary structures as in Martino's 2017 paper. when executing scripts with ``ost``. Otherwise, you must set this with :func:`~ost.conop.SetDefaultLib`. - ClustalW must be installed (unless you provide chain mappings) + - Python modules `numpy` and `scipy` must be installed and available + (e.g. use ``pip install scipy numpy``) Authors: Gerardo Tauriello, Martino Bertoni """ diff --git a/modules/mol/alg/tests/test_qsscoring.py b/modules/mol/alg/tests/test_qsscoring.py index 4351c0509..17735209e 100644 --- a/modules/mol/alg/tests/test_qsscoring.py +++ b/modules/mol/alg/tests/test_qsscoring.py @@ -1,7 +1,13 @@ import unittest, os, sys import ost from ost import io, mol, settings -from ost.mol.alg.qsscoring import * +# check if we can import: fails if numpy or scipy not available +try: + from ost.mol.alg.qsscoring import * +except ImportError: + print "Failed to import qsscoring. Happens when numpy or scipy missing. " \ + "Ignoring test_qsscoring.py tests." + sys.exit(0) def _LoadFile(file_name): -- GitLab