def test_build_blast_db(self): me = Database() me.output = self.tmpdir me.makeblastdb = 'makeblastdb' copy(join(self.datadir, 'DnaK', 'linear.faa'), join(self.tmpdir, 'db.faa')) copy(join(self.datadir, 'DnaK', 'prot2tid.txt'), join(self.tmpdir, 'taxon.map')) me.build_blast_db() self.assertTrue(isdir(join(self.tmpdir, 'blast'))) for ext in ('phr', 'pin', 'pog', 'psd', 'psi', 'psq'): self.assertTrue(isfile(join(self.tmpdir, 'blast', f'db.{ext}'))) rmtree(join(self.tmpdir, 'blast')) remove(join(self.tmpdir, 'db.faa')) remove(join(self.tmpdir, 'taxon.map'))
def test_build_blast_db(self): me = Database() me.output = self.tmpdir me.makeblastdb = 'makeblastdb' me.tmpdir = self.tmpdir copy(join(self.datadir, 'DnaK', 'linear.faa'), join(self.tmpdir, 'db.faa')) with open(join(self.datadir, 'DnaK', 'prot2tid.txt'), 'r') as f: me.taxonmap = dict(x.split('\t') for x in f.read().splitlines()) me.build_blast_db() self.assertTrue(isdir(join(self.tmpdir, 'blast'))) for ext in ('phr', 'pin', 'pog', 'psd', 'psi', 'psq'): self.assertTrue(isfile(join(self.tmpdir, 'blast', f'db.{ext}'))) rmtree(join(self.tmpdir, 'blast')) remove(join(self.tmpdir, 'db.faa'))