Open GoogleCodeExporter opened 9 years ago
Hi, is there any way to keep bionetgen from evaluating compartment size parameters or functions and instead keep the respective symbol in the rate expression? Is there a reason for evaluating the compartment parameter / function?
I don't know the answer, but if there isn't a workaround, you can simply avoid using cBNGL for model setup (unless you're also trying to use the eBNGL features). With plain BNGL, compartments are considered implicitly. I'm pasting below a simple example, in case it might be helpful. --Bill
begin model
begin parameters
f 1 # dimensionless (0<f<=1)
pi=2*asin(1) # dimensionless ratio
NA 6.02214076e23 # molec/mol (exact value)
Temp 37+273.15 # K (physiological temperature)
mu_H2O=2.414e-2*10^(247.8/(Temp-140)) # mPa s (0.69 mPa s)
mu_lipid 34.1 # mPa s viscosity of olive oil @ 38 degrees C (Diamante and Lan, 2014)
cellDiameter 2e-4 # dm (20 microns)
Area=pi*cellDiameter^2 # dm^2 per cell
height 50e-9 # dm (5 nm)
Vlayer=fAreaheight*(mu_lipid/mu_H2O) # L per cell
slowly
reactions.
relative
cellDensity 1e9 # cells/L (1e6 cells per mL)
Vecf=f*1/cellDensity # L/cell
Vcyt f*1e-12 # L/cell (1 pL)
Vnuc f*5e-13 # L/cell (0.5 pL)
L_conc 0.5e-9 # M (0.5 nM)
L_init=L_conc(NAVecf) # M converted to molec/cell
R_init f*1e5 # molec/cell
TF_init f*5e4 # molec/cell
kp1 1e7/(NA*Vecf) # /M/s converted to /(molec/cell)/s
km1 1e-2 # /s
membrane
krecycle 1/60 # /s
kp2_3D 1e6/(NA*Vcyt) # /M/s converted to /(molec/cell)/s
kp2_2D=kp2_3D*(Vcyt/Vlayer) # /(molec/cell)/s
km2 1e-1 # /s
kphos 0.1 # /s
kdephos 0.05 # /s
kdim_3D_cyt 5e6/(NA*Vcyt) # /M/s converted to /(molec/cell)/s
kdim_2D_ipm=kdim_3D_cyt*(Vcyt/Vlayer) # /(molec/cell)/s
kdim_3D_nuc=kdim_3D_cyt*(Vcyt/Vnuc) # /(molec/cell)/s
kdiss 0.2 # /s
ksynth f*0.5 # molec/s
K50 f*10 # molec
kdeg 0.01 # /s
kCytNuc_TF 0.01 # /s
kNucCyt_TF 0.05 # /s
kNucCyt_mRNA 0.05 # /s
end parameters
begin molecule types
L(r) # ligand
R(l,t) # receptor
TF(r,a~0~P,loc~cyt~nuc) # transcription factor
mRNA(loc~cyt~nuc) # mRNA
end molecule types
begin seed species
L(r) L_init
R(l,t) R_init
TF(r,a~0,loc~cyt) TF_init*(kNucCyt_TF/(kCytNuc_TF+kNucCyt_TF))
TF(r,a~0,loc~nuc) TF_init*(kCytNuc_TF/(kCytNuc_TF+kNucCyt_TF))
mRNA(loc~nuc) 0
end seed species
begin observables
Molecules total_ligand L()
Molecules total_receptor R()
Molecules total_TF TF()
Molecules Lfree L(r)
Molecules Rfree R(l)
Molecules LboundR R(l!+)
Molecules inactiveTF TF(a~0!?)
Molecules pTF_all TF(a~P!?)
Molecules pTF_allMonomers TF(a~P)
Species all_dimers_of_pTF TF(a~P!1).TF(a~P!1)
Molecules all_pTF_in_cyt TF(a~P!?,loc~cyt)
Molecules all_pTR_in_nuc TF(a~P!?,loc~nuc)
Molecules IllegalDimers TF(a~P!1,loc~cyt).TF(a~P!1,loc~nuc) # should be 0 abundance
Molecules RrecruitedTF TF(r!+)
Molecules cytTF TF(loc~cyt)
Molecules nucTF TF(loc~nuc)
Species cytTFdimers TF(a~P!1,loc~cyt).TF(a~P!1,loc~cyt)
Species nucTFdimers TF(a~P!1,loc~nuc).TF(a~P!1,loc~nuc)
Molecules cyt_mRNA mRNA(loc~cyt)
Molecules nuc_mRNA mRNA(loc~nuc)
end observables
begin functions
totalTFdimers()=cytTFdimers+nucTFdimers
totalmRNA()=cyt_mRNA+nuc_mRNA
Vol_ratio()=Vcyt/Vlayer
synthesisRate()=ksynth*nucTFdimers^2/(K50^2+nucTFdimers^2)
end functions
begin reaction rules
##########################################################
##########################################################
L(r)+R(l)<->L(r!1).R(l!1) kp1,km1 # kp1 is scaled by 1/Vecf
############################################################################
############################################################################
membrane
L(r!1).R(l!1)->R(l) krecycle
R(l!+,t)+TF(r,a~?,loc~cyt)->R(l!+,t!1).TF(r!1,a~?,loc~cyt) kp2_3D
R(l!+,t)+TF(r,a~P!1,loc~cyt).TF(r,a~P!1,loc~cyt)->\
R(l!+,t!2).TF(r!2,a~P!1,loc~cyt).TF(r,a~P!1,loc~cyt) kp2_3D
R(t!1).TF(r!1,a~P!2,loc~cyt).TF(r,a~P!2,loc~cyt)+R(l!+,t)->\
R(t!1).TF(r!1,a~P!2,loc~cyt).TF(r!3,a~P!2,loc~cyt).R(l!+,t!3) kp2_2D
R(t!1).TF(r!1)->R(t)+TF(r) km2
TF
R(l!+,t!1).TF(r!1,a~0)->R(l!+,t!1).TF(r!1,a~P) kphos
TF(a~P,loc~cyt)->TF(a~0,loc~cyt) kdephos
TF(r!+,a~P)+TF(r,a~P,loc~cyt)->TF(r!+,a~P!1).TF(r,a~P!1,loc~cyt) kdim_3D_cyt
TF(r!+,a~P)+TF(r!+,a~P,loc~cyt)->TF(r!+,a~P!1).TF(r!+,a~P!1,loc~cyt) kdim_2D_ipm
TF(r,a~P,loc~cyt)+TF(r,a~P,loc~cyt)->\
TF(r,a~P!1,loc~cyt).TF(r,a~P!1,loc~cyt) kdim_3D_cyt
TF(a~P!1,loc~cyt).TF(a~P!1,loc~cyt)->TF(a~P,loc~cyt)+TF(a~P,loc~cyt) kdiss
mRNA(loc~cyt)->0 kdeg
#######################
#######################
TF(r,a~?,loc~cyt)->TF(r,a~?,loc~nuc) kCytNuc_TF
TF(r,a~P!1,loc~cyt).TF(r,a~P!1,loc~cyt)->\
TF(r,a~P!1,loc~nuc).TF(r,a~P!1,loc~nuc) 10*kCytNuc_TF
TF(a~?,loc~nuc)->TF(a~?,loc~cyt) kNucCyt_TF
TF(a~P!1,loc~nuc).TF(a~P!1,loc~nuc)->\
TF(a~P!1,loc~cyt).TF(a~P!1,loc~cyt) kNucCyt_TF
mRNA(loc~nuc)->mRNA(loc~cyt) kNucCyt_mRNA
############################
############################
TF(a~P,loc~nuc)+TF(a~P,loc~nuc)<->\
TF(a~P!1,loc~nuc).TF(a~P!1,loc~nuc) kdim_3D_nuc,kdiss
0->mRNA(loc~nuc) synthesisRate()
end reaction rules
end model
begin actions
generate_network({overwrite=>1})
saveConcentrations()
simulate({suffix=>"ode",method=>"ode",t_end=>2500,n_steps=>250, print_functions=>1})
resetConcentrations()
simulate({suffix=>"ssa",method=>"ssa",t_end=>2500,n_steps=>250, print_functions=>1}) end actions
On Thu, Feb 4, 2021 at 2:13 PM Daniel Weindl notifications@github.com wrote:
Hi, is there any way to keep bionetgen from evaluating compartment size parameters or functions and instead keep the respective symbol in the rate expression? Is there a reason for evaluating the compartment parameter / function?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/RuleWorld/bionetgen/issues/119#issuecomment-773606960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETOR5Z4DUR66FLA2ZAC5QDS5MEWFANCNFSM4XDR6C2A .
Thanks for your suggestion @wshlavacek. This is for sure an option.
Would be great though if there was a way to use cBNGL to generate (fully) symbolic rate expressions.
Original issue reported on code.google.com by
lh64@cornell.edu
on 21 Jan 2014 at 9:45