Exemplo n.º 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')
Exemplo n.º 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)))
Exemplo n.º 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)))
Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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')