def calc_mutation_rates(infasta, ref_seq):
    """Finds difference for each seqence in fasta file, given a reference sequence"""
    with open(infasta) as infasta:
        infasta = infasta.readlines()
    sequences = [line.strip() for line in infasta if line[0] != '>']

    distances = []
    for seq in sequences:
        dist = sum(1 for n1, n2 in zip(seq, ref_seq) if n1 != n2)
        distances.append(dist)
    return distances