def allele_reads_from_locus_reads(locus_reads, n_ref):
    """
    Given a collection of LocusRead objects, returns a
    list of AlleleRead objects
    (which are split into prefix/allele/suffix nucleotide strings).

    Parameters
    ----------
    locus_reads : sequence of LocusRead records

    n_ref : int
        Number of reference nucleotides affected by variant.

    Generates AlleleRead objects.
    """

    for locus_read in locus_reads:
        allele_read = AlleleRead.from_locus_read(locus_read, n_ref)
        if allele_read is None:
            continue
        else:
            yield allele_read
Given a collection of LocusRead objects, returns a
    list of AlleleRead objects
    (which are split into prefix/allele/suffix nucleotide strings).

    Parameters
    ----------
    locus_reads : sequence of LocusRead records

    n_ref : int
        Number of reference nucleotides affected by variant.

    Generates AlleleRead objects.