I have some protein sequences and I want to obtain all the possible subsequences of each one of them, containing 50 amino acids. The order of the amino acids should remain the same, I just want to split the protein in exactly 50 amino acids fragments, all possible combinations.
I’m writing the Python script below, but it’s not working. Could you help me?
> sequence = input("Digit the peptide sequence: ")
>
> def peptides(sequence):
> peptides_50 = []
> for i in range(0, len(sequence)+1):
> peptides_50 += sequence[i:i+4]
> print(peptides_50)
>
> peptides(sequence)
many thanks, Fabiano