Skip to content

PetabSimulator.simulate should produce simulation data frame #2050

@fbergmann

Description

@fbergmann

What did you expect to happen?
after running

    petab_problem = Problem.from_yaml(args.yaml_file_name)
    simulator = PetabSimulator(petab_problem)
    sim_df = simulator.simulate()
    sim_df.to_csv(args.output_file, sep='\t', index=False)

I expected to get a simulation data frame, that I could use with petab.visualize. Specifically there should be a simulation column in the file.

What has happened instead?
Instead there was a measurement column in the file, and petab.visualize complained with a KeyError when accessing the simulation column.

To Reproduce
Steps to reproduce the behavior
Ideally include minimal code examples here

see above

AMICI version and system environment

  • OS and version: [e.g. Ubuntu, iOS, Windows]
  • AMICI interface: [e.g. Python, Matlab, C++]
  • AMICI version:
  • Additional information: Compiler name and version used, Python/Matlab version, ...

How to fix
Do you know how to resolve the problem?
yes, rename the measurement column to 'simulation' before returning from PetabSimulator.simulate.

Can you submit a pull request?

Metadata

Metadata

Assignees

No one assigned

    Labels

    newNewly created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions