-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from sybila/improve-parsing
Parsing improvements - merge `improve-parsing` into `master`
- Loading branch information
Showing
88 changed files
with
2,480 additions
and
1,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import os | ||
|
||
def get_model_str(model_name: str) -> str: | ||
if not os.path.splitext(model_name)[1]: | ||
model_name += ".txt" | ||
script_dir = os.path.dirname(os.path.abspath(__file__)) | ||
file_path = os.path.join(script_dir, model_name) | ||
|
||
try: | ||
with open(file_path, "r") as file: | ||
model_str = file.read() | ||
return model_str | ||
except FileNotFoundError: | ||
print(f"File {file_path} not found") | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! rules | ||
X()::rep => @ k1*[X()::rep] | ||
Z()::rep => X()::rep | ||
=> Y()::rep @ 1/(1+([X()::rep])**4) | ||
|
||
#! inits | ||
2 X()::rep | ||
Y()::rep | ||
|
||
#! definitions | ||
k1 = 0.05 | ||
k2 = 0.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! rules | ||
X(K{i})::rep => X(K{p})::rep @ k1*[X()::rep] | ||
X(T{a})::rep => X(T{o})::rep @ k2*[Z()::rep] | ||
=> Y(P{f})::rep @ 1/(1+([X()::rep])**4) | ||
|
||
#! inits | ||
2 X(K{c}, T{e}).X(K{c}, T{j})::rep | ||
Y(P{g}, N{l})::rep | ||
|
||
#! definitions | ||
k1 = 0.05 | ||
k2 = 0.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! rules | ||
Y{i}::rep => Y{a}::rep @ p*[Y{i}::rep] | ||
Y{i}::rep => Y{-}::rep @ (1-p)*[Y{i}::rep] | ||
X()::rep + Y{a}::rep => X().Y{a}::rep @ q*[X()::rep]*[Y{a}::rep] | ||
X(K{i}).Y{_}::rep => X(K{p}).Y{_}::rep @ p*[X(K{i}).Y{_}::rep] // also here | ||
|
||
#! inits | ||
2 X(K{i})::rep | ||
1 Y{i}::rep | ||
|
||
#! definitions | ||
p = 0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#! rules | ||
X()::rep => @ k1*[X()::rep] | ||
Z()::rep => X()::rep @ k2 | ||
=> Y()::rep @ 1/(1+([X()::rep])**4) | ||
|
||
#! inits | ||
2 X()::rep | ||
Y()::rep | ||
|
||
#! definitions | ||
k2 = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! rules | ||
// commenting | ||
X(K{i})::rep => X(K{p})::rep @ k1*[X()::rep] // also here | ||
X(T{a})::rep => X(T{o})::rep @ k2*[Z()::rep] | ||
=> Y(P{f})::rep @ 1/(1+([X()::rep])**4) // ** means power (^) | ||
|
||
#! inits | ||
2 X(K{c}, T{e})::rep | ||
Y(P{g}, N{l})::rep | ||
|
||
#! definitions | ||
k2 = 0.05 // also comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! rules | ||
X()::rep => @ k1*[X()::rep] | ||
Z()::rep => X()::rep @ k2 | ||
=> Y()::rep @ 1/(1+([X()::rep])**4) | ||
|
||
#! inits | ||
2 X()::rep | ||
Y()::rep | ||
|
||
#! definitions | ||
k2 = 5 | ||
k1 = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! rules | ||
// commenting | ||
X(K{i})::rep => X(K{p})::rep @ k1*[X()::rep] // also here | ||
X(T{a})::rep => X(T{o})::rep @ k2*[Z()::rep] | ||
=> Y(P{f})::rep @ 1/(1+([X()::rep])**4) // ** means power (^) | ||
|
||
#! inits | ||
2 X(K{c}, T{e}).X(K{c}, T{j})::rep | ||
Y(P{g}, N{l})::rep | ||
|
||
#! definitions | ||
k2 = 0.05 // also comment | ||
k1 = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! rules | ||
=> K(S{u},T{i})::cyt @ omega | ||
K(S{u})::cyt => K(S{p})::cyt @ alpha*[K(S{u})::cyt] | ||
K(S{p})::cyt + B{a}::cyt => K(S{p}).B{a}::cyt @ beta*[K(S{p})::cyt]*[B{a}::cyt] | ||
B{_}::cyt => @ gamma*[B{_}::cyt] | ||
K(S{u},T{i}).B{a}::cyt => @ 5 | ||
|
||
#! inits | ||
1 B{a}::cyt | ||
|
||
#! definitions | ||
alpha = 10 | ||
beta = 5 | ||
gamma = 2 | ||
omega = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! rules | ||
=> X()::rep @ k2*[T{_}::rep] | ||
T{a}::rep => T{i}::rep @ k1*[T{_}::rep] | ||
|
||
#! inits | ||
10 T{a}::rep | ||
|
||
#! definitions | ||
k1 = 0.05 | ||
k2 = 0.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! rules | ||
=> 2 K(S{u},T{i})::cyt @ omega | ||
K(S{u})::cyt => K(S{p})::cyt @ alpha*[K(S{u})::cyt] | ||
K(S{p})::cyt + B{a}::cyt => K(S{p}).B{a}::cyt @ beta*[K(S{p})::cyt]*[B{a}::cyt] | ||
B{_}::cyt => @ gamma*[B{_}::cyt] | ||
K(S{u},T{i}).B{a}::cyt => @ 5 | ||
|
||
#! inits | ||
6 B{a}::cyt | ||
|
||
#! definitions | ||
alpha = 10 | ||
beta = 5 | ||
gamma = 2 | ||
omega = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#! rules | ||
S{i}::A()::A2::cell => A()::cell | ||
|
||
#! complexes | ||
A2 = A().A() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#! rules | ||
S{i}::A()::A().A()::cell => A()::cell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! rules | ||
=> K(S{u},T{i})::cyt @ omega | ||
K(S{u})::cyt => K(S{p})::cyt @ alpha*[K(S{u})::cyt] | ||
K(S{p})::cyt + B{a}::cyt => K(S{p}).B{a}::cyt @ beta*[K(S{p})::cyt]*[B{a}::cyt] | ||
B{_}::cyt => @ gamma*[B{_}::cyt] | ||
K(S{u},T{i}).B{a}::cyt => @ 5 | ||
|
||
#! inits | ||
10 B{a}::cyt | ||
|
||
#! definitions | ||
alpha = 10 | ||
beta = 5 | ||
gamma = 2 | ||
omega = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! rules | ||
=> A{i}::cyt @ k | ||
=> C{i}::cyt @ k | ||
|
||
#! inits | ||
2 B{i}::cyt | ||
|
||
#! definitions | ||
k = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#! rules | ||
K(S{i}).B()::cyt + C{_}::cell => K(S{i})::cyt + B()::cyt + C{_}::cell @ 3*[K(S{i}).B()::cyt]/2*v_1 | ||
A{p}.K(S{i})::cyt => A{i}::cyt + K(S{a})::cyt + C{a}::cyt @ 0.3*[A{p}.K(S{i})::cyt] | ||
K(S{i},T{i})::cyt + C{_}::cell => K(S{a},T{i})::cyt @ k2*[K(S{i},T{i})::cyt] | ||
C{_}::cell + C{_}::cell => C{_}.C{_}::cell @ v_1*[C{_}::cell]**2 | ||
C{_}::cell + K()::cell => C{_}.K()::cell @ v_1*[C{_}::cell]**2 | ||
|
||
#! inits | ||
2 K(S{i},T{i}).B(T{a})::cyt | ||
1 A{p}.K(S{i},T{i})::cyt | ||
2 C{i}::cell | ||
1 C{a}::cell | ||
|
||
#! definitions | ||
v_1 = 0.05 | ||
k2 = 0.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! rules | ||
S{u}::KaiC()::KaiC6::cyt => S{p}::KaiC()::KaiC6::cyt @ (kcat1*[KaiA2()::cyt]*[KaiC6::cyt])/(Km + [KaiC6::cyt]) | ||
S{p}::KaiC()::KaiC6::cyt => S{u}::KaiC()::KaiC6::cyt @ (kcat2*[KaiB4{a}.KaiA2()::cyt]*[KaiC6::cyt])/(Km + [KaiC6::cyt]) | ||
T{u}::KaiC()::KaiC6::cyt => T{p}::KaiC()::KaiC6::cyt @ (kcat3*[KaiA2()::cyt]*[KaiC6::cyt])/(Km + [KaiC6::cyt]) | ||
T{p}::KaiC()::KaiC6::cyt => T{u}::KaiC()::KaiC6::cyt @ (kcat4*[KaiB4{a}.KaiA2()::cyt]*[KaiC6::cyt])/(Km + [KaiC6::cyt]) | ||
KaiB4{i}::cyt => KaiB4{a}::cyt @ (kcatb2*[KaiB4{i}::cyt])/(Kmb2 + [KaiB4{i}::cyt]) | ||
KaiB4{a}::cyt => KaiB4{i}::cyt @ (kcatb1*[KaiB4{a}::cyt])/(Kmb1 + [KaiB4{a}::cyt]) | ||
KaiB4{a}.KaiA2()::cyt => KaiB4{a}::cyt + KaiA2()::cyt @ k12*[KaiB4{a}.KaiA2()::cyt] | ||
KaiC6::cyt => 6 KaiC()::cyt @ kdimer*[KaiC6::cyt] | ||
6 KaiC()::cyt => KaiC6::cyt @ kdimer*[KaiC()::cyt]*([KaiC()::cyt] - 1)*([KaiC()::cyt] - 2)*([KaiC()::cyt] - 3)*([KaiC()::cyt] - 4)*([KaiC()::cyt] - 5) | ||
|
||
#! inits | ||
6 KaiC(S{p},T{p})::cyt | ||
1 KaiB4{a}.KaiA2()::cyt | ||
|
||
#! definitions | ||
kcat1 = 0.539 | ||
kcat3 = 0.89 | ||
Km = 0.602 | ||
kcatb2 = 0.346 | ||
kcatb1 = 0.602 | ||
Kmb2 = 66.75 | ||
Kmb1 = 2.423 | ||
k12 = 0.0008756 | ||
kdimer = 1.77 | ||
|
||
#! complexes | ||
KaiC6 = KaiC().KaiC().KaiC().KaiC().KaiC().KaiC() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! rules | ||
S{u}:KaiC():KaiC6::cyt => S{p}:KaiC():KaiC6::cyt @ (kcat1*[KaiA2()::cyt]*[KaiC6::cyt])/(Km + [KaiC6::cyt]) | ||
S{p}:KaiC():KaiC6::cyt => S{u}:KaiC():KaiC6::cyt @ (kcat2*[KaiB4{a}.KaiA2()::cyt]*[KaiC6::cyt])/(Km + [KaiC6::cyt]) | ||
T{u}:KaiC():KaiC6::cyt => T{p}:KaiC():KaiC6::cyt @ (kcat3*[KaiA2()::cyt]*[KaiC6::cyt])/(Km + [KaiC6::cyt]) | ||
T{p}:KaiC():KaiC6::cyt => T{u}:KaiC():KaiC6::cyt @ (kcat4*[KaiB4{a}.KaiA2()::cyt]*[KaiC6::cyt])/(Km + [KaiC6::cyt]) | ||
KaiB4{i}::cyt => KaiB4{a}::cyt @ (kcatb2*[KaiB4{i}::cyt])/(Kmb2 + [KaiB4{i}::cyt]) | ||
KaiB4{a}::cyt => KaiB4{i}::cyt @ (kcatb1*[KaiB4{a}::cyt])/(Kmb1 + [KaiB4{a}::cyt]) | ||
KaiB4{a}.KaiA2()::cyt => KaiB4{a}::cyt + KaiA2()::cyt @ k12*[KaiB4{a}.KaiA2()::cyt] | ||
KaiC6::cyt => 6 KaiC()::cyt @ kdimer*[KaiC6::cyt] | ||
6 KaiC()::cyt => KaiC6::cyt @ kdimer*[KaiC()::cyt] | ||
KaiC().KaiC()::cyt => KaiC()::cyt + KaiC()::cyt @ kcat1 | ||
|
||
#! inits | ||
6 KaiC(S{p},T{p})::cyt | ||
1 KaiB4{a}.KaiA2()::cyt | ||
1 KaiC(S{u},T{p})::cyt | ||
1 KaiC(S{u},T{p}).KaiC(S{p},T{p})::cyt | ||
|
||
#! definitions | ||
kcat2 = 0.539 | ||
kcat4 = 0.89 | ||
kcat1 = 0.539 | ||
kcat3 = 0.89 | ||
Km = 0.602 | ||
kcatb2 = 0.346 | ||
kcatb1 = 0.602 | ||
Kmb2 = 66.75 | ||
Kmb1 = 2.423 | ||
k12 = 0.0008756 | ||
kdimer = 1.77 | ||
|
||
#! complexes | ||
KaiC6 = KaiC().KaiC().KaiC().KaiC().KaiC().KaiC() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#! rules | ||
K(S{i}).B()::cyt => K(S{a})::cyt + B()::cyt @ 3*[K(S{i}).B()::cyt]/2*v_1 | ||
K(S{a})::cyt + A{i}::cyt => K(S{a}).A{i}::cyt | ||
|
||
#! inits | ||
2 K(S{i}).B()::cyt | ||
1 A{i}::cyt | ||
|
||
#! definitions | ||
v_1 = 0.05 | ||
k2 = 0.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! rules | ||
// commenting | ||
X(K{i})::rep => X(K{p})::rep @ k1*[X()::rep] // also here | ||
X(T{a})::rep => X(T{o})::rep @ k2*[Z()::rep] | ||
=> Y(P{f})::rep @ 1/(v_3+([X()::rep])**4) // ** means power (^) | ||
|
||
#! inits | ||
2 X(K{c}, T{e}).X(K{c}, T{j})::rep | ||
Y(P{g}, N{l})::rep // comment just 1 item | ||
|
||
#! definitions | ||
k1 = 0.05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! rules | ||
=> K(S{u},T{i})::cyt @ omega | ||
K(S{u})::cyt => K(S{p})::cyt @ alpha*[K(S{u})::cyt] | ||
K(S{p})::cyt + B{a}::cyt => K(S{p}).B{a}::cyt @ beta*[K(S{p})::cyt]*[B{a}::cyt] | ||
B{_}::cyt => @ gamma*[B{_}::cyt] | ||
K(S{u},T{i}).B{a}::cyt => @ 5 | ||
|
||
#! inits | ||
1 B{a}::cyt | ||
|
||
#! definitions | ||
alpha = 10 | ||
beta = 5 | ||
//gamma = 2 | ||
omega = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#! rules | ||
K(S{i}).B()::cyt => K(S{a})::cyt + B()::cyt @ 3*[K(S{i}).B()::cyt]/2*v_1 | ||
K(S{a})::cyt + A{i}::cyt => K(S{a}).A{i}::cyt | ||
K().A{i}::cyt => K().A{a}::cyt | ||
|
||
#! inits | ||
2 K(S{i}).B()::cyt | ||
1 A{i}::cyt | ||
|
||
#! definitions | ||
v_1 = 0.05 | ||
k2 = 0.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! rules | ||
// commenting | ||
X(K{i})::rep => X(K{p})::rep @ k1*[X()::rep] // also here | ||
X(T{a})::rep => X(T{o})::rep @ k2*[Z()::rep] | ||
=> Y(P{f})::rep @ 1/(1+([X()::rep])**4) // ** means power (^) | ||
|
||
#! inits | ||
// here | ||
2 X(K{c}, T{e}).X(K{c}, T{j})::rep | ||
Y(P{g}, N{l})::rep // comment just 1 item | ||
|
||
#! definitions | ||
// and | ||
k1 = 0.05 // also | ||
k2 = 0.12 |
Oops, something went wrong.