def test_cmscan_fasta(self): params = {'--rfam': None, '--noali': None} for f in self.positive_fps: res = cmscan_fasta(self.cm_fp, f, self.temp_fp, 0.1, 1, params) res['StdOut'].close() res['StdErr'].close() obs = res['--tblout'] out_fp = '.'.join([f, 'tblout']) with open(out_fp) as exp: # skip comment lines as some contain running time info self.assertListEqual( [i for i in exp.readlines() if not i.startswith('#')], [j for j in obs.readlines() if not j.startswith('#')]) obs.close()
def test_cmscan_fasta_wrong_input(self): for fp in self.negative_fps: with self.assertRaisesRegex( ApplicationError, r'Error: Sequence file .* is empty or misformatted'): cmscan_fasta(self.cm_fp, fp, 'foo')