RW in MATLAB Answers
Last activity on 5 Mar 2025

Hello I would like to add digestibility to a model I created in SimBiology Model Builder. I know I should add digestibility to Variants, but I don't know how to do that in detail. Please let me know. RW
Paulo in MATLAB Answers
Last activity on 1 Mar 2025

Hello, I'm looking for alternatives for simplifying some biological network models I have in simbiology (the actual way this simplification will be is still TBD, but the overall goal is to be able to reduce the number of eqs. and parameters to facilitate data fitting, preferably in a supervised automated way), and I was wondering if there's any way of using this Model Order Reduction toolbox for simbiology models. Thank you, Paulo
Elio in MATLAB Answers
Last activity on 6 Feb 2025

Hi everyone! I'm plotting data using SimBiology, but I'm having trouble plotting simple data with error bars. I don't have access to the raw data, but I do have the mean and standard deviation for each time point. My table is structured as follows: ID | Time | Conc | SD I want to plot these data on the Percentile plot, displaying the means with error bars based on their standard deviation. However, I haven't been able to achieve this simple task. Even after adding two columns with the maximum and minimum values by calculating [Conc+SD] and [Conc−SD], it seems that SimBiology requires values in the same column. Basically I wish to do on Simbiology what the matlab errorbar function does (https://it.mathworks.com/help/matlab/ref/errorbar.html#d126e478849). Please help!
Andrew Heitman in MATLAB Answers
Last activity on 8 Jan 2025

What is the BEST way to get the simulation data out of simbiology and into excel or some other program? I have found a brief explanation on how to export to Matlab area and then convert to XLS but its not working terrible well
Velarie Ansu in MATLAB Answers
Last activity on 3 Jan 2025

I have three supplements that I would like to compare (bioavailability). For each of the three, we will have whole bood, serum, and urine measurements done at timed intervals in a day. Supplements will be given orally and it will be a single dose (three different days for each). I am exploring the best way to calculate area under the curve using trapezoidal rule, finding tmax, and cmax. I have explored Simbiology and the examples I have seen are far more complex than what I need. I will appreciate any help on getting this done. Thank you.
Andrew Sundstrom in MATLAB Answers
Last activity on 27 Nov 2024

I've used Matlab extensively to model biochemical networks with systems of ODEs, though I'm new to using SimBiology. I've imported a calcium channel model into SimBiology and can execute it, plot the results, etc. What I'd like to do now is take one of the species, Ca — currently with its InitialAmount set to 0.5 millimole/litre, and its BoundaryCondition and ConstantAmount attributes set to on — and control its concentration as a function of time, treating it as an input function to the rest of the system. (I'm investigating how different ways of pulsing Ca concentration will affect downstream production of autonomous CaMKII.) What is the best way to accomplish building such an input function in SimBiology? I found <https://www.mathworks.com/help/simbio/ug/example--creating-a-model-that-uses-a-user-defined-function-in-an-expression.html this> article, which describes how to create a custom user-defined function and use it in reaction, rule, and event expressions. But I don't think this is what I need to do. I'd appreciate any guidance. Thanks.
Ji in MATLAB Answers
Last activity on 21 Nov 2024

Hi, In simbiology design app, is there a way to define a species like a step fucntion so that it increases to a constant after a specific time point? I tried to use 'events' to trigger a species increase after a time piont, but the species is not a constant and changed during reactions. I also tried to 'dose', which behaved same as 'event' triggered species increase. There are examples of codes where a user defined function was used in conjunction with repeated assignments. However, in design app, code can't seem to be edited. Thank you very much! -Ji
Day in MATLAB Answers
Last activity on 19 Nov 2024

Hi, I want to generate a lognormal distribution for a set of data measurments using Simbiology model analyzer. I need to insert the mu and sigma for of this distribution as shown in the attachment. Is mu=log(mean) and sigma=log(Standard deviation)? Thank you!
Luis B. Walter in MATLAB Answers
Last activity on 19 Nov 2024

I am working with SimBiology to fit the parameters of a three-step kinetic model (rate constants: k1, ki1, k2, ki2, k3, ki3) to a series of experimental time courses of an enzyme reaction. Additionally, I have independently obtained experimental values of kcat​ and Km​ for the reaction. The expressions for kca​ and Km terms of the rate constants for the three-step model are: kcat = (k2.*k3)./(k2 + ki2+ k3) Km = ((k2.*k3 + ki1.*(ki2 + k3))/(k1.*(k2 + ki2 + k3))). ​ To constrain the estimation of the rate constants, I included two 'Algebraic Rules' in SimBiology: 1) 20 < (k2.*k3)./(k2 + ki2+ k3) 2) 20 < ((k2.*k3 + ki1.*(ki2 + k3))/(k1.*(k2 + ki2 + k3)))​​ ​ In this way, I aim to ensure that the estimated rate constants satisfy the known values of kcatk_{cat}kcat​ and KmK_mKm​. However, when I run the SimBiology interface to perform the fitting, I receive the following error messages: "Model is overdetermined by the following algebraic rules: '20 < (k2·k3)/(k2 + ki2 + k3)' and '20 < ((k2·k3 + ki1·(ki2 + k3))/(k1·(k2 + ki2 + k3)))'. At least one species, parameter, or compartment in this rule must be non-constant and not defined by a reaction rate, rate rule, or repeated assignment rule." "An error occurred while trying to compile the model." How should I proceed to constrain the fitting of the rate constants for the three-step kinetic model using these two expressions for kcat​ and Km?" Best regards Luis B
Michael in MATLAB Answers
Last activity on 5 Nov 2024

I would like to ask for clarification on how to understand and set the constant and boundarycondition properties. The tutorial mentions: 'We can also set the boundarycondition to true. In that case, species would not be modified by the reactions it participates in, but can still be modified by events, rules, or doses. The constant could be set to true, and in that case, the species can vary during the simulation.' However, I am having some difficulty understanding this concept and how to apply it correctly. Could you please help me clarify?
Rajeev in MATLAB Answers
Last activity on 3 Nov 2024

I am trying to understand how unit conversion has been implemented in model developed in Simbiology model being executed in matlab envioronemt. If unit conversion is enabled - will it convert only time unit or other parameters as well. This becomes critical in my work. My questions are listed below- 1. If unit conversion feature enables in simbiology project - What units are being converted? Can you provide the general script to access this information? 2. What are the global units of such model (simbiology developed models?) 3. How to access the parameter names and values which are being used to solve equations using ode solver? Please take this query as urgent. Thanks in advance for your help.
MARINA in MATLAB Answers
Last activity on 25 Oct 2024

Hi everyone. I just wondering if someone has worked with perfussion MRI images. I have a DCE experiment in kidneys and I would like to work with matlab to obtain the parameters of the model (one compartment, two compartment...), I want to work with Simbiology Thanks a lot. Regards
Vivek in MATLAB Answers
Last activity on 23 Oct 2024

I'm trying to figure out how to use Simbiology with a simple receptor-ligand binding model. I can get it to simulate a time course just fine and plot this on a xy graph, but if I want to run a scan of ligand (L) values and then plot the resulting complex (C) values at a specific time, then I can only get this kind of scatter plot. How can I instead get a simple line graph where the data points are connected with a line? Thanks!
Shawn in MATLAB Answers
Last activity on 23 Sep 2024

I wanted to open an example in Simbiology but it did not work. How to solve this issue? The command, openExample('simbio/VirtualPatientsSimBiologyModelAnalyzerExample'), is from Matlab help center.
Shawn in MATLAB Answers
Last activity on 23 Sep 2024

How to simulate a drug concentration-time curve with confidence intervals as shown in the figure? It comes from a model shared on File Exchange (ADC Krogh Cylinder Model). I wish to learn what is the process for calculating the confidence intervals? Is it done by generating 100 virtual patients' model parameters that follow a normal distribution based on the mean and CV% of parameters, then simulating the drug concentrations for each patient, and finally calculating the confidence intervals based on the mean and standard error of the concentrations at each time point? Or is there a specific SimBiology function that can directly simulate this type of drug concentration-time curve with confidence intervals by inputting the mean and coefficients of variation of parameters?
Jim Bosley in MATLAB Answers
Last activity on 21 Sep 2024

Would be useful to know. I believe 2020b only supports level 2, correct? Has anyone else run into having to use an sblm level 3 model? How do you handle this? Thanks.
Vladimir Kovalev in MATLAB Answers
Last activity on 20 Aug 2024

Comment supprimer ou modifier la loi cinétique abstraite dans les bibliothèques ? Après suppression ou modification, il est restauré.
Daniel Bending in Discussions
Last activity on 20 Aug 2024

Hi All, I'm currently verifying a global sensitivity analysis done in SimBiology and I'm a touch confused. This analysis was run with every parameter and compartment volume in the model. To my understanding the fraction of unexplained variance is 1 - the sum of the first order variances, therefore if the model dynamics are dominated by interparameter effects you might see a higher fraction of unexplained variance. In this analysis however, as the attached figure shows (with input at t=20 minutes), the most sensitive four parameters seem to sum, in first order sensitivities to roughly one at each time point and the total order sensitivies appear nearly identical. So how is the fraction of unexplained variance near one? Thank you for your help! Fraction of unexplained variance: Hi Daniel, Thank you for reporting this! Your expectation about the first order indices and the unexplained variance is correct. This looks like a bug in the plot of the "unexplained variance". Could you confirm that you only see this issue when you specify the Parameters name-value argument? Dependent on the release of MATLAB you are working with, you can easily fix the issue to unblock your work. You can make the following change (e.g. in ... R2023a, R2023b, R2024a). In the MATLAB Command Window type edit SimBiology.gsa.Sobol.plot to open the plotting code in the MATLAB Editor. Navigate to line 673 and replace obj.SobolIndices(i,observableIndex(j)).FirstOrder with obj.SobolIndices(parameterIndex(i),observableIndex(j)).FirstOrder The reported Sobol indices are unaffected by this issue. We will fix this as soon as possible in the product. Thank you. -Florian Hi Florian, Thank you very much! I don't need the unexplained residuals to be correct right now, so I'm in no rush to fix it, glad to know my intuition was correct. Though when I attempted to implement your fix I didn't have permission to edit Sobol.m! I would probably need to go into my program files and edit it manually, I suspect. With regards to "Could you confirm that you only see this issue when you specify the Parameters name-value argument?" I'm afraid I'm not entirely sure what you mean. Assuming I'm understanding you correct, I plotted the figure with plot(sobolResults) sans names values and it produced this slice: Which to my eyes show an unexplained variance of ~zero for the majority of the time series. (Note the rapid decrease on the left hand side) Alas, with 27 parameters this is the largest I could get it immediately! Thank you for following up, Daniel! The information you provided helped to fix the issue. Re - applying the fix: it looks like you will need to override write-protection of the file to make the changes. If you do not use the MATLAB Editor to make the change, please run clear all in the MATLAB Command Window after making the change. Caution, this will clear all variables in your MATLAB Workspace. Please save your work before doing this. Unrelated: I wanted to point out this feature ranking example on FileExchange. If you are trying to find the most important parameters for fitting, feature ranking may be a good option. -Florian
grace in MATLAB Answers
Last activity on 14 Aug 2024

Hello! I am trying to use this model "Estimating the Bioavailibility of a Drug" that I found here, to do a simultaneous fitting of my IV infusion and P.O. blood concentration time profile. I implemented a two compartment model as well. For some reason, when I am running a simulation the oral dose exhibits a bioavailbility of >= 1, even though I have the parameter F set as 0.2. I attached images of my simulation curve (green is oral dose), model diagram, ODEs, and dosing setup. I'm thinking it might have something to do with the way I set up the dosing, but please let me know if you have any advice on how I should troubleshoot this. I am using R2024a. Please let me know if I should include anything else. Thanks!
grace in MATLAB Answers
Last activity on 29 Jul 2024

Hi! So I saved a run when I was doing fitting for my data, and put the results in a folder on the Simbiology model analzyer dashboard. I wanted to replicate that saved data but I can't seem to find where the initial parameters for that run are stored? If anyone could help or if there's any way I can further clarify please let me know!
Justine in MATLAB Answers
Last activity on 22 Jul 2024

Hello, I built a PBPK model in the Simbiology Desktop application, and I run a "fit data" program on a cluster. I saved the programResults output file which I analyzed locally in the command window and workspace. I plotted the fit data results at the command line from the programResults output file. The fit to my experimental data was good and I transferred the parameter estimates to the model in the Simbiology Desktop Model Builder. I did that at the command line by updating my parameter list in an independant copy of the original model, and then saved both models (original and with fitted parameters) using sbiosaveproject (my simbiology root object being only these two models). --> 1) Is there a function planned to create a new model in a project based on the programResults object from a fit data program? (which would be less error-prone than doing this step by step at the command line) However, when I simulate the updated model with the parameter estimates in the Simbiology Desktop Model Analyzer, I do not get the same simulated curve as when I plot it from the programResults output file of the fit data program ran in the cluster. I checked that all parameters were correctly updated in the new model, that the dose and observed data were consistent. I also used the "Compare" function in Matlab to compare both models, but couldn't see any major changes that would explain the inconsistency between the plots of the two models. --> 2) Is there any other parameters than the parameter estimates to update when transferring fit data results to a model in a simbiology project? I would appreciate any help on this. Unfortunately I can't upload my plots or data here. Best regards
Teerachat Saeheng in File Exchange
Last activity on 8 Jul 2024

This model was developed to predict the FIH, MTD, and the recommended phase II clinical study for Atractylodes lancea (Thub) DC
Elisa in MATLAB Answers
Last activity on 4 Jul 2024

Hi everyone, I am studying a simbiology model not made by me. In particular, I know that some parameters/species have inconsistent units, I just don't know which ones, since it's a huge model. While the Unit Conversion of Simbiology works perfectly, I'd like to know which parameters have different units; in other words I'd like to have a model with consistent units, that would work without using the unit conversion. It would also be sufficient to have, somehow, a table of the changes in units wrt a 'ground' unit, so that I can change the units manually. I don't know if that's possible in simbiology and I haven't found any documentation on that.
Mehdi in MATLAB Answers
Last activity on 3 Jul 2024

Hi, I wrote the code below for estimation of KD from the binding assay for three different cell lines: i.e. bxpc3, colo205, T84 which have different number of antigen molecule on their surface. The code properly work for estimation of kD spearately for each cell line. How can I estimate the kD as one value for different cell lines at the same time? I attached my excel file (exp.xlsx) in which each cell line data has been stored in a spearted sheet. Thanks %% Setup Model case_study = 'T84'; % 'bxpc3' 'colo205' 'T84' model_input_file='exp.xlsx' switch case_study case 'bxpc3' exp_data=readtable(model_input_file,'Sheet','bxpc3'); data.dose = exp_data.dose; data.ro = exp_data.RO_exp; input1=[0.1 0.4 1.2 11.1 33.3 100 300]; RPC_Ag_Tumor = 219202; case 'colo205' exp_data=readtable(model_input_file,'Sheet','colo205'); data.dose = exp_data.dose; data.ro = exp_data.RO_exp; input1=[0.1 0.4 1.2 3.7 11.1 33.3 100]; RPC_Ag_Tumor = 662642; case 'T84' exp_data=readtable(model_input_file,'Sheet','T84'); data.dose = exp_data.dose; data.ro = exp_data.RO_exp; input1=[0.1 0.4 1.2 3.7 11.1 33.3 100 300]; RPC_Ag_Tumor = 169163; end data = structfun( @rmmissing , data , 'UniformOutput' , false); setup; % (I build the model here) %% Data Import gData = groupedData(exp_data); gData.Properties.VariableUnits = {'','second','nanomole','dimensionless'}; gData.Properties.GroupVariableName = 'ID'; gData.Properties.IndependentVariableName = 'Time'; sbiotrellis(gData,'ID','Time',{'RO_exp'},'Marker','+','LineStyle','none'); % Extract data columns into separate variables for the weight expression % evaluation. headings = exp_data.Properties.VariableNames; for i=1:length(headings) next = headings{i}; eval([next ' = exp_data. ' next ';']); end %% Create the data dose. d2 = sbiodose('dose'); d2.TargetName = 'Ab'; d2.LagParameterName = ''; d2 = createDoses(gData, 'dose', '', d2); % Build table of doses. d2 = num2cell(d2); dosesForFit = d2; %% Fitting options % Define response information. responseMap = {'RO = RO_exp'}; % Define objects being estimated and their initial estimates. estimatedInfoObj = estimatedInfo({'kD_Ab'}); % estimatedInfoObj = estimatedInfo({'k_max', 'EC50'}); estimatedInfoObj(1).Bounds = [1E-1 1E2]; % estimatedInfoObj(2).Bounds = [1E-6 1E-4]; % Define Algorithm options. options = optimoptions('particleswarm'); options.Display= 'iter'; % Define fit problem. f = fitproblem('FitFunction', 'sbiofit'); f.Data = gData; f.Model = model; f.Estimated = estimatedInfoObj; f.ErrorModel = 'exponential'; f.ResponseMap = responseMap; f.Weights = []; f.Doses = dosesForFit; f.FunctionName = 'particleswarm'; f.Options = options; f.ProgressPlot = true; f.UseParallel = false; f.Pooled = true; %% Run the model with optimum parameters fitResults = f.fit; plot(fitResults) ci = sbiopredictionci(fitResults); plot(ci) ciParam = sbioparameterci(fitResults); ci2table(ciParam) plot(ciParam) fitResults.ParameterEstimates %update parameters for i=1:length(estimatedInfoObj) xopt = sbioselect(model,'Name',fitResults.EstimatedParameterNames{i}); xopt.value = fitResults.ParameterEstimates.Estimate(i); end params = {'Ab0'}; obs = {'RO'}; input=dose(~isnan(dose)); RO_exp = RO_exp(~isnan(RO_exp)); sfxn = createSimFunction(model, params, obs, d1,'UseParallel',false,'AutoAccelerate',false); sfxn.accelerate; doseTable = getTable(d1); simData=sfxn(input,configsetObj.StopTime,doseTable); %% Plot fontsize = 18; linesize = 2; markersize = 10; f = figure('Position', [14 10 900 600]); colors = ["k", "#D95319", "#A2142F", "#77AC30", "#7E2F8E", "#00CED1", "#FF1493"]; % Define an array of colors set(f, 'Visible', 'on'); set(gca,'fontsize', fontsize); hold on; box on; grid on; set(gca, 'XScale', 'log'); %set(gca, 'YScale', 'log'); for i = 1:size(input,1) if i < size(input,1) line([input1(i) input1(i+1)], [simData(i).Data(end) simData(i+1).Data(end)], 'Color', colors(3),'LineWidth', 2); end % plot(input1(i), simData(i).Data(end), 'O', 'MarkerEdgeColor', colors(3), 'MarkerFaceColor', colors(3), 'markersize', markersize); plot(input1(i), RO_exp(i), 'O', 'MarkerEdgeColor', colors(4), 'MarkerFaceColor', colors(4), 'markersize', markersize); end xlabel('Dose (ug/mL)', 'fontweight', 'bold', 'Fontsize', fontsize, 'Interpreter', 'none'); ylabel('RO (%)', 'fontweight', 'bold', 'Fontsize', fontsize); legend('Simulation','Experiment' , 'NumColumns', 1, 'Location', 'best', 'FontSize', fontsize) saveas(gca, fullfile(save_locations{2}, 'RO'), 'png'); close(f);
ALEXANDRA in MATLAB Answers
Last activity on 3 Jul 2024

Hi, I am new to using MATLAB and SIMBIOLOGY. I am trying to fit 6 binding curves where the ligand is the same throughout the experiment and only the analyte concentrations are different. I want to globally fit all 6 curves to one model, sharing the rate parameters but not sharing the concentration parameters. Is there a way to do this in simbiology? When I am setting up the Data Map I have my independent variable as Time, since binding is measured over time, and I have 6 responses each corresponding to my binding response generated for each analyte concentration. I get an error of "The same model component appears in the left-hand side of multiple elements of the responseMap input argument. The responseMap cannot contain any duplicates." Any help would be great! Attached is the data I am trying to fit.