INNER CODE UNIT · Python

in_genus_list

kblin/ncbi-genome-download · ncbi_genome_download/core.py:331

    def in_genus_list(species, genus_list):
        for genus in genus_list:
            if config.fuzzy_genus:
                if species.lower().find(genus.lower()) > -1:
                    return True
            elif species.startswith(genus):
                return True
            # Be nice and also find capitalised species names if the user didn't
            elif species.startswith(genus.capitalize()):
                return True
        return False

    new_entries = []
    for entry in entries:
        if config.type_materials and config.type_materials != ['any']:
            requested_types = map(lambda x: config._RELATION_TO_TYPE_MATERIAL[x], config.type_materials)
            if not entry['relation_to_type_material'] or entry['relation_to_type_material'] not in requested_types:
                logger.debug("Skipping assembly with no reference to type material or reference to type material does "

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…