Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove some empty fields from imported yaml model #420

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

JonathanRob
Copy link
Collaborator

Main improvements in this PR:

The importYaml function defines and creates a set of model fields at the start of import, which means that if some fields are missing from the .yml file, the corresponding fields in the Matlab structure will be empty. Since some functions expect fields to be of a certain length (e.g., those relating to metabolites, genes, and reactions), empty fields may cause errors in those functions.

This PR implements a change in the importYaml function that checks if any model fields are still empty at the end of the import process, and removes those fields. A few exceptions are included to avoid removing some fields which are OK to be empty (description, version).

This PR also addresses an Issue in the Mouse-GEM repository.

I hereby confirm that I have:

  • Tested my code on my own computer for running the model
  • Selected develop as a target branch

@haowang-bioinfo
Copy link
Member

this PR enables importYaml to get rid of empty and non-essential fields - it looks fine to me

@haowang-bioinfo haowang-bioinfo merged commit b609bfe into develop Oct 10, 2022
@haowang-bioinfo haowang-bioinfo deleted the fix/importYaml branch October 10, 2022 06:51
@haowang-bioinfo haowang-bioinfo mentioned this pull request Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants