digestion using custom enzyme
Hi there!
First of all, thank you for your work. I discovered RPG through a poster during JOBIM (I don't remember the year).
I'm really interested in using RPG in my pipeline especially for the feature of adding new enzymes.
Some I've made some tests but I don't understand what I got.
I'm using Python 3.8.3 on Ubuntu 20.04.
- Test 1 :
$ rpg -a
Name of the new enzyme?
test1
Create a cleaving rule (c) or an exception (e)? (q) to quit:
c
Write your cleaving rule, (q) to quit:
(,E)
Create a cleaving rule (c) or an exception (e)? (q) to quit:
q
Add another enzyme? (y/n)
n
$ rpg -e 43 -s TETEEETEEE
>Input_0_test1_1_1_119.12038_5.97
T
>Input_1_test1_3_2_248.23588_3.36
ET
>Input_2_test1_4_1_147.13078_3.36
E
>Input_3_test1_5_1_147.13078_3.36
E
>Input_4_test1_7_2_248.23588_3.36
ET
>Input_5_test1_8_1_147.13078_3.36
E
>Input_6_test1_9_1_147.13078_3.36
E
>Input_7_test1_10_1_147.13078_3.36
E
Seems OK.
- Test 2 :
$ rpg -a
Name of the new enzyme?
test2
Create a cleaving rule (c) or an exception (e)? (q) to quit:
c
Write your cleaving rule, (q) to quit:
(,E)(E)
Create a cleaving rule (c) or an exception (e)? (q) to quit:
q
Add another enzyme? (y/n)
n
$ rpg -e 44 -s TETEEETEEE
>Input_0_test2_3_3_349.34098_3.36
TET
>Input_1_test2_4_1_147.13078_3.36
E
>Input_2_test2_7_3_377.35138_3.18
EET
>Input_3_test2_8_1_147.13078_3.36
E
>Input_4_test2_10_2_276.24628_3.18
EE
Seems OK.
Test 3 :
$ rpg -a
Name of the new enzyme?
test3
Create a cleaving rule (c) or an exception (e)? (q) to quit:
c
Write your cleaving rule, (q) to quit:
(,E)(E)(E)
Create a cleaving rule (c) or an exception (e)? (q) to quit:
q
Add another enzyme? (y/n)
n
$ rpg -e 45 -s TETEEETEEE
>Input_0_test3_1_1_119.12038_5.97
T
>Input_1_test3_3_2_248.23588_3.36
ET
>Input_2_test3_5_2_276.24628_3.18
EE
>Input_3_test3_7_2_248.23588_3.36
ET
>Input_4_test3_10_3_405.36178_3.08
EEE
Here is the part I don't understand. I would expect TET, EEET and EEE.
Of course I checked that I didn't make a mistake with the enzyme numbers.
$ rpg -l
1: Arg-C
...
42: Trypsin
43: test1
44: test2
45: test3
Here is the content of rpg_user.py file:
$ more ~/rpg_user.py
from rpg import enzyme
from rpg import rule
from rpg import enzymes_definition
AVAILABLE_ENZYMES_USER = []
CPT_ENZ = enzymes_definition.CPT_ENZ
### ENZYMES DECLARATION ###
# User-defined enzyme test1
ENZ = []
E_0 = rule.Rule(0, "E", True, 0) # Always cleaves before E, except...
ENZ.append(E_0)
ENZYME = enzyme.Enzyme(CPT_ENZ, "test1", ENZ, 0)
# Add it to available enzymes
AVAILABLE_ENZYMES_USER.append(ENZYME)
CPT_ENZ += 1
# User-defined enzyme test2
ENZ = []
E_0 = rule.Rule(0, "E", False, 0) # Never cleaves before E, except...
E_0E1 = rule.Rule(1, "E", True, -1) # Always cleaves before E, followed by E, except...
E_0.rules.append(E_0E1)
ENZ.append(E_0)
ENZYME = enzyme.Enzyme(CPT_ENZ, "test2", ENZ, 0)
# Add it to available enzymes
AVAILABLE_ENZYMES_USER.append(ENZYME)
CPT_ENZ += 1
# User-defined enzyme test3
ENZ = []
E_0 = rule.Rule(0, "E", False, 0) # Never cleaves before E, except...
E_0E2 = rule.Rule(2, "E", True, -1) # Always cleaves before E, followed by E, except...
E_0E2E1 = rule.Rule(1, "E", True, -1) # Always cleaves before E, followed by E, followed by E, except...
E_0E2.rules.append(E_0E2E1)
E_0.rules.append(E_0E2)
ENZ.append(E_0)
ENZYME = enzyme.Enzyme(CPT_ENZ, "test3", ENZ, 0)
# Add it to available enzymes
AVAILABLE_ENZYMES_USER.append(ENZYME)
CPT_ENZ += 1
Thank you for your help.