def _vectorize_sequence(sequence, amino_acid_ordering):
    """
    Computes a one-hot embedding of an input sequence.  
    
    Returns:
        - list. Non-zero indices of one-hot embedding matrix of a sequence.
                Non-flattened, this matrix has dimensions:
                    (sequence length, # of amino acids represented)
    """
    aa_len = len(amino_acid_ordering)
    
    vectorized = list()
    
    sequence_indexed = [(sidx, saa) for sidx, saa in enumerate(sequence) if saa in amino_acid_ordering]
    for sidx, saa in sequence_indexed:
        idxed = sidx * aa_len + amino_acid_ordering[saa]    

        vectorized.append(idxed)
    
    # Pad to equal length
    npad = len(sequence)  - len(vectorized)
    vectorized.extend(-1 for _ in range(npad))

    return vectorized