Skip to content
Snippets Groups Projects
Commit 7803c43a authored by Léo Schneider's avatar Léo Schneider Committed by Schneider Leo
Browse files

trypsine seq cutting routine

parent 02aaaa70
No related branches found
No related tags found
No related merge requests found
ALPHABET_UNMOD = {
"A": 1,
"C": 2,
"D": 3,
"E": 4,
"F": 5,
"G": 6,
"H": 7,
"I": 8,
"K": 9,
"L": 10,
"M": 11,
"N": 12,
"P": 13,
"Q": 14,
"R": 15,
"S": 16,
"T": 17,
"V": 18,
"W": 19,
"Y": 20,
}
# trypsin cut after A or L (if not followed by P)
def cut(seq, format):
cuts = []
l = len(seq)
if format == 'alphabetical':
for i in range(l):
if seq[i] == 'A' or seq[i] == 'L':
if i < l - 1 and seq[i + 1] != 'P':
cuts.append(i)
if format == 'numerical':
for i in range(l):
if seq[i] == 1 or seq[i] == 10:
if i < l - 1 and seq[i + 1] != 13:
cuts.append(i)
return cuts
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment