示例#1
0
 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')
示例#2
0
 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)))
示例#3
0
 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)))
示例#4
0
 def test_annotation_invalid_release(self):
     message = r"Invalid release number."
     with self.assertRaisesRegex(ValueError, message):
         genomes.annotation('human', release='42000', source='gencode')
示例#5
0
 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')
示例#6
0
 def test_bad_source(self):
     message = r'Source .* is not supported.'
     with self.assertRaisesRegex(ValueError, message):
         genomes.annotation('human', '27', source='invalid_source')
示例#7
0
 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')
示例#8
0
 def test_annotation_invalid_species(self):
     message = r'Invalid species name.'
     with self.assertRaisesRegex(ValueError, message):
         genomes.annotation('invalid_species_name', 84, source='ensembl')