def load_fasta(path, seperator=None, verbose=False):
    """Loads a fasta file. Returns a dictionary with the scaffold names as the key and the sequence as the value."""
    if verbose:
        print("Starting to load fasta!")
    try:
        with open(path, "r") as f:
            scaffolds = {}
            current_scaffold = ""
            for line in f:

                line = line.strip()
                if len(line) == 0:
                    continue
                if line[0] == ">":
                    line = line[1:]
                    if seperator is not None:
                        line = line.split(seperator)
                        line = line[0]
                    scaffolds[line] = []
                    current_scaffold = line
                    #if verbose: print(f"scaffold {line} loading")
                else:
                    scaffolds[current_scaffold].append(line)
        f.close()
        for scaffold in scaffolds.keys():
            scaffolds[scaffold] = "".join(scaffolds[scaffold])
        if verbose:
            print("Loading fasta completed")
        return scaffolds
    except:
        raise Exception(f"Error with opening the fasta file \"{path}\"")