Skip to content
Snippets Groups Projects
Commit 321b7f05 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

fix qsscoring unit test

parasail produces slightly different alignments for one test case
parent 99a1fdb2
No related branches found
No related tags found
No related merge requests found
import unittest, os, sys
import ost
from ost import io, mol, settings
from ost import io, mol, settings, seq
# check if we can import: fails if numpy or scipy not available
try:
from ost.mol.alg.qsscoring import *
......@@ -301,8 +301,18 @@ class TestQSscore(unittest.TestCase):
ent_1 = _LoadFile('4dvh.1.pdb') # A2, symmetry: C2
ent_2 = _LoadFile('4br6.1.pdb') # A4, symmetry: D2
qs_scorer = QSscorer(ent_1, ent_2)
self.assertAlmostEqual(qs_scorer.global_score, 0.147, 2)
self.assertAlmostEqual(qs_scorer.best_score, 0.866, 2)
# The alignments from parasail slightly differ. The sequence identities
# are in the range 40% but slightly lower for parasail alignments.
# however, the parasail alignments appear less gappy and "nicer".
# They nevertheless lead to lower QS-score.
if seq.alg.ParasailAvailable():
self.assertAlmostEqual(qs_scorer.global_score, 0.14757304498883386, 2)
self.assertAlmostEqual(qs_scorer.best_score, 0.7878766697963304, 2)
else:
self.assertAlmostEqual(qs_scorer.global_score, 0.14797023263299844, 2)
self.assertAlmostEqual(qs_scorer.best_score, 0.8666616636985371, 2)
self._CheckScorer(qs_scorer)
# check properties
self.assertFalse(qs_scorer.calpha_only)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment