# curatedMetagenomicData: cmgd_mpa4.2 2.3.0

Profiles from the cmgd_mpa4.2 2.3.0 registration of curatedMetagenomicsNextflow, one full snapshot per release, with a samples table and, when available, per-source sample metadata. HUMAnN gene families are per-sample downloads listed in genefamilies/index.json.

- **Publisher:** curatedMetagenomicData
- **Required artifacts:** ducklake, parquet

# marker_abundance

MetaPhlAn marker abundances.

- **Grain:** one row per sample, branch and marker
- **Primary key:** sample_key, data_type, marker_name
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0
- **Sort by:** study_name, sample_key, marker_name

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| sample_id | string | Yes | md5 of the sorted run accessions (NULL for readset-keyed registrations). |  |  |  |  |  |
| readset_id | string | Yes | Readset id (RS.…, ADR-0007) once known. |  |  |  |  |  |
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| run_ids | string | Yes | Semicolon-separated SRA run accessions. |  |  |  |  |  |
| workflow_id | string | Yes | Registration workflow id. |  |  |  |  |  |
| version | string | Yes | Registration version. |  |  |  |  |  |
| data_type | string | Yes | full_data (all reads) or rarefied_data (1M-read subsample). |  |  |  |  |  |
| marker_name | string | Yes | MetaPhlAn marker id. |  |  |  |  |  |
| value | double | Yes | Marker abundance as reported by MetaPhlAn. |  |  |  |  |  |

# marker_presence

MetaPhlAn markers present in a sample (a row exists iff the marker is present).

- **Grain:** one row per sample, branch and present marker
- **Primary key:** sample_key, data_type, marker_name
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0
- **Sort by:** study_name, sample_key, marker_name

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| sample_id | string | Yes | md5 of the sorted run accessions (NULL for readset-keyed registrations). |  |  |  |  |  |
| readset_id | string | Yes | Readset id (RS.…, ADR-0007) once known. |  |  |  |  |  |
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| run_ids | string | Yes | Semicolon-separated SRA run accessions. |  |  |  |  |  |
| workflow_id | string | Yes | Registration workflow id. |  |  |  |  |  |
| version | string | Yes | Registration version. |  |  |  |  |  |
| data_type | string | Yes | full_data (all reads) or rarefied_data (1M-read subsample). |  |  |  |  |  |
| marker_name | string | Yes | MetaPhlAn marker id. |  |  |  |  |  |

# metadata_comparison

Agreement between cMD curation and the Olm Microbiome Repo per study and field, with Olm's cMD-imported rows included (olm_rows = all) and excluded (independent). Attribution required: Microbiome Repo, OlmLab, release R2026.25 (data package 1.20.0), doi:10.5281/zenodo.23087712; values derived. Required attribution for the CC-BY-4.0 tables.

- **Grain:** one row per study, field and olm_rows scope
- **Primary key:** study_name, field, olm_rows
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC-BY-4.0
- **Sort by:** study_name, field

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| field | string | Yes | Metadata field: the harmonized name (age_years, sex, country, bmi, antibiotics_current_use, health_condition) where mapped, else the source's own. |  |  |  |  |  |
| olm_rows | string | Yes | Olm rows compared: all, or independent (without external.cmd). |  |  |  |  |  |
| n_both | int64 | Yes | Samples with a value in both sources. |  | samples |  |  |  |
| n_agree | int64 | Yes | Of n_both, values that agree (age within 1 year). |  | samples |  |  |  |
| n_disagree | int64 | Yes | Of n_both, values that disagree. |  | samples |  |  |  |
| n_cmd_only | int64 | Yes | Samples with a cMD value only. |  | samples |  |  |  |
| n_olm_only | int64 | Yes | Samples with an Olm value only. |  | samples |  |  |  |
| agreement | double | Yes | n_agree / n_both. |  | fraction (0-1) |  |  |  |

# metadata_sources

The metadata source releases in the store; `pinned` marks the one the metadata tables read.

- **Grain:** one row per source release
- **Primary key:** source, release
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| source | string | Yes | Metadata source: cmd (curatedMetagenomicData curation) or olm (Microbiome Repo). |  |  |  |  |  |
| release | string | Yes | Source release: cMD curation commit, or Olm release id. |  |  |  |  |  |
| package_version | string | Yes | Source data package version. |  |  |  |  |  |
| doi | string | Yes | Source release DOI. |  |  |  |  |  |
| license | string | Yes | Source licence. |  |  |  |  |  |
| sha256 | string | Yes | sha256 of the loaded source file. (Its download URL is in provenance.json: a frozen catalog may not carry URLs.) |  |  |  |  |  |
| loaded_at | string | Yes | When the release was loaded into the lake (UTC). |  |  |  |  |  |
| pinned | bool | Yes | Whether this is the release the metadata tables read. |  |  |  |  |  |

# qc_metrics

Per-sample read accounting and provenance.

- **Grain:** one row per sample
- **Primary key:** sample_key
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0
- **Sort by:** study_name, sample_key

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| sample_id | string | Yes | md5 of the sorted run accessions (NULL for readset-keyed registrations). |  |  |  |  |  |
| readset_id | string | Yes | Readset id (RS.…, ADR-0007) once known. |  |  |  |  |  |
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| run_ids | string | Yes | Semicolon-separated SRA run accessions. |  |  |  |  |  |
| workflow_id | string | Yes | Registration workflow id. |  |  |  |  |  |
| version | string | Yes | Registration version. |  |  |  |  |  |
| reads_raw | int64 | Yes | Reads before host decontamination. |  | reads |  |  |  |
| reads_decontaminated | int64 | Yes | Reads after host decontamination. |  | reads |  |  |  |
| bases_raw | int64 | Yes | Bases before host decontamination. |  | bases |  |  |  |
| bases_decontaminated | int64 | Yes | Bases after host decontamination. |  | bases |  |  |  |
| reads_surviving_fraction | double | Yes | reads_decontaminated / reads_raw. |  | fraction (0-1) |  |  |  |
| bases_surviving_fraction | double | Yes | bases_decontaminated / bases_raw. |  | fraction (0-1) |  |  |  |
| metaphlan_index | string | Yes | MetaPhlAn index (2.2.x manifests). |  |  |  |  |  |
| metaphlan_profile | string | Yes | MetaPhlAn pass (release + index) the row comes from. |  |  |  |  |  |
| humann_bundle | string | Yes | HUMAnN bundle; NULL for rows outside a HUMAnN bundle. |  |  |  |  |  |
| pipeline_version | string | Yes | curatedMetagenomicsNextflow version that produced the sample. |  |  |  |  |  |
| git_commit | string | Yes | Pipeline git commit. |  |  |  |  |  |

# resistome

Antimicrobial-resistance genes (KMA against CARD).

- **Grain:** one row per sample, branch and CARD template
- **Primary key:** sample_key, data_type, gene
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0
- **Sort by:** study_name, sample_key, gene

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| sample_id | string | Yes | md5 of the sorted run accessions (NULL for readset-keyed registrations). |  |  |  |  |  |
| readset_id | string | Yes | Readset id (RS.…, ADR-0007) once known. |  |  |  |  |  |
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| run_ids | string | Yes | Semicolon-separated SRA run accessions. |  |  |  |  |  |
| workflow_id | string | Yes | Registration workflow id. |  |  |  |  |  |
| version | string | Yes | Registration version. |  |  |  |  |  |
| data_type | string | Yes | full_data (all reads) or rarefied_data (1M-read subsample). |  |  |  |  |  |
| gene | string | Yes | CARD reference template. |  |  |  |  |  |
| template_coverage | double | Yes | KMA template coverage. |  | percent |  |  |  |
| template_identity | double | Yes | KMA template identity. |  | percent |  |  |  |
| depth | double | Yes | KMA depth. |  |  |  |  |  |
| score | double | Yes | KMA score. |  |  |  |  |  |

# sample_metadata_cmd

Sample metadata curated by curatedMetagenomicData (curation repo, pinned commit), one row per field. `field`/`value` are harmonized where the field map covers the field.

- **Grain:** one row per sample, field and cMD sample record
- **Primary key:** sample_key, field, source_sample
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0
- **Sort by:** study_name, sample_key, field

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| field | string | Yes | Metadata field: the harmonized name (age_years, sex, country, bmi, antibiotics_current_use, health_condition) where mapped, else the source's own. |  |  |  |  |  |
| value | string | Yes | Marker abundance as reported by MetaPhlAn. |  |  |  |  |  |
| source_field | string | Yes | The field name as the source spells it. |  |  |  |  |  |
| value_raw | string | Yes | The value exactly as the source gives it. |  |  |  |  |  |
| value_unit | string | Yes | The source's unit for value_raw, when it gives one. |  |  |  |  |  |
| value_ontology | string | Yes | Ontology term ids the source attaches to the value. |  |  |  |  |  |
| curator | string | Yes | cMD curator of the record. |  |  |  |  |  |
| source | string | Yes | Metadata source: cmd (curatedMetagenomicData curation) or olm (Microbiome Repo). |  |  |  |  |  |
| release | string | Yes | Source release: cMD curation commit, or Olm release id. |  |  |  |  |  |
| source_sample | string | Yes | The source's own sample id (cMD sample_id, Olm sample_key). |  |  |  |  |  |

# sample_metadata_harmonized

One value per sample and harmonized field, with the source and source release it came from (precedence: cMD curation, then Olm R1/R2 not imported from cMD, then Olm R3/R4 with confidence >= 0.5). Mixes Olm-derived values; attribution required: Microbiome Repo, OlmLab, release R2026.25 (data package 1.20.0), doi:10.5281/zenodo.23087712; values derived. Required attribution for the CC-BY-4.0 tables.

- **Grain:** one row per sample and field
- **Primary key:** sample_key, field
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC-BY-4.0
- **Sort by:** study_name, sample_key, field

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| field | string | Yes | Metadata field: the harmonized name (age_years, sex, country, bmi, antibiotics_current_use, health_condition) where mapped, else the source's own. |  |  |  |  |  |
| value | string | Yes | Marker abundance as reported by MetaPhlAn. |  |  |  |  |  |
| source | string | Yes | Metadata source: cmd (curatedMetagenomicData curation) or olm (Microbiome Repo). |  |  |  |  |  |
| release | string | Yes | Source release: cMD curation commit, or Olm release id. |  |  |  |  |  |
| route | string | Yes | How the value was determined: 'curated' (cMD) or Olm's route R1-R4. |  |  |  |  |  |
| confidence | double | Yes | Source-reported confidence (Olm routes R3/R4); NULL for curated values. |  | 0-1 |  |  |  |

# sample_metadata_olm

Sample metadata from the Olm lab Microbiome Repo (pinned release), one row per field, with Olm's route and confidence; no evidence quotes. Attribution required: Microbiome Repo, OlmLab, release R2026.25 (data package 1.20.0), doi:10.5281/zenodo.23087712; values derived. Required attribution for the CC-BY-4.0 tables.

- **Grain:** one row per sample, field and Olm sample
- **Primary key:** sample_key, field, source_sample
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC-BY-4.0
- **Sort by:** study_name, sample_key, field

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| field | string | Yes | Metadata field: the harmonized name (age_years, sex, country, bmi, antibiotics_current_use, health_condition) where mapped, else the source's own. |  |  |  |  |  |
| value | string | Yes | Marker abundance as reported by MetaPhlAn. |  |  |  |  |  |
| source_field | string | Yes | The field name as the source spells it. |  |  |  |  |  |
| value_raw | string | Yes | The value exactly as the source gives it. |  |  |  |  |  |
| value_unit | string | Yes | The source's unit for value_raw, when it gives one. |  |  |  |  |  |
| confidence | double | Yes | Source-reported confidence (Olm routes R3/R4); NULL for curated values. |  | 0-1 |  |  |  |
| route | string | Yes | How the value was determined: 'curated' (cMD) or Olm's route R1-R4. |  |  |  |  |  |
| evidence_source | string | Yes | Olm evidence source (external.cmd = imported from cMD). |  |  |  |  |  |
| determined_by | string | Yes | Olm determination method. |  |  |  |  |  |
| biosample | string | Yes | INSDC BioSample accession(s), semicolon-separated (NULL if not yet known). |  |  |  |  |  |
| source | string | Yes | Metadata source: cmd (curatedMetagenomicData curation) or olm (Microbiome Repo). |  |  |  |  |  |
| release | string | Yes | Source release: cMD curation commit, or Olm release id. |  |  |  |  |  |
| source_sample | string | Yes | The source's own sample id (cMD sample_id, Olm sample_key). |  |  |  |  |  |

# samples

One row per sample in the release: the join hub from readset id to run accessions, BioSample and BioProject, with the pipeline version that produced it.

- **Grain:** one row per sample
- **Primary key:** sample_key
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0
- **Sort by:** study_name, sample_key

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| readset_id | string | Yes | Readset id (RS.…, ADR-0007) once known. |  |  |  |  |  |
| run_accessions | string | Yes | Semicolon-separated INSDC run accessions of the readset. |  |  |  |  |  |
| biosample | string | Yes | INSDC BioSample accession(s), semicolon-separated (NULL if not yet known). |  |  |  |  |  |
| bioproject | string | Yes | INSDC BioProject/study accession(s), semicolon-separated. |  |  |  |  |  |
| pipeline_version | string | Yes | curatedMetagenomicsNextflow version that produced the sample. |  |  |  |  |  |
| git_commit | string | Yes | Pipeline git commit. |  |  |  |  |  |
| completed_at | string | Yes | When the pipeline run for this sample completed (UTC, ISO 8601). |  |  |  |  |  |

# taxonomic_profile_bracken

Kraken2/Bracken species and genus profiles.

- **Grain:** one row per sample, branch and taxon
- **Primary key:** sample_key, data_type, clade_name
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0
- **Sort by:** study_name, sample_key, clade_name

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| sample_id | string | Yes | md5 of the sorted run accessions (NULL for readset-keyed registrations). |  |  |  |  |  |
| readset_id | string | Yes | Readset id (RS.…, ADR-0007) once known. |  |  |  |  |  |
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| run_ids | string | Yes | Semicolon-separated SRA run accessions. |  |  |  |  |  |
| workflow_id | string | Yes | Registration workflow id. |  |  |  |  |  |
| version | string | Yes | Registration version. |  |  |  |  |  |
| data_type | string | Yes | full_data (all reads) or rarefied_data (1M-read subsample). |  |  |  |  |  |
| clade_name | string | Yes | Clade label exactly as the profiler reported it. |  |  |  |  |  |
| rank | string | Yes | Taxonomic rank (kingdom … species, strain). |  |  |  |  |  |
| ncbi_taxid | int32 | Yes | NCBI taxonomy id of the clade. |  |  |  |  |  |
| fraction_total_reads | double | Yes | Bracken fraction of total reads. |  | fraction (0-1) |  |  |  |
| estimated_reads | int64 | Yes | Estimated reads assigned to the clade. |  | reads |  |  |  |

# taxonomic_profile_metaphlan

MetaPhlAn taxonomic profiles: the main pass, plus a HUMAnN bundle's own pass (humann_bundle set).

- **Grain:** one row per sample, branch, MetaPhlAn pass and clade
- **Primary key:** sample_key, data_type, metaphlan_profile, humann_bundle, clade_name
- **Temporal model:** `upsert_latest_snapshot` — One mutable current row per natural key, updated only when tracked values change.
- **Owner:** curatedMetagenomicData
- **License:** CC0-1.0
- **Sort by:** study_name, sample_key, clade_name

| Column | Type | Nullable | Description | Identifier Namespace | Units | Coordinate System | Null Meaning | Enum |
|---|---|---|---|---|---|---|---|---|
| sample_key | string | Yes | The id the registration published the sample under: a readset id (RS.…) for new registrations, the md5 sample_id for cmgd_nextflow 2.2.1. |  |  |  |  |  |
| sample_id | string | Yes | md5 of the sorted run accessions (NULL for readset-keyed registrations). |  |  |  |  |  |
| readset_id | string | Yes | Readset id (RS.…, ADR-0007) once known. |  |  |  |  |  |
| study_name | string | Yes | curatedMetagenomicData study name. |  |  |  |  |  |
| run_ids | string | Yes | Semicolon-separated SRA run accessions. |  |  |  |  |  |
| workflow_id | string | Yes | Registration workflow id. |  |  |  |  |  |
| version | string | Yes | Registration version. |  |  |  |  |  |
| data_type | string | Yes | full_data (all reads) or rarefied_data (1M-read subsample). |  |  |  |  |  |
| metaphlan_profile | string | Yes | MetaPhlAn pass (release + index) the row comes from. |  |  |  |  |  |
| humann_bundle | string | Yes | HUMAnN bundle; NULL for rows outside a HUMAnN bundle. |  |  |  |  |  |
| clade_name | string | Yes | Clade label exactly as the profiler reported it. |  |  |  |  |  |
| rank | string | Yes | Taxonomic rank (kingdom … species, strain). |  |  |  |  |  |
| ncbi_taxid | int32 | Yes | NCBI taxonomy id of the clade. |  |  |  |  |  |
| sgb_id | string | Yes | MetaPhlAn species-level genome bin (t__SGB…), on SGB leaves. |  |  |  |  |  |
| relative_abundance | double | Yes | MetaPhlAn relative abundance. |  | percent |  |  |  |
| coverage | double | Yes | Coverage as reported by the tool. |  |  |  |  |  |
| estimated_reads | int64 | Yes | Estimated reads assigned to the clade. |  | reads |  |  |  |
