def krakenID2dict(dbfile, taxid_list):
    """
    Get name for each taxonomy ID from kraken database
    """
    # iterate through inspect file and lookup taxonomy ids
    k=0
    taxdict = {'0': 'unclassified'}

    with open(dbfile) as f:
        for line in f:
            if line.startswith("#"):
                continue
            
            # string to list
            line = line[:-1].split('\t')
            taxid_db = line[4]
            taxname = line[5].lstrip()
            
            if taxid_db in taxid_list:
                taxdict[taxid_db] = taxname
    
    return taxdict