def genome_id_to_taxid(taxonomy_tsv):
    """Return a dictionary with GTDB taxid for each genome"""
    mapping = {}
    with open(taxonomy_tsv, "r") as fin:
        for line in fin:
            fields = [f.strip() for f in line.split("\t")]
            genome_id = fields[0]
            taxid = fields[1].split(";")[-1]
            mapping[genome_id] = taxid
    return mapping