Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def normalize_release_properties(ensembl_release, species):
"""
Make sure a given release is valid, normalize it to be an integer,
normalize the species name, and get its associated reference.
"""
ensembl_release = check_release_number(ensembl_release)
if not isinstance(species, Species):
species = find_species_by_name(species)
reference_name = species.which_reference(ensembl_release)
return ensembl_release, species.latin_name, reference_name
def normalize_init_values(cls, release, species, server):
"""
Normalizes the arguments which uniquely specify an EnsemblRelease
genome.
"""
release = check_release_number(release)
species = check_species_object(species)
return (release, species, server)