def remove_gaps(sequences):
    """
    Function that removes any gaps ('-') from the protein sequences in the input.
    The descriptors cannot be calculated if a '-' value is passsed into their
    respective funtions so gaps need to be removed. Removing the gaps has the same
    effect as setting the value at the index of the sequence to 0 and has no effect
    on the descriptors calculation. Input can be string, list of array of sequences.

    Parameters
    ----------
    sequences : str/list/np.ndarray
        string of 1 protein sequence or array/list of protein sequences.

    Returns
    -------
    protein_seqs : np.ndarray
        returns the same inputted protein sequences but with any gaps ('-') removed.
    """

    is_string=False   #bool needed to ensure correct output format if input is str

    if isinstance(sequences, str):
      is_string = True
      sequences = [sequences]     #convert single string into 1 element list

    #concatenate multiple sequences into 1 iterable list
    if isinstance(sequences, list) and \
      len(sequences)>1:
      # for i in range(0,len(protein_seqs)):
      #   protein_seqs[i] = ''.join(protein_seqs[i])
      sequences = [''.join(sequences)]

    #iterate through sequences, removing any gaps ('-')
    for row in range(0, len(sequences)):
        try:
            sequences[row] = sequences[row].replace("-","")
        except:
            raise ValueError('Error removing gaps from sequences at index {} '.format(row))

    #if input was str then join list of sequences into one str
    if is_string:
       sequences = ''.join(sequences)

    return sequences