def set_fragment_indicies(x):
    """ Returns the indicees without leading and trailing gaps.
    
    Parameters
    ----------
    x = string sequence
    
    Returns
    -------
    list of start index and end index with the first and last non gap character
    
    """
    e = len(x)
    ei = e
    si = 0
    for i in range(ei): 
        if x[i] == '-' and si == i:
            si = i + 1
        if x[e - i - 1] == '-' and ei == e - i:
            ei = e - i - 1
        if ei == si:
            break
    return [si, ei]