def fasta_to_lists(file_name):
    """Isolate deflines and sequences from FASTA"""
    with open(file_name, "r") as f:
        file = f.readlines()
    deflines = []
    sequences = []
    sequence = ""
    for line in file:
        if line.startswith(">"):
            deflines.append(line.rstrip().lstrip(">"))
            if sequence:
                sequences.append(sequence)
                sequence = ""
        else:
            sequence += line.rstrip()
    sequences.append(sequence)
    return deflines, sequences