Skip to content

Error in creation of PEtab tables for the model #138

@aidinbii

Description

@aidinbii

Hi, I'm following this notebook:
https://github.com/yaml2sbml-dev/yaml2sbml/blob/main/doc/examples/Lotka_Volterra/Lotka_Volterra_python/Lotka_Volterra.ipynb

After running

yaml_file_petab = 'ODEs_HuImm_PKN3_MM1_timeDep.yml'
PEtab_dir = './PKN3_MM1_PETAB/'
PEtab_yaml_name = 'problem.yml'
measurement_table_name = 'measurement_table.tsv'
model_name = 'PKN3_MM1_model'

yaml2sbml.yaml2petab(yaml_file_petab,
                     PEtab_dir,
                     model_name,
                     PEtab_yaml_name,
                     measurement_table_name,
                    )

I get the following error:

File ~/miniconda3/envs/amici_env/lib/python3.10/site-packages/yaml2sbml/yaml2PEtab.py:287, in validate_petab_tables(sbml_dir, output_dir)
    283 if os.path.exists(condition_table_dir):
    284     condition_df = pd.read_csv(condition_table_dir,
    285                                sep='\t',
    286                                index_col='conditionId')
--> 287     petab.lint.check_condition_df(condition_df, model)
    289 # check parameter table
    290 parameter_df = pd.read_csv(parameter_file_dir,
    291                            sep='\t',
    292                            index_col='parameterId')

File ~/miniconda3/envs/amici_env/lib/python3.10/site-packages/petab/lint.py:123, in check_condition_df(df, model, observable_df)
    119         assert_no_leading_trailing_whitespace(
    120             df[column_name].values, column_name)
    122 if model is not None:
--> 123     allowed_cols = set(model.get_valid_ids_for_condition_table())
    124     if observable_df is not None:
    125         allowed_cols |= set(petab.get_output_parameters(
    126             model=model, observable_df=observable_df))

AttributeError: 'Model' object has no attribute 'get_valid_ids_for_condition_table'

The model instance was created:

model = model_module.getModel()

Could you please help me out and explain this error

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions