def sliding_window(sequence, window_size, step_size):
    """Converts a sequence into sliding windows. Returns a list of sequences.
	- sequence: a string containing only nucleotides.
	- window_size: Windows of equal size sequence. Default is 500 bp.   
	- step_size: overlap required for sliding windows. Default is 250 bp.
	"""
    seq = []
    for start in range(0, len(sequence), step_size):
        end = start + window_size
        if end > len(sequence):
            seq.append(sequence[start:len(sequence)] + 'N' * (window_size -
                (len(sequence) - start)))
            break
        else:
            seq.append(sequence[start:end])
    return seq
