def create_position_alignment(alignment):
    """
        Given an alignment with multiple sequences, assign ascending numbers 
        to the nucleotides of each sequence representing their positions. 
        Positions with gaps are skipped and assigned 0.
    """

    position_alignment = []
    for record in alignment:
        position_sequence = []
        pos = 1
        for c in record:
            if c == '-':
                # Assign 0 and skip gaps.
                position_sequence.append(0)
            else:
                # Assign ascending numbers.
                position_sequence.append(pos)
                pos += 1
        position_alignment.append(position_sequence)

    return position_alignment