def crunchHomopolymers(motifList):
    """
    Take as input a list of target motifs, collapse poly-nucleotide tracks, return list of collapsed motifs.
    """
    # List to catch all collapsed motifs.
    crunchList = list()
    # For each motif
    for motif in motifList:
        # Create empty list to catch not repeated bases.
        noReps = list()
        # Walk through original motif base-by-base.
        for base in motif:
            # If list of kept bases in empty, add first base.
            if not noReps:
                noReps.append(base)
            # If list exists and base is not same as last, store new base.
            elif base != noReps[-1]:
                noReps.append(base)
        # Convert list to string and store new motif
        crunchList.append(''.join(noReps))
    # Convert to set to remove duplicates and return
    return list(set(crunchList))