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

relax unit test for HHblits search

Probability values of hits in HHblits searches using tag v3.2.0 and
the current master branch differ. We therefore only check whether we
find the expected number of hits and check their score in the hope
that the HHblits scores stay consistent in future HHblits releases.
parent dd848df1
No related branches found
No related tags found
No related merge requests found
......@@ -268,15 +268,12 @@ class TestHHblitsBindings(unittest.TestCase):
search_file = self.hh.Search("testfiles/testali.a3m",
'testfiles/hhblitsdb/unittestdb')
with open(search_file) as tfh:
tlst = tfh.readlines()
with open("testfiles/test_two.hhr") as efh:
elst = efh.readlines()
self.assertEqual(len(elst), len(tlst))
for i in range(0, len(elst)):
if not elst[i].startswith(('Date', 'Command')):
self.assertEqual(elst[i], tlst[i])
with open(search_file) as f:
header, hits = hhblits.ParseHHblitsOutput(f)
self.assertEqual(len(hits), 4)
exp_scores = [199.3, 12.3, 11.5, 8.1]
for hit_idx in range(4):
self.assertAlmostEqual(hits[hit_idx].score, exp_scores[hit_idx])
def testSearchNotWorking(self):
query_seq = seq.CreateSequence('Test', 'VLSPADKTNVKAAWGKVGAHAGEYGAEA'+
......
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