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

feat: speed up getKEGGModelForOrganism #369

Merged
merged 2 commits into from
Sep 21, 2021
Merged

Conversation

edkerk
Copy link
Member

@edkerk edkerk commented Sep 12, 2021

Main improvements in this PR:

  • refactor:
    • speed up getKEGGModelForOrganism when renaming gene names from KEGG.
  • feat:
    • allow getKEGGModelForOrganism to take a globalModel structure containing model and KOModel output from getModelFromKEGG as preload, to speed up generating many models for different species.

I hereby confirm that I have:

@edkerk edkerk added this to the 2.5.4 milestone Sep 12, 2021
@edkerk
Copy link
Member Author

edkerk commented Sep 12, 2021

When running getKEGGModelForOrganism many times for different species, it would speed up to take a preloaded global KEGG model as input, instead of running getModelFromKEGG with each iteration. Example of its use in tutorial6:

[globalModel.model,globalModel.KOModel] = getModelFromKEGG;
ScoKEGGHomology=getKEGGModelForOrganism('ScoKEGGHMMs','Sco_all_protein.faa','prok90_kegg94','',1,0,0,0,10^-50,0.3,0.8,inf,inf,-1,globalModel);

Note that all other parameter values now also need to be given as input (and here the default values are given). It is not the most convenient, but left this way as it will not be run as such very often. Regardless, it should speed up running the function, as getModelFromKEGG only needs to be run once for all models.

@edkerk edkerk added the feature A new function or new functionality for an existing function label Sep 12, 2021
@edkerk edkerk merged commit 5302bbc into devel Sep 21, 2021
@edkerk edkerk deleted the feat/speedgetKEGGmodel branch September 21, 2021 18:42
@edkerk edkerk mentioned this pull request Jan 13, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new function or new functionality for an existing function
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants