chore: Human2 repository and code cleanup#1055
Merged
Merged
Conversation
Remove the archived Human1-era scripts, data and model files from .deprecated/ (they remain in the git history and in the last Human1 release, v1.19.0) and leave a README pointing there.
Remove the Human1-era one-off curation scripts (code/modelCuration/*, code/curateReactionNames.py) with their input data, and the static external dumps (SwissProt/Cell Atlas/DeepLoc2 compartments, Rhea associations, metabolite SMILES/InChI) that had gone stale. The compartment data they produced is already in genes.tsv; the dumps are better queried fresh. All remain in the git history and in v1.19.0. READMEs updated.
Human2 code/ cleanup, no model changes. Continues the chore/human2-cleanup branch. Remove functions with no remaining callers or superseded by RAVEN: - root: removeReactionsFull, standardizeMetFormulas, addMetCompsField - misc: countEmpty, flattenCell, getNonEmptyList, nestCell, prettyJson, reformatElements - qc: overlapRxnDetection, identifyMassVariableRxns, detectDuplicateRxns - GPRs: addComplexesToGeneRules, updateGrRules, fetch_ensembl_gene_annotations.py Merge getCompNetwork into getSubNetworksInComp as a local function (it was the only caller). Group the animal-GEM derivation and its helpers under code/animalGEM/: updateAnimalGEM, updateAnimalAnnotations, getModelFromOrthology, gapfill4EssentialTasks, cleanGrRules, translateGrRules, replaceGrRules, extractAllianceGenomeOrthologs, countFrequency.
addBoundaryMets and RAVEN's closeModel both add boundary metabolites for metabolic task checking. Verified functionally equivalent on Human-GEM: identical essential (57/57) and verification (21/21) checkTasks outcomes. Migrate all callers to closeModel and remove addBoundaryMets: - test/testMetabolicTasks, animalGEM/gapfill4EssentialTasks (calls) - test/estimateEssentialGenes (call) - tINIT/getINITModel2, test/evalGeneEssentialityPred (doc/error text)
Its only caller is updateAnimalGEM (now under animalGEM/), which returns its modelChanges log as speciesSpecNetwork. Keep the encapsulation and move it alongside the other animal-GEM functions rather than inlining it.
Model quality report✅ Model QC checks fine, no changes compared to Model QC checks
MACAW and mass/charge balanceMACAW: dead-end and duplicate testsMass and charge balanceGene essentiality (Hart 2015)
Per-finding detail is committed to Results for commit 01ee965. Full workflow run · this comment is edited on subsequent runs |
MAR01801 had two name fields: the descriptive name and a leftover empty `name: ""`. This made cobra.io.load_yaml_model raise a duplicate-key AssertionError, which was failing qcModelChecks.py (checks) and memoteTest.py (yaml-validation) on develop, independent of the cleanup. Remove the empty duplicate, keeping "thioredoxin-disulfide reductase (NADPH) (ubiquinone)" (EC 1.8.1.9). Both scripts pass locally after the fix.
Member
Author
|
No structural model changes (except a small fix of duplicate name entry) |
This was referenced Jul 12, 2026
Open
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.
Main improvements in this PR:
Repository and
code/cleanup for the Human2 (v2.0.0) era, plus one model data-integrity fix.Model fix
name: ""field from reactionMAR01801(it carried both a descriptive name and a leftover empty one). The duplicate madecobra.io.load_yaml_modelraise a duplicate-key error, which was failingqcModelChecks.py(checks) andmemoteTest.py(yaml-validation) ondevelop, independent of this PR. The descriptive namethioredoxin-disulfide reductase (NADPH) (ubiquinone)(EC 1.8.1.9) is kept; both scripts pass locally after the fix. No reactions or metabolites are added or removed.Repository pruning
.deprecated/(136 archived Human1-era files) to a singleREADME.mdthat points to where they remain available: the git history and the last Human1 release, v1.19.0.code/modelCuration/*andcode/curateReactionNames.py) together with their input data.data/modelCuration/(SwissProt / Cell Atlas / DeepLoc2 subcellular locations, Rhea reaction associations, metabolite SMILES/InChI); these are better queried fresh from the source when needed.code/function cleanupremoveReactionsFull,standardizeMetFormulas, orphanedmisc/andqc/utilities,GPRs/updateGrRules,GPRs/fetch_ensembl_gene_annotations.py).getCompNetworkinto its only callergetSubNetworksInComp(as a local function).code/animalGEM/subfolder (10 functions).addBoundaryMetswith RAVEN'scloseModel, verified functionally equivalent on Human-GEM (identicalcheckTasksoutcomes: essential 57/57, verification 21/21).Validated locally in MATLAB R2024b (the merged
getSubNetworksInCompruns on the model;testMetabolicTaskspasses withcloseModel) and in Python (qcModelChecks.pyandmemoteTest.pypass after the model fix).I hereby confirm that I have:
data/deprecatedIdentifiers/.developas target branch, and will be resolved with a squash-merge.mainas target branch, and will be resolved with a merge commit.