KEGG FASTA/HMM reconstruction: align model output with MATLAB RAVEN - #77
Merged
Conversation
Bring the protein-FASTA reconstruction (get_kegg_model_from_sequences)
into byte-parity with RAVEN develop3 getKEGGModelForOrganism:
- Prune each gene-backed reaction's kegg.orthology annotation to the KOs
that actually matched a gene, via a new prune_orthology flag on
assemble_model_from_ko_genes (off by default, so the organism-annotation
path keeps the full KO list). The order-preserving intersection also
avoids the rxnMiriams index misalignment in the MATLAB pruning.
- Default model.id to the FASTA stem when no model_id is given, so the
draft never inherits the reference model's id.
- Use a neutral reaction note ("Included by KEGG HMM reconstruction").
Note: the hmmsearch -Z parity item is handled on the MATLAB side (Python's
-Z <nprofiles> matches the hmmscan scale the K15 cut-offs were calibrated
against).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the protein-FASTA reconstruction path (
get_kegg_model_from_sequences)into byte-parity with RAVEN
develop3getKEGGModelForOrganism(HMM branch), sothe Python and MATLAB pipelines produce identical draft models from the same FASTA
and the shared raven-data artefacts.
Changes
kegg.orthologyto matched KOs.assemble_model_from_ko_genesgains aprune_orthologyflag (default off, so the organism-annotation path keeps the fullreference KO list); the FASTA path passes
True. Each gene-backed reaction'skegg.orthologyis restricted to the KOs that actually matched a gene, order-preserving— which also avoids the
rxnMiriamsindex misalignment in the MATLAB pruning.model.id. When nomodel_idis given, the draft's id defaults to the FASTAstem instead of inheriting the reference model's id (RAVEN always sets
model.id). Passmodel_idexplicitly for byte-identical parity with a specific MATLABorganismID.Included by KEGG HMM reconstruction).No behaviour change to the organism-annotation path or to default
keepSpontaneous=trueruns;
assign_kosscoring/filters are unchanged.MATLAB counterpart
The remaining parity items are applied on RAVEN
develop3(separately): pass-Z <nprofiles>tohmmsearch(E-value scale the cut-offs are calibrated against),keep gene-supported spontaneous reactions under
keepSpontaneous=false, fix thekegg.orthologyprune alignment, sort grRule genes, and use the neutral note.Testing
Full suite: 829 passed, 4 skipped. Adds tests for the orthology prune and the
model.iddefault.