# BGC id → source and sample

One row per BGC: 16,109,198 rows, every BGC in this release.

- `bgc_uuid_source.parquet`: Parquet (zstd)
- `bgc_uuid_source.tsv.gz`: the same table as gzipped TSV

## Join key

`bgc_id` is the GenBank member name without `.gbk` and the FASTA header without `>`, so it joins to the
sequence files directly. Example: `ef1e0ff2-a653-52b8-a80a-6026c43c8374` is region
`GB_GCA_000003955.1_CM000741.1.region001`.

`bgc_id` is uuid5 of the region file name (`<genome>_<contig>.region<NNN>`), not of the sequence. An identical
BGC in two genomes has two ids, so each row is one occurrence. To count the samples or sources a family occurs
in, group its member `bgc_id`s by `sample_id` or `source`.

## Columns

| column | notes |
|---|---|
| `bgc_id` | Join key. Never null. |
| `source` | Data source of the sample (the first, for the 18,080 samples with two). Null for 6,416 BGCs whose assembly has no sample. |
| `assembly_source` | Data source of the assembly. Differs from `source` only for the 5,102,636 `metalog` BGCs, whose assemblies come from SPIRE. Null where the assembly has no source of its own. |
| `sample_id` | Atlas sample id. Null where `source` is. |
| `sample_accession` | External sample accession (SAMN…, ERS…, GCA…, MFD…), where there is one. |
| `genome_accession` | Accession of the genome or assembly the region was called on. |
| `contig` | Contig or scaffold. |
| `environment_biome` | Biome label; mostly empty for isolates. |
| `gtdb_lineage` | GTDB lineage of the BGC. Null for 4,682,891 BGCs. |

## Rows per source

| source | rows | | source | rows |
|---|--:|---|---|--:|
| MGnify | 6,611,754 | | Microflora Danica (short-read) | 131,720 |
| metalog | 5,102,636 | | Microflora Danica (long-read) | 94,322 |
| GTDB | 1,918,472 | | custom_great_barrier_reef | 38,505 |
| Ocean Microbiomics Database v2 | 773,016 | | custom_deep_sea_hydrothermal | 35,554 |
| SPIRE MAGs | 412,524 | | custom_ocean_surface | 20,222 |
| custom_microflora_danica | 370,910 | | custom_helgoland_2020 | 19,122 |
| SMAG | 224,873 | | custom_ziemert_lab | 15,413 |
| GEM | 184,780 | | OWC | 9,549 |
| TPMC | 138,089 | | custom_fram_ras | 1,321 |
| | | | *(no sample)* | 6,416 |

Changes between releases: `RELEASE.md` and `../CHANGELOG.md`.
