Skip to content

Commit

Permalink
minor docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Nov 20, 2024
1 parent 2acbdf5 commit 3168351
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ To install or update HetaSimulator and heta-compiler run the code below in Julia

```julia
julia> ]
(@v1.10) pkg> add HetaSimulator
pkg> add HetaSimulator
```

Internally HetaSimulator installs Heta compiler as an artifact.
Notes:
- Internally HetaSimulator installs Heta compiler as an artifact.
- In some MacOS versions, the installation of the package may require Rosetta, use `softwareupdate --install-rosetta` in terminal.

## Basic usage

Expand Down
13 changes: 7 additions & 6 deletions cases/story_1/run.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ scn3 = Scenario(
sim(scn3) |> plot

### sim sequentially
sim.([scn1, scn2, scn3]) .|> plot
sim.([scn1, scn2, scn3]) .|> plot .|> display

### sim together
sim([scn1, scn2, scn3]) |> plot
sim([:x => scn1, :y=>scn2, :z=>scn3]) |> plot
Expand All @@ -77,17 +78,17 @@ x=sim([:x => scn1, :y=>scn2, :z=>scn3]; parameters=[:k1=>0.1]) |> plot
#measurements_csv = read_measurements("$HetaSimulatorDir/cases/story_1/measurements.csv")
measurements_csv = read_measurements("$HetaSimulatorDir/cases/story_1/measurements_no_scope.csv")
measurements_xlsx = read_measurements("$HetaSimulatorDir/cases/story_1/measurements.xlsx")
scn4 = Scenario(model, (0,250); parameters = [:k2=>0.001, :k3=>0.04], saveat = [0.0, 50., 150., 250.]);
scn4 = Scenario(model, (0,250); parameters = [:k2=>0.001, :k3=>0.04]);
add_measurements!(scn4, measurements_csv; subset = [:scenario => :dataone])

### fit many scenarios
estim = estimator(
[:x=>scn2, :y=>scn3, :z=>scn4],
[:k1=>0.1,:k2=>0.2,:k3=>0.3]
)
estim([0.01, 0.02, 0.35])
res1 = fit([:x=>scn2, :y=>scn3, :z=>scn4], [:k1=>0.1,:k2=>0.2,:k3=>0.3])
res2 = fit([scn2, scn3, scn4], [:k1=>0.1,:k2=>0.2,:k3=>0.3])
estim([0.01, 0.02, 0.35]) # 172.18
res1 = fit([:x=>scn2, :y=>scn3, :z=>scn4], [:k1=>0.1,:k2=>0.2,:k3=>0.3]) # 51.59
res2 = fit([scn2, scn3, scn4], [:k1=>0.1,:k2=>0.2,:k3=>0.3]) # 51.59
sim(scn4, parameters = optim(res2)) |> plot

# sim all scenarios
Expand Down Expand Up @@ -163,7 +164,7 @@ timepoint_meancov(mcsim1,80.,150.)
timestep_meancor(mcsim1,2,3)
timepoint_meancor(mcsim1,80.,150.)

# !!!quantile
# quantile
timestep_quantile(mcsim1,0.95,2)
timepoint_quantile(mcsim1,0.95,80.)

Expand Down
8 changes: 4 additions & 4 deletions src/heta_cli/heta.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ end
meta_dir::String = "meta",
source::String = "index.heta",
type::String = "heta"
export::String = nothing
export_::String = nothing
)
Builds the models from Heta-based platform
See `heta comiler` docs for details:
https://hetalang.github.io/#/heta-compiler/cli-references?id=running-build-with-cli-options
See `heta compiler` docs for details:
<https://hetalang.github.io/#/heta-compiler/cli-references?id=running-build-with-cli-options>
Arguments:
Expand All @@ -97,7 +97,7 @@ Arguments:
- `meta_dir` : meta directory path. Default is `"meta"`
- `source` : path to the main heta module. Default is `"index.heta"`
- `type` : type of the source file. Default is `"heta"`
- `export` : export the model to the specified format: `Julia,JSON`, `{format:SBML,version:L3V1},JSON`
- `export_` : export the model to the specified format: `Julia,JSON`, `{format:SBML,version:L3V1},JSON`
"""
function heta_build(
target_dir::AbstractString;
Expand Down

0 comments on commit 3168351

Please sign in to comment.