Skip to content

Commit

Permalink
updated tests to sample centre of plots for consensus seq
Browse files Browse the repository at this point in the history
  • Loading branch information
KatyBrown committed May 22, 2024
1 parent f505217 commit 537e14d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/consensusSeqTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ def tearDown(self):
['tests/test_files/example2.fasta', 'aa']])
def testPlotResidueFrequencies(self, fasta, typ):
alignment, names = readMSA(fasta)
expected = image.imread("tests/test_files/expected_resfreq_%s.png" % typ)
expected = image.imread("tests/test_files/expected_resfreq_%s.png" % typ)[500:1000, 500:1000]
consensusSeq.plotResidueFrequencies(alignment, typ, self.dest)
imi = image.imread(self.dest)
imi = image.imread(self.dest)[500:1000, 500:1000]
simi = skimage.metrics.structural_similarity(expected,
imi,
channel_axis=-1,
Expand All @@ -207,9 +207,9 @@ def tearDown(self):
@parameterized.expand([['tests/test_files/example1.fasta']])
def testResidueChangeCount(self, fasta):
alignment, names = readMSA(fasta)
expected = image.imread("tests/test_files/expected_changecount.png")
expected = image.imread("tests/test_files/expected_changecount.png")[500:1000, 500:1000]
consensusSeq.residueChangeCount(alignment, 'nt', self.dest)
imi = image.imread(self.dest)
imi = image.imread(self.dest)[500:1000, 500:1000]
simi = skimage.metrics.structural_similarity(expected,
imi,
channel_axis=-1,
Expand Down

0 comments on commit 537e14d

Please sign in to comment.