Skip to content

Testing for conflicts#84

Open
cshenry wants to merge 428 commits into
ModelSEED:dev_updatefrom
cshenry:main
Open

Testing for conflicts#84
cshenry wants to merge 428 commits into
ModelSEED:dev_updatefrom
cshenry:main

Conversation

@cshenry

@cshenry cshenry commented Oct 6, 2022

Copy link
Copy Markdown
Contributor

No description provided.

Fxe and others added 30 commits July 10, 2023 12:51
Fxe and others added 30 commits April 4, 2025 01:16
# Conflicts:
#	modelseedpy/core/msatpcorrection.py
#	modelseedpy/core/msmodel.py
#	modelseedpy/core/mstemplate.py
#	setup.py
- Implements expression-constrained flux balance analysis

- Handles genome-to-model and type transformations
  automatically

- Integrates with ExpressionActivationPkg for optimization

- Includes comprehensive NumPy-style docstring with examples

- Adds 12 unit tests covering all functionality and edge
   cases

- Validates thresholds, conditions, and model compatibility

- Related to PRD 0001 and task list tasks-0001
Fixed issue where reaction expression values were blank when converting
from gene-level to reaction-level expression.

The problem occurred when expression data was loaded without a genome
or when model gene IDs didn't match genome feature IDs. The original
code only searched through the genome object, failing to find genes
with different ID formats (e.g., model has ACIAD#### but expression
has ACIAD_RS#####).

Changes:
- First attempt direct lookup in self.features by gene ID
- Fall back to genome search (which supports aliases) if direct lookup fails
- This allows matching when gene IDs are identical, even without a genome
- Maintains backward compatibility with genome-based alias resolution

Fixes blank reaction expression values in genome-to-model conversion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Integrates a new method to average expression data across replicates for each strain. This method:
- Takes replicate columns (e.g., ACN2586_1, ACN2586_2) and averages them into single columns per strain
- Properly uses MSCondition class instead of a fake ExpressionCondition
- Returns a new MSExpression object with averaged data
- Handles cases where replicates exist, single columns exist, or no data is found
- Includes comprehensive logging and error handling

This method is useful for preprocessing expression data before analysis.
…011CUoKZ7YGo72duYdrs7oTT

Add average_expression_replicates method to MSExpression
…fixes to community and flexible biomass and thermo and adding features to msexpression
MSTemplateBuilder.from_dict() was silently dropping the drain_list
from template JSON files, so template.drains stayed empty. This
meant MSBuilder.build_drains() fell back to DEFAULT_SINKS and only
created SK_ (sink) reactions, never DM_ (demand) reactions.

Without DM_cpd11416_c0, cobrapy FBA returns 0 growth because the
biomass compound (cpd11416) produced by bio1 has no outlet.

Two fixes:
1. mstemplate.py: from_dict() now reads drain_list into builder.drains
2. msbuilder.py: build_demands() creates DM_ reactions for all drain
   compounds (previously required lower_bound < 0, but template
   drain_list entries use [0, 1000])

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix drain_list loading: create DM_ demand reactions during model build
…dd frontmatter

- Replace 306-line obsolete CLAUDE.md with focused tier-split version
- Remove non-home expert/dev skills (only universal + home-repo skills remain)
- Retire: run_headless, free-agent, analyze-email, generate-tasks, create-prd, create-skill
- Add YAML frontmatter (name, description, scope) to all surviving skills

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Convention pivot: .claude/commands/ is now runtime-only (gitignored,
populated by `claude-skills sync`). Source-of-truth lives in
agent-io/skills/.
…feature lookup

Two related changes that unblock the modelseed-api bulk-reconstruction
endpoint (Phase 3 per Chris Henry's PRD).

1. New factory: AnnotationOntology.from_prd_input(genome_id, annotations,
   data_dir, translator, ...). Mirrors from_kbase_data but for inputs
   whose ontology terms have NOT been pre-translated to ModelSEED
   reaction IDs. The translator callable is injected so the factory
   stays decoupled from any specific translation backend
   (KBUtilLib.KBAnnotationUtils.translate_term_to_modelseed is the
   canonical impl; tests use a small in-memory fake).

   Input shape: {gene_id: {ontology_type: [{term, score}, ...]}}.
   Synthesizes one AnnotationOntologyEvent per ontology type, keeps
   priority-list logic untouched. Unmapped terms (translator returns
   []) are retained with an empty msrxns set - per PRD, unmapped genes
   must never silently disappear.

2. Fix latent bug at msbuilder.py:789 in build_from_annotaton_ontology.
   The line called anno_ont.get_feature(gene.id) but AnnotationOntology
   has no such method (features are keyed in genes or cdss dicts). Any
   call path that reached this line would AttributeError as soon as it
   tried to attach evidence to a built reaction. Replaced with the
   correct accessor: anno_ont.genes.get(gene.id) or anno_ont.cdss.get(gene.id).

9 unit tests cover both changes:
- 7 cases for from_prd_input (happy path, multi-gene/multi-ontology,
  score recording, default score, unmapped retention, namespaced-term
  passing, empty input)
- 2 regression tests for the msbuilder fix (one positive, one negative
  lock to flag if get_feature is ever added back without reconciling
  the msbuilder line)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…d-input

feat(annoont): AnnotationOntology.from_prd_input + fix msbuilder get_feature lookup
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.

5 participants