NMDC Context Audit
CompletedResearch Question
Across the BERDL lakehouse, the label "NMDC" is attached to tenants, databases, and
tables whose provenance, depth, breadth, completeness, and added value vary widely.
Does this labeling confuse BERIL users about what each resource actually contains — and
can a linked knowledge base clarify the context so users select the optimal NMDC data
earlier in their sessions (stronger conclusions, less time, less cost)?
Research Plan
Hypothesis
- H0: The existing "NMDC" naming and documentation are sufficient; users can already
determine each resource's provenance, scope, completeness, currency, and added value,
and select optimally without additional context artifacts. - H1: The "NMDC" label is systematically overloaded and under-documented; a
provenance-aware knowledge layer measurably reduces the risk of a user (a) mistaking
re-hosted NCBI/Pfam data for NMDC outputs, (b) missing NMDC-derived data that lives in
thekbasetenant, (c) conflating NEON with NMDC, or (d) relying on a stale snapshot
unaware of its age.
This is a knowledge-engineering audit, not a statistical test. H0/H1 are evaluated by
enumerated, evidence-backed confusion modes (below), each of which either does or does
not survive scrutiny against the live catalog.
Approach
An evidence-first audit of every "NMDC"-labeled resource, captured as a directory of
Open-Knowledge-Format (OKF) markdown files under projects/nmdc_context_audit/knowledge/,
followed by a REPORT.md recommending (but not yet applying) fixes to the static docs
and dynamic tooling.
Provenance classification (evidence gathered in Phase A)
| Class | Resources | Scale (rows) | Last commit |
|---|---|---|---|
| Genuine NMDC | nmdc.metadata (16,640 biosamples / 84 studies), nmdc.results (1.83B KEGG rows) |
10^1–10^9 | 2026-05-20 |
External, re-hosted under nmdc tenant |
nmdc.ncbi_biosamples (51.7M biosamples, 756M attrs), nmdc.ref_data (Pfam, 27k) |
10^4–10^8 | 2026-03-09 / 05-20 |
NMDC-related, in kbase tenant |
kbase.nmdc_mags (62k MAGs), kbase.nmdc_arkin (Arkin-lab embeddings/traits) |
10^3–10^7 | 2026-05-27 / 07-02 |
| Namesake / cruft | kbase.nmdc_neon (NEON program), globalusers.nmdc_core_test*, phantom kbase_nmdc_neon, broken mamillerpa/my.nmdc_flattened_biosamples, dual ./_ aliases |
— | — |
Revision History
- v1 (2026-07-10): Initial plan. Phase A exploration already complete (identifier map,
provenance/scale/currency probes, docs+tooling sweep); design decisions fixed with the
author (repo-native OKF schema; knowledge dir + recommendations, no live doc/tool edits;
project-localknowledge/).
Overview
An audit of every "NMDC"-labeled resource in BERDL: which are genuinely National
Microbiome Data Collaborative outputs vs. external data (NCBI, NEON, Pfam) or
other-group derivations (e.g. Arkin lab); where NMDC data is duplicated across tenants;
whether each copy is complete and current; and what value BERDL has added over
upstream NMDC. Findings are captured as a directory of Open-Knowledge-Format markdown
files (knowledge/) — YAML front matter, descriptive filenames, and cross-links — plus
recommendations to improve the static docs and dynamic discovery tooling.
Key Findings
Finding 1 — One "NMDC" label spans three tenants and six provenance classes
Searching BERDL for nmdc returns resources that share only the substring — not
provenance, scope, scale, or currency. The 20 database names containing "nmdc" resolve to
7 real, maintained resources across three tenants (nmdc, kbase, plus broken
user copies), falling into six provenance classes:
| Provenance class | Resource(s) | Whose work |
|---|---|---|
| Genuine NMDC | nmdc.metadata, nmdc.results |
NMDC program (DOE-BER) |
| External re-host (NCBI) | nmdc.ncbi_biosamples |
NCBI |
| External re-host (Pfam) | nmdc.ref_data |
Pfam consortium |
| Other-group derivation | kbase.nmdc_arkin |
LBNL Arkin Lab |
| NMDC-derived, kbase tenant | kbase.nmdc_mags |
KBase / NMDC |
| Namesake collision | kbase.nmdc_neon |
NEON (NSF) — not NMDC |

The hypothesis (H1) is supported: the label is systematically overloaded, and every one of
the four predicted confusion modes is realized by an actual resource.
(Notebook: 00_nmdc_landscape.ipynb)
Finding 2 — The nmdc tenant is neither "all NMDC" nor "only NMDC"
Two of the four databases in the nmdc tenant are external data re-hosted, not NMDC
output: nmdc.ncbi_biosamples (an NCBI BioSample harvest — 51,711,888 biosamples,
756,112,544 attribute rows) and nmdc.ref_data (Pfam, 27,481 terms). Meanwhile, three
NMDC-related databases live outside the tenant, in kbase: nmdc_arkin, nmdc_mags,
nmdc_neon. Because the inventory groups by catalog prefix, these are filed under "kbase"
and are invisible to anyone browsing the nmdc tenant.
A concrete scale trap: the genuine NMDC biosample universe is 16,640 samples
(nmdc.metadata.biosample_set), while the co-hosted NCBI mirror alongside it is 51.7M —
a ~3,000× difference with nothing in the names to signal it.
(Notebook: 00_nmdc_landscape.ipynb)
Finding 3 — Data currency spans days to months, and is invisible at discovery
Iceberg snapshot ages differ by ~4 months across the label, yet nothing surfaces this to a
user choosing a resource:

| Resource | Last commit | Freshness |
|---|---|---|
kbase.nmdc_mags |
2026-07-02 | freshest (days) |
kbase.nmdc_neon |
2026-07-02 | fresh |
kbase.nmdc_arkin |
2026-05-27 | ~6 weeks |
nmdc.metadata / nmdc.results / nmdc.ref_data |
2026-05-20 | ~7 weeks |
nmdc.ncbi_biosamples |
2026-03-09 | stalest (~4 months) |
(Notebook: 00_nmdc_landscape.ipynb)
Finding 4 — The context that would prevent all of this is missing from every layer
- Catalog layer: tables carry no
Comment; databases have emptyProperties
(ownertgu2). Zero human-readable context in the lakehouse itself. - Static docs: the canonical NMDC schema link
docs/schemas/nmdc.mdis a 404
(docs/schemas/does not exist);docs/overview.mdnever mentions NMDC. - Dynamic tooling: the
berdlskill has zero NMDC content;berdl_inventory.py
groups purely by catalog prefix, sokbase.nmdc_*is never linked back to NMDC. - Provenance blur even where docs exist:
berdl_data_atlastags Rhea/GO reference
ontologies undernmdc_arkinas "NMDC integrated."
Results
The full evidence table (data/nmdc_landscape.csv) classifies each real resource by
provenance, scale, currency, and authority. The naming hazards (data/nmdc_naming_cruft.csv)
document the aliases, test databases (globalusers.nmdc_core_test*), phantom
(kbase_nmdc_neon, 0 tables), and broken user copies (mamillerpa/my.nmdc_flattened_biosamples,
dangling Iceberg pointer). Of 20 "nmdc" database names, only 7 are real, maintained resources.
The primary deliverable is knowledge/ — a 15-file Open-Knowledge-Format directory
(repo-native name/description/metadata frontmatter with provenance/tenant/currency/
authority fields, one topic per file, fully cross-linked). Its entry points are
knowledge/README.md (index), knowledge/nmdc-label-is-overloaded.md (the thesis), and
knowledge/nmdc-choosing-the-right-resource.md (a goal→resource decision guide).
Interpretation
The overloaded label is not a cosmetic issue — the evidence is consistent with it driving
the sub-optimal-resource selection the project set out to test (this is inferred from the
gap analysis and prior-project usage skew, not from a directly observed wrong choice; see
Limitations). A user who wants NMDC-curated microbiome metadata but
pulls nmdc.ncbi_biosamples operates on the wrong data at 3,000× the scale; a user who
searches only the nmdc tenant silently excludes the freshest MAG catalog; a user who cites
kbase.nmdc_neon as NMDC mis-attributes an NSF program. Each such mistake would plausibly
cost time and compute and weaken conclusions — the failure mode the knowledge layer is
designed to prevent — though, as noted in Limitations, this is inferred from the gap
analysis and prior-project reuse skew, not from a directly observed wrong choice.
The audit also clarifies that co-hosting is often intentional and valuable: the NCBI mirror
exists because BERDL adds an attribute-harmonization layer that makes 51.7M raw NCBI samples
analytically usable; the Arkin derivative adds embeddings/traits that do not exist upstream.
So the fix is not to relabel or remove resources but to surface provenance and
value together — which is what the knowledge base does.
Literature / authority context
- NMDC — National Microbiome Data Collaborative, DOE-BER (https://microbiomedata.org/);
its LinkML-based data model defines the*_setschema innmdc.metadata. - NEON — National Ecological Observatory Network, NSF (https://www.neonscience.org/);
distinct agency and sampling design from NMDC. - NCBI BioSample (https://www.ncbi.nlm.nih.gov/biosample) and Pfam/InterPro are the
true authorities fornmdc.ncbi_biosamplesandnmdc.ref_datarespectively. - Prior in-repo knowledge (
docs/pitfalls.md## nmdc_arkin,docs/discoveries.md) covers
nmdc_arkinwell but leaves the other six resources thinly or undocumented — consistent
with this audit's gap analysis.
Novel contribution
No prior artifact in the repo classifies the provenance of the NMDC label or measures its
scale/currency spread. This audit is the first to (a) enumerate all seven real resources with
verified counts and snapshot ages, (b) name the six provenance classes, and (c) provide a
goal→resource decision guide.
Limitations
- Provenance classes are inferred from schema, table properties, tenant metadata, and prior
project usage — not from an ingestion manifest (none is exposed in-catalog). kbase.nmdc_*database descriptions are access-restricted (ForbiddenException), so some
metadata (e.g. steward-authored notes, if any) could not be captured.- Completeness is assessed relative to snapshot timestamps, not by diffing against live
upstream NMDC/NCBI record counts (out of scope; would require external API calls).
Future Directions
- Apply the recommendations (create
docs/schemas/nmdc.md+berdlskill NMDC module) and
measure whether new NMDC projects reach the right resource faster. - Add a lightweight currency/provenance annotation to
berdl_inventory.pyoutput so the
disambiguation is dynamic, not just documentary. - Extend the provenance-audit method to other overloaded labels in BERDL (e.g. any tenant
co-hosting external mirrors) — the six-class framework generalizes. - Diff
nmdc.metadata/nmdc.ncbi_biosamplesagainst live upstream record counts to
quantify completeness lag precisely.
Data
Sources
| Collection | Tables Used | Purpose |
|---|---|---|
nmdc_metadata |
biosample_set, study_set, data_generation_set, workflow_execution_set, functional_annotation_agg |
Genuine NMDC metadata; scale/currency |
nmdc_results |
annotation_kegg_orthology, annotation_statistics, gtdbtk_bacterial_summary, checkm_statistics |
Genuine NMDC pipeline outputs |
nmdc_ncbi_biosamples |
biosamples_flattened, biosamples_attributes, bioprojects_flattened, sra_biosamples_bioprojects |
Prove NCBI (not NMDC) provenance + scale |
nmdc_ref_data |
pfam_terms |
Prove Pfam provenance |
kbase_nmdc_arkin |
taxonomy_dim, metabolomics_gold, embeddings_v1, omics_files_table, study_table |
Arkin-lab derivation characterization |
kbase_nmdc_mags |
mag_catalog, bin_catalog, biosample_metadata, study_sample |
MAG catalog scale/currency |
kbase_nmdc_neon |
neon_mag_catalog, sample_data, study_sample |
NEON namesake characterization |
Generated Data
| File | Rows | Description |
|---|---|---|
data/nmdc_landscape.csv |
7 | Per-resource provenance class, signature-table row count, currency, authority |
data/nmdc_naming_cruft.csv |
5 | Aliases, test DBs, phantom and broken NMDC-named databases |
data/provenance_probe.md |
— | Raw DESCRIBE/count/snapshot probe output |
References
See references.md for the full, canonical list of authoritative sources
for the data providers and programs disambiguated in this audit — NMDC (microbiomedata.org),
NEON (NSF), NCBI BioSample, Pfam/InterPro, and KBase — plus pointers to the relevant in-repo
prior knowledge. Maintained in one place to avoid drift.
Discoveries
- The "nmdc" tenant co-hosts a 51.7M-row NCBI BioSample mirror and Pfam vocabulary
alongside genuine NMDC data; substring ≠ provenance. Any project treating "the nmdc
tenant" as one coherent NMDC dataset will mis-scope or mis-attribute. - NMDC-derived data is split across two tenant homes (
nmdc.*andkbase.nmdc_*) with no
cross-link; the freshest NMDC resource (kbase.nmdc_mags, 62,346 MAGs) sits in the tenant
a user is least likely to search for NMDC. kbase.nmdc_neonis NEON (NSF National Ecological Observatory Network), a different
program — an acronym collision that would corrupt agency attribution.- Iceberg
.snapshots.committed_atis the only available data-currency signal (no table
comments, no changelog); it should be surfaced in discovery tooling.
Performance Notes
- Row counts on all NMDC tables — including
nmdc.results.annotation_kegg_orthology
(1.83B rows) — return instantly via Iceberg metadata (SELECT COUNT(*)), so cataloguing
scale is cheap and need not be avoided. DESCRIBE DATABASE EXTENDED kbase.nmdc_*raisesForbiddenExceptionfor a
kesciencero/microbialdiscoveryforgeprincipal even thoughCOUNT(*)on the same
tables succeeds — metadata introspection and data reads have different access surfaces.get_databases()returns both the dotted Iceberg alias (nmdc.metadata) and the
underscore Hive alias (nmdc_metadata) for every tenant DB, so de-dupe to the dotted form
before iterating to avoid double-counting. (The broader dotted-vs-underscore namespace
migration is already documented repo-wide indocs/pitfalls.md; this note is only the
get_databases()-returns-both-forms delta.)
Recommendations (proposed, not applied)
Per the approved scope, this project produces the knowledge base and recommends — but does
not yet apply — the following reviewable fixes to the static docs and dynamic tooling:
- Repair the schema entry point.
docs/schema.md:16links to a non-existent
docs/schemas/nmdc.md. Either createdocs/schemas/nmdc.md(seeded from this
knowledge/directory) or repoint the link. This is the single highest-value doc fix. - Add a
berdlskill NMDC module..claude/skills/berdl/modules/nmdc.mdsummarizing
the seven resources, provenance classes, join pitfalls, and the decision guide, so
discovery-time guidance disambiguates NMDC. - Cross-link the split tenant homes in the inventory.
berdl_inventory.pyshould note,
under thenmdctenant, thatkbase.nmdc_arkin/mags/neonare related-but-separate, and
flagkbase.nmdc_neonas NEON (not NMDC). - Surface currency at discovery. Add
max(committed_at)(Iceberg snapshot age) to
inventory output; it is cheap and is the only currency signal users have. - Fix provenance-blur labels. In
berdl_data_atlasdata, retag Rhea/GO reference
ontologies undernmdc_arkinas external reference, not "NMDC integrated." - Mention NMDC in
docs/overview.mdso top-level orientation acknowledges the collection. - Housekeeping. Repair or drop the broken
mamillerpa/my.nmdc_flattened_biosamples
copies and the phantomkbase_nmdc_neonalias (route via commit/PR, not ad-hoc FS ops).
Data Collections
Review
Summary
This is a mature, third-pass review of a well-executed knowledge-engineering audit. The project enumerates every BERDL resource whose name contains "nmdc," classifies each of the 7 real, maintained resources into one of six provenance classes across three tenants, and backs every claim with a live, reproducible probe (Iceberg row counts and snapshot timestamps) in a single fully-executed notebook. The primary deliverable — a 15-file, cross-linked Open-Knowledge-Format directory under knowledge/ — remains genuinely useful and specific. Since REVIEW_2, the author has visibly incorporated feedback: the causal language in REPORT.md's Interpretation section is now consistently hedged back to the Limitations framing, and knowledge/nmdc-prior-project-usage.md now carries an explicit "read this as a default-choice skew, not a catalogue of documented errors" caveat that directly answers REVIEW_2's Suggestion 5. I independently re-verified the notebook execution (all code cells carry real, matching outputs — the printed table, the CSV write confirmation, the two rendered figures), cross-checked data/provenance_probe.md against data/nmdc_landscape.csv (exact agreement on all 7 rows), and re-confirmed the four factual claims underlying Finding 4 and the Recommendations (docs/schema.md:16 → docs/schemas/nmdc.md 404, no "nmdc" in docs/overview.md, no NMDC file in .claude/skills/berdl/modules/, and the two docs/pitfalls.md sections covering only nmdc_arkin). All hold. The remaining items are cosmetic (the references.md / REPORT.md References duplication) — there is nothing outstanding that should block submission.
Methodology
The research question is clearly and honestly scoped: "this is a knowledge-engineering audit, not a statistical test," with H0/H1 evaluated against enumerated, evidence-backed confusion modes rather than a significance test. That framing fits the subject (a documentation/discoverability gap) and is maintained consistently from RESEARCH_PLAN.md through REPORT.md.
Data sources are unambiguous and traceable end to end: data/probe_identifiers.py enumerates every "nmdc"-containing database name (the cell-3 notebook output lists all 20, matching data/nmdc_naming_cruft.csv's cruft inventory exactly); data/probe_provenance.py produces the raw DESCRIBE/COUNT/snapshot evidence in data/provenance_probe.md; and 00_nmdc_landscape.ipynb consolidates both into data/nmdc_landscape.csv and the two figures. I diffed the row counts and timestamps between provenance_probe.md and nmdc_landscape.csv for all 7 resources — they agree exactly (e.g., biosample_set 16,640 / 2026-05-20 01:15:48.857000; biosamples_flattened 51,711,888 / 2026-03-09 03:58:35.218000). The README's Reproduction section gives concrete, ordered commands with expected outputs, and states the audit is point-in-time (2026-07-10) with a note that re-running refreshes the numbers — appropriate given this queries a live, changing catalog.
The "does labeling confuse users" half of the question is necessarily indirect (inferred confusion modes plus a prior-project reuse skew, 8/10 projects defaulting to kbase.nmdc_arkin), and both REPORT.md and knowledge/nmdc-prior-project-usage.md now say so plainly rather than overselling it as observed behavior.
Code Quality
The notebook is short (14 cells, 7 markdown / 7 code), linear, and — confirmed by direct inspection of the .ipynb JSON — fully executed with real, non-empty outputs on every code cell: Spark session confirmation, the 20-database enumeration, the printed landscape table, the CSV-write confirmation with a preview table, and two rendered matplotlib figures. This is exactly the kind of reproducibility saved-output check called for in review guidance, and it passes cleanly.
SQL is minimal and correct: SELECT COUNT(*) and SELECT max(committed_at) FROM {table}.snapshots are the only two query patterns, both aligned with docs/pitfalls.md's general guidance to prefer Iceberg metadata over full scans, and both directly validated by the Performance Notes in REPORT.md (COUNT(*) on a 1.83B-row table returns instantly; DESCRIBE DATABASE EXTENDED on kbase.nmdc_* raises ForbiddenException even though reads succeed — this is visible verbatim in data/provenance_probe.md's truncated error messages, e.g. UnknownException: (org.apache.iceberg.exceptions.ForbiddenException) Forbidden: Principal 'mamillerpa'...).
The dual dotted/underscore alias handling is a direct, correctly-applied instance of the repo-wide pitfall in docs/pitfalls.md ("Namespace Convention Changed from Underscores to Dots"), and the notebook's own cell-3 output demonstrates the phenomenon concretely (nmdc.metadata and nmdc_metadata both present in the enumeration). I re-confirmed the two docs/pitfalls.md sections cited in REPORT.md (## NMDC (nmdc_arkin) Pitfalls at line 1517, ## nmdc_arkin at line 1942) exist and cover only the Arkin-lab derivative — the claim that the other six resources are thinly/undocumented in the historical pitfalls file is accurate. No project-local memories/pitfalls.md exists, consistent with this being a discovery/audit project that did not hit live runtime errors requiring capture (the DESCRIBE DATABASE forbidden-but-count-succeeds asymmetry was instead captured directly as a REPORT.md Performance Note, which is a reasonable choice here).
I independently re-verified the four load-bearing factual claims behind Finding 4 / Recommendations 1–2:
- docs/schema.md:16 links to schemas/nmdc.md; docs/schemas/ does not exist on disk — confirmed 404.
- docs/overview.md has zero case-insensitive occurrences of "nmdc" — confirmed.
- .claude/skills/berdl/modules/ contains no NMDC-named file — confirmed.
- docs/pitfalls.md has exactly two nmdc_arkin-scoped sections and none for the other six resources — confirmed by section-header scan.
All four check out, and combined with the exact-match CSV/probe cross-check above, I have high confidence in the evidence table underlying every finding.
Findings Assessment
The four findings are each traceable to a specific number in data/provenance_probe.md or data/nmdc_landscape.csv — the 16,640-vs-51.7M biosample scale trap (Finding 2), the ~4-month currency spread visualized in figures/nmdc_currency.png (Finding 3), and the catalog/docs/tooling gap analysis (Finding 4). Nothing reads as unfinished or "to be filled." Limitations are explicit and honest: provenance is inferred rather than pulled from an ingestion manifest; kbase.nmdc_* database-level metadata is access-restricted; completeness is assessed against snapshot timestamps rather than a live upstream diff. The Interpretation section correctly resists the temptation to treat every provenance mismatch as a defect — it explicitly notes that co-hosting NCBI data under the nmdc tenant is often intentional and valuable (BERDL's attribute-harmonization layer over 51.7M raw samples), which is a fair, non-alarmist reading of the evidence rather than an audit looking for problems to report.
On the Discoveries/Performance Notes in REPORT.md, evaluated as first-class candidates for cross-project memory promotion:
- "The nmdc tenant co-hosts a 51.7M-row NCBI mirror + Pfam vocabulary alongside genuine NMDC data" — well-scoped, directly supported, generalizable to any project scoping "the nmdc tenant." Good candidate.
- "kbase.nmdc_neon is NEON, not NMDC" — unambiguous, load-bearing for citation/attribution correctness. Good candidate.
- "COUNT(*) on a 1.83B-row table returns instantly via Iceberg metadata" and "DESCRIBE DATABASE EXTENDED is Forbidden even when COUNT(*) succeeds" — concrete, testable, correctly scoped as general BERDL access-surface behavior rather than project-specific. Good candidates.
- The get_databases()-returns-both-dotted-and-underscore-forms note is the one entry that is partially redundant with the existing repo-wide pitfall; the REPORT itself flags this and scopes the delta correctly in a parenthetical, which is the right instinct even though the surrounding sentence still restates the general pitfall. If this gets promoted to a shared memory file, only the de-dupe-before-iterating detail should carry forward.
Suggestions
- (Resolved since REVIEW_2) The Interpretation section's causal language is now consistently hedged and cross-referenced to Limitations, and
knowledge/nmdc-prior-project-usage.mdnow explicitly frames the reuse map as a "default-choice skew, not a catalogue of documented errors." No further action needed on either point. - (Nice-to-have, carried over)
references.mdand REPORT.md's References section remain near-duplicate lists. Consider having REPORT.md point toreferences.mdinstead of repeating it, so future edits only happen in one place. Low priority — does not affect correctness or reproducibility. - (Nice-to-have) When promoting the Performance Notes to a shared memory file at submission time, trim the alias-dedup entry to just the
get_databases()-returns-both-forms / de-dupe-before-iterating delta rather than carrying the full restatement of the general dotted/underscore pitfall. - No blocking issues found. README, RESEARCH_PLAN, REPORT, notebook execution, figures, and the knowledge base are all internally consistent and cross-verified against the live repo and the probe data in this review. This project appears ready for
/submitfrom a review-completeness standpoint.
This review was generated by an AI system. It should be treated as advisory input, not a definitive assessment.
Visualizations
Nmdc Currency
Nmdc Scale