Esempio n. 1
0
 def test_hmmscan_fasta(self):
     params = {'--noali': None}
     for f in self.positive_fps:
         res = hmmscan_fasta(self.hmm_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()
Esempio n. 2
0
 def test_hmmscan_fasta(self):
     params = {'--noali': None}
     for f in self.positive_fps:
         res = hmmscan_fasta(self.hmm_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()
Esempio n. 3
0
 def test_hmmscan_fasta_wrong_input(self):
     for fp in self.negative_fps:
         with self.assertRaisesRegex(
                 ApplicationError,
                 r'Error: Sequence file .* is empty or misformatted'):
             hmmscan_fasta(self.hmm_fp, fp, 'foo')
Esempio n. 4
0
 def test_hmmscan_fasta_wrong_input(self):
     for fp in self.negative_fps:
         with self.assertRaisesRegex(
                 ApplicationError,
                 r'Error: Sequence file .* is empty or misformatted'):
             hmmscan_fasta(self.hmm_fp, fp, 'foo')