Skip to content

Commit abd2400

Browse files
realmarcinclaude
andcommitted
Link growth media to CultureMech and MediaIngredientMech
Implement complete integration with CultureMech recipe database and MediaIngredientMech ingredient catalog to enrich growth_media data across 21 communities with external identifiers and composition details. Changes: - Add media_linker.py: Fetch/cache/match CultureMech and MediaIngredientMech data - Add link_growth_media.py: CLI for automated media/ingredient linking - Update schema: Add 'from' field to GrowthMediaComponent - Update 21 community YAMLs with growth_media linkage Results: - Media: 18/26 matched to CultureMech (69% success rate) - Ingredients: 57/98 linked to MediaIngredientMech (58% success rate) - 28 new ingredients imported from CultureMech recipes - All changes validated against LinkML schema Technical details: - Token-based fuzzy matching (threshold: 0.85) - Independent matching for media (CultureMech) and ingredients (MediaIngredientMech) - Preserves existing curated data with source tagging - Local index loading for performance (10,657 recipes, 1,108 ingredients) Commands added to justfile: - link-media-dry: Preview changes - link-media: Apply linking - link-media-report: Generate CSV/text reports Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c6f988c commit abd2400

26 files changed

Lines changed: 1573 additions & 162 deletions

justfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,21 @@ apply-batch-repairs REPORT:
149149

150150
# Link growth media to CultureMech/MediaIngredientMech (dry-run)
151151
link-media-dry:
152-
uv run python scripts/link_growth_media.py --dry-run
152+
uv run python scripts/link_growth_media.py --dry-run \
153+
--culturemech-index ../../CultureMech/data/normalized_yaml/recipe_index.json \
154+
--mediaingredientmech-index ../../MediaIngredientMech/data/curated/all_ingredients_index.json
153155

154156
# Link growth media to CultureMech/MediaIngredientMech (apply)
155157
link-media:
156-
uv run python scripts/link_growth_media.py
158+
uv run python scripts/link_growth_media.py \
159+
--culturemech-index ../../CultureMech/data/normalized_yaml/recipe_index.json \
160+
--mediaingredientmech-index ../../MediaIngredientMech/data/curated/all_ingredients_index.json
157161

158162
# Generate ingredient/media mapping reports
159163
link-media-report:
160164
uv run python scripts/link_growth_media.py --dry-run \
165+
--culturemech-index ../../CultureMech/data/normalized_yaml/recipe_index.json \
166+
--mediaingredientmech-index ../../MediaIngredientMech/data/curated/all_ingredients_index.json \
161167
--ingredient-report reports/ingredient_mapping.csv \
162168
--media-report reports/media_mapping.csv \
163169
--summary-report reports/media_linking_summary.txt

kb/communities/At_RSPHERE_SynCom.yaml

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,8 @@ growth_media:
284284
incubation_time: '48'
285285
incubation_time_unit: hours
286286
vessel_type: agar plates
287-
preparation_notes: 'Low-nutrient medium used for isolation and maintenance of soil and rhizosphere
288-
bacteria from Arabidopsis roots. R2A supports slow-growing oligotrophic bacteria common in
289-
soil environments.
287+
preparation_notes: 'Low-nutrient medium used for isolation and maintenance of soil and rhizosphere bacteria
288+
from Arabidopsis roots. R2A supports slow-growing oligotrophic bacteria common in soil environments.
290289
291290
'
292291
evidence:
@@ -296,6 +295,61 @@ growth_media:
296295
snippet: We established Arabidopsis leaf- and root-derived microbiota culture collections representing
297296
the majority of bacterial species that are reproducibly detectable by culture-independent community
298297
sequencing
298+
culturemech_id: CultureMech:002706
299+
culturemech_url: https://github.com/CultureBotAI/CultureMech/tree/main/kb/media/CultureMech:002706
300+
composition:
301+
- name: Yeast extract
302+
concentration: '0.5'
303+
unit: G_PER_L
304+
from: CultureMech
305+
media_ingredient_mech_id: MediaIngredientMech:000025
306+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000025
307+
- name: Proteose peptone no. 3
308+
concentration: '0.5'
309+
unit: G_PER_L
310+
from: CultureMech
311+
- name: Casamino acids
312+
concentration: '0.5'
313+
unit: G_PER_L
314+
from: CultureMech
315+
media_ingredient_mech_id: MediaIngredientMech:000173
316+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000173
317+
- name: Glucose
318+
concentration: '0.5'
319+
unit: G_PER_L
320+
from: CultureMech
321+
media_ingredient_mech_id: MediaIngredientMech:000138
322+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000138
323+
- name: Starch
324+
concentration: '0.5'
325+
unit: G_PER_L
326+
from: CultureMech
327+
media_ingredient_mech_id: MediaIngredientMech:000169
328+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000169
329+
- name: Sodium pyruvate
330+
concentration: '0.3'
331+
unit: G_PER_L
332+
from: CultureMech
333+
media_ingredient_mech_id: MediaIngredientMech:000185
334+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000185
335+
- name: K2HPO4
336+
concentration: '0.3'
337+
unit: G_PER_L
338+
from: CultureMech
339+
media_ingredient_mech_id: MediaIngredientMech:000122
340+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000122
341+
- name: MgSO4 x 7 H2O
342+
concentration: '0.05'
343+
unit: G_PER_L
344+
from: CultureMech
345+
media_ingredient_mech_id: MediaIngredientMech:000118
346+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000118
347+
- name: Agar
348+
concentration: '15'
349+
unit: G_PER_L
350+
from: CultureMech
351+
media_ingredient_mech_id: MediaIngredientMech:000119
352+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000119
299353
- name: Half-strength Murashige-Skoog medium for Arabidopsis growth
300354
ph: '5.7'
301355
temperature: '22'
@@ -305,8 +359,8 @@ growth_media:
305359
light_intensity_unit: μmol photons/m²/s
306360
vessel_type: square petri plates (vertical orientation)
307361
preparation_notes: 'Gnotobiotic plant growth system with 0.5× MS medium supplemented with 1% sucrose
308-
and 0.8% agar. Seeds surface-sterilized prior to inoculation. Plates oriented vertically to
309-
allow root observation and bacterial colonization tracking.
362+
and 0.8% agar. Seeds surface-sterilized prior to inoculation. Plates oriented vertically to allow
363+
root observation and bacterial colonization tracking.
310364
311365
'
312366
composition:
@@ -321,9 +375,13 @@ growth_media:
321375
term:
322376
id: CHEBI:17992
323377
label: sucrose
378+
media_ingredient_mech_id: MediaIngredientMech:000214
379+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000214
324380
- name: Agar
325381
concentration: '0.8'
326382
unit: '%'
383+
media_ingredient_mech_id: MediaIngredientMech:000119
384+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000119
327385
evidence:
328386
- reference: doi:10.1038/nature16192
329387
supports: SUPPORT

kb/communities/Chlamydomonas_Bacterial_H2_Consortium.yaml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,12 @@ growth_media:
243243
inoculum_unit: μg chlorophyll/mL
244244
incubation_time: '17'
245245
incubation_time_unit: days
246-
preparation_notes: 'Medium prepared for sustained algal-bacterial hydrogen production. Mannitol and yeast extract are added to support bacterial growth and enhance H2 production. Cultures start under aerobic conditions and transition to anaerobic conditions for hydrogen production. Sulfur deprivation may be used to induce anaerobiosis and activate hydrogenase in Chlamydomonas. High-cell density cultures (76.7 μg/mL chlorophyll) produce 313 mL H2/L over 17 days, while low-cell density cultures (10 μg/mL chlorophyll) produce 163.5 mL H2/L over 25 days.
246+
preparation_notes: 'Medium prepared for sustained algal-bacterial hydrogen production. Mannitol and
247+
yeast extract are added to support bacterial growth and enhance H2 production. Cultures start under
248+
aerobic conditions and transition to anaerobic conditions for hydrogen production. Sulfur deprivation
249+
may be used to induce anaerobiosis and activate hydrogenase in Chlamydomonas. High-cell density cultures
250+
(76.7 μg/mL chlorophyll) produce 313 mL H2/L over 17 days, while low-cell density cultures (10 μg/mL
251+
chlorophyll) produce 163.5 mL H2/L over 25 days.
247252
248253
'
249254
composition:
@@ -255,6 +260,7 @@ growth_media:
255260
term:
256261
id: CHEBI:9754
257262
label: tris(hydroxymethyl)aminomethane
263+
from: community_curated
258264
- name: Acetate (carbon source)
259265
concentration: '17'
260266
unit: mM
@@ -263,6 +269,7 @@ growth_media:
263269
term:
264270
id: CHEBI:30089
265271
label: acetate
272+
from: community_curated
266273
- name: Mannitol
267274
concentration: '20'
268275
unit: mM
@@ -271,6 +278,9 @@ growth_media:
271278
term:
272279
id: CHEBI:16899
273280
label: mannitol
281+
from: community_curated
282+
media_ingredient_mech_id: MediaIngredientMech:000308
283+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000308
274284
- name: Yeast extract
275285
concentration: '0.1'
276286
unit: percent (w/v)
@@ -279,6 +289,9 @@ growth_media:
279289
term:
280290
id: CHEBI:89981
281291
label: yeast extract
292+
from: community_curated
293+
media_ingredient_mech_id: MediaIngredientMech:000025
294+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000025
282295
- name: Ammonium chloride (nitrogen source)
283296
concentration: '7.5'
284297
unit: mM
@@ -287,6 +300,7 @@ growth_media:
287300
term:
288301
id: CHEBI:31206
289302
label: ammonium chloride
303+
from: community_curated
290304
- name: Potassium phosphate
291305
concentration: '1.0'
292306
unit: mM
@@ -295,6 +309,9 @@ growth_media:
295309
term:
296310
id: CHEBI:131527
297311
label: dipotassium hydrogen phosphate
312+
from: community_curated
313+
media_ingredient_mech_id: MediaIngredientMech:000630
314+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000630
298315
- name: Magnesium sulfate
299316
concentration: '0.4'
300317
unit: mM
@@ -303,6 +320,9 @@ growth_media:
303320
term:
304321
id: CHEBI:32599
305322
label: magnesium sulfate
323+
from: community_curated
324+
media_ingredient_mech_id: MediaIngredientMech:000174
325+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000174
306326
- name: Calcium chloride
307327
concentration: '0.34'
308328
unit: mM
@@ -311,12 +331,26 @@ growth_media:
311331
term:
312332
id: CHEBI:3312
313333
label: calcium dichloride
334+
from: community_curated
335+
media_ingredient_mech_id: MediaIngredientMech:000484
336+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000484
337+
- name: See source for composition
338+
concentration: variable
339+
unit: VARIABLE
340+
from: CultureMech
341+
media_ingredient_mech_id: MediaIngredientMech:000002
342+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000002
314343
evidence:
315344
- reference: PMID:38159768
316345
supports: SUPPORT
317346
evidence_source: IN_VITRO
318-
snippet: When incubated in mannitol- and yeast extract-containing medium, this bacterial community can promote and sustain algal hydrogen production up to 313 mL H2·L-1 for 17 days and 163.5 mL H2·L-1 for 25 days in high-cell (76.7 μg·mL-1 of initial chlorophyll) and low-cell density (10 μg·mL-1 of initial chlorophyll) algal cultures, respectively
347+
snippet: When incubated in mannitol- and yeast extract-containing medium, this bacterial community
348+
can promote and sustain algal hydrogen production up to 313 mL H2·L-1 for 17 days and 163.5 mL H2·L-1
349+
for 25 days in high-cell (76.7 μg·mL-1 of initial chlorophyll) and low-cell density (10 μg·mL-1
350+
of initial chlorophyll) algal cultures, respectively
319351
explanation: Establishes mannitol and yeast extract as key medium components for sustained H2 production
352+
culturemech_id: CultureMech:000139
353+
culturemech_url: https://github.com/CultureBotAI/CultureMech/tree/main/kb/media/CultureMech:000139
320354
metals_present:
321355
- TITANIUM
322356
metal_relevance: SIGNIFICANT

kb/communities/Chlamydomonas_Methylobacterium_Mutualism.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ growth_media:
241241
light_regime: continuous illumination
242242
light_intensity: '100'
243243
light_intensity_unit: μmol photons/m²/s
244-
preparation_notes: 'TAP medium is the standard maintenance medium for Chlamydomonas reinhardtii. For nitrogen stress experiments, cultures are grown in nitrogen-depleted TAP medium to induce the mutualistic interaction with Methylobacterium. The medium contains Tris buffer for pH stability and acetate as a carbon source. Ammonium serves as the nitrogen source under normal conditions, but is omitted or depleted to create nitrogen stress.
244+
preparation_notes: 'TAP medium is the standard maintenance medium for Chlamydomonas reinhardtii. For
245+
nitrogen stress experiments, cultures are grown in nitrogen-depleted TAP medium to induce the mutualistic
246+
interaction with Methylobacterium. The medium contains Tris buffer for pH stability and acetate as
247+
a carbon source. Ammonium serves as the nitrogen source under normal conditions, but is omitted or
248+
depleted to create nitrogen stress.
245249
246250
'
247251
composition:
@@ -253,6 +257,7 @@ growth_media:
253257
term:
254258
id: CHEBI:9754
255259
label: tris(hydroxymethyl)aminomethane
260+
from: community_curated
256261
- name: Acetate (carbon source)
257262
concentration: '17'
258263
unit: mM
@@ -261,6 +266,7 @@ growth_media:
261266
term:
262267
id: CHEBI:30089
263268
label: acetate
269+
from: community_curated
264270
- name: Ammonium chloride (nitrogen source)
265271
concentration: '7.5'
266272
unit: mM
@@ -269,6 +275,7 @@ growth_media:
269275
term:
270276
id: CHEBI:31206
271277
label: ammonium chloride
278+
from: community_curated
272279
- name: Potassium phosphate
273280
concentration: '1.0'
274281
unit: mM
@@ -277,6 +284,9 @@ growth_media:
277284
term:
278285
id: CHEBI:131527
279286
label: dipotassium hydrogen phosphate
287+
from: community_curated
288+
media_ingredient_mech_id: MediaIngredientMech:000630
289+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000630
280290
- name: Magnesium sulfate
281291
concentration: '0.4'
282292
unit: mM
@@ -285,6 +295,9 @@ growth_media:
285295
term:
286296
id: CHEBI:32599
287297
label: magnesium sulfate
298+
from: community_curated
299+
media_ingredient_mech_id: MediaIngredientMech:000174
300+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000174
288301
- name: Calcium chloride
289302
concentration: '0.34'
290303
unit: mM
@@ -293,12 +306,25 @@ growth_media:
293306
term:
294307
id: CHEBI:3312
295308
label: calcium dichloride
309+
from: community_curated
310+
media_ingredient_mech_id: MediaIngredientMech:000484
311+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000484
312+
- name: See source for composition
313+
concentration: variable
314+
unit: VARIABLE
315+
from: CultureMech
316+
media_ingredient_mech_id: MediaIngredientMech:000002
317+
media_ingredient_mech_url: https://github.com/CultureBotAI/MediaIngredientMech/tree/main/data/ingredients/MediaIngredientMech:000002
296318
evidence:
297319
- reference: PMID:29385570
298320
supports: SUPPORT
299321
evidence_source: IN_VITRO
300-
snippet: The model alga Chlamydomonas reinhardtii can grow efficiently on several inorganic nitrogen sources (e.g
301-
explanation: Establishes TAP medium as the growth medium for studying nitrogen metabolism and stress responses
322+
snippet: The model alga Chlamydomonas reinhardtii can grow efficiently on several inorganic nitrogen
323+
sources (e.g
324+
explanation: Establishes TAP medium as the growth medium for studying nitrogen metabolism and stress
325+
responses
326+
culturemech_id: CultureMech:000139
327+
culturemech_url: https://github.com/CultureBotAI/CultureMech/tree/main/kb/media/CultureMech:000139
302328
metals_present:
303329
- IRON
304330
- TITANIUM

0 commit comments

Comments
 (0)