def test_annotation_invalid_out_dir(self): message = r"Directory .* does not exist." with self.assertRaisesRegex(ValueError, message): genomes.annotation('homo_sapiens', release=84, out_dir='/out/dir/that/does/not/exist', source='ensembl')
def test_annotation(self): genomes.annotation('homo_sapiens', release=84, out_dir=self.tempdir, annotation=self.tmpfile, source='ensembl') self.assertTrue( os.path.isfile(os.path.join(self.tempdir, self.tmpfile)))
def test_annotation(self): genomes.annotation('mouse', release='M15', out_dir=self.tempdir, annotation=self.tmpfile, source='gencode') self.assertTrue( os.path.isfile(os.path.join(self.tempdir, self.tmpfile)))
def test_annotation_invalid_release(self): message = r"Invalid release number." with self.assertRaisesRegex(ValueError, message): genomes.annotation('human', release='42000', source='gencode')
def test_annotation_invalid_species(self): message = r'Invalid species name.' with self.assertRaisesRegex(ValueError, message): genomes.annotation(species='invalid_species_name', release='26', source='gencode')
def test_bad_source(self): message = r'Source .* is not supported.' with self.assertRaisesRegex(ValueError, message): genomes.annotation('human', '27', source='invalid_source')
def test_annotation_invalid_release(self): message = r"Release should be a number between \d+ and \d+" with self.assertRaisesRegex(ValueError, message): genomes.annotation('homo_sapiens', 1, source='ensembl')
def test_annotation_invalid_species(self): message = r'Invalid species name.' with self.assertRaisesRegex(ValueError, message): genomes.annotation('invalid_species_name', 84, source='ensembl')