Simbiology createSimFunction data access

조회 수: 1 (최근 30일)
Mohammad Jafarnejad
Mohammad Jafarnejad 2021년 4월 21일
답변: Priya Moorthy 2021년 11월 5일
I am using createSimFunction to run many scenarios. The results come out in an array of simData. How can I efficiently access one of the output observables (e.g. species of interest) from each of the simData results to plot the ranges or confidence intervals from these many scenarios?

채택된 답변

Jeremy Huard
Jeremy Huard 2021년 4월 21일
편집: Jeremy Huard 2021년 4월 21일
Hi Mohammad,
the method selectbyname allows you to extract the data of a specific state.
Alternatively, you can use the attached function to generate a percentile plot for one of more states of your simData array:
sbioplotscan(simdataObj,"Name",["Receptor","Complex"],"Alpha",0.05)
or starting R2021a
sbioplotscan(simdataObj,Name=["Receptor","Complex"],Alpha=0.05)
For Alpha=0.05, the plot will display the median as well as a an area between the 2.5 and 97.5 percentiles.
Disclaimer: This function is a helper function I wrote for my personal use. It has not been thoroughly tested and is provided as is.
I hope this helps.
Best,
Jérémy
  댓글 수: 8
Mohammad Jafarnejad
Mohammad Jafarnejad 2021년 4월 22일
Thanks Jeremy.
The problem with simData.DataNames is the following: you can have species with the same name in different compartments that will show up as duplicates in the DataNames. Assume you have comp1 and comp2. you can define the drug (D) in compa1 (comp1.D) and in comp2 (comp2.D). Now in the DataNames it shows up as 'D' and 'D'. not able to distinguish unless tracking down the parents. selectbyname works well as it can take 'comp1.D' as the input and distinguish which D we are looking for. I think sbioscanplot.m could also benefit from such a feature. I am getting around that by doing a selectbyname before feeding the data to the sbioscanplot os as not to have duplicates.
Also it would be nice to be able to specifiy DataName for the median line to facilitate legends later.
Thanks again for sharing the function. I have made some modifications to it for my personal use.
Cheers
Mohammad
Jeremy Huard
Jeremy Huard 2021년 4월 22일
Hi Mohammad,
I see what you mean now. You are right, DataNames are not necessarily unique. However, the DataInfo property contains information about the compartment that contains about the species. In my original code, I was only looking in DataNames. I have now updated the function and uploaded the updated version in my original answer.
Best,
Jérémy

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Priya Moorthy
Priya Moorthy 2021년 11월 5일
Mohammad,
The SimBiology Model Analyzer app introduced the percentile plot type in R2021b. You can use this plot type to visualize how summary statistics (percentiles, mean, standard deviation, min/max) for a set of timecourses (simulations from a scan or experimental data from imported datasets) change over time.
This new plot type is documented here:
Best,
Priya

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

Help CenterFile Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by