jojo23333 commited on
Commit
afc0b49
·
verified ·
1 Parent(s): 4fbe8db

Initialize verified RAW 70%-cluster release metadata

Browse files
Files changed (5) hide show
  1. BUILD_RECIPE.md +117 -0
  2. LICENSE_AND_ATTRIBUTION.md +48 -0
  3. README.md +91 -0
  4. SOURCE_PROVENANCE.json +32 -0
  5. manifest.json +71 -0
BUILD_RECIPE.md ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reproducing the 70%-identity representative FASTAs
2
+
3
+ The canonical implementation is
4
+ [`dev/data/process_full_corpus.py`](https://github.com/Lumin-Science/LuminBench-Nano-ESMC/blob/main/dev/data/process_full_corpus.py).
5
+ All Python environments are managed by `uv`; MMseqs2 is invoked as a pinned
6
+ external binary and its version is recorded in each clustering receipt.
7
+
8
+ ## 1. Pin and download the three source arms
9
+
10
+ | Source | Frozen input |
11
+ |---|---|
12
+ | UniRef90 | [UniRef release 2023_02 archive](https://ftp.uniprot.org/pub/databases/uniprot/previous_releases/release-2023_02/uniref/uniref2023_02.tar.gz), 211,819,312,677 bytes, MD5 `353681f464572bb199fa032f714d4669` |
13
+ | MGnify | [Protein DB 2023_02 `mgy_clusters.fa.gz`](https://ftp.ebi.ac.uk/pub/databases/metagenomics/peptide_database/2023_02/mgy_clusters.fa.gz), 83,473,342,442 bytes, MD5 `332d36d2a943bdb769237a03e050ed03` |
14
+ | OMG/IMG | All 959 Parquet objects in [`tattabio/OMG`](https://huggingface.co/datasets/tattabio/OMG), 1,253,813,127,320 bytes total, pinned by path, size, and LFS SHA-256 in [`dev/data/omg_upstream_shards.tsv`](https://github.com/Lumin-Science/LuminBench-Nano-ESMC/blob/main/dev/data/omg_upstream_shards.tsv) |
15
+
16
+ ## 2. Normalize and quality-filter
17
+
18
+ For every record, in order:
19
+
20
+ 1. remove whitespace and a terminal `*`;
21
+ 2. uppercase the sequence;
22
+ 3. map unsupported amino-acid characters to `X`;
23
+ 4. reject sequences shorter than 60 residues;
24
+ 5. reject sequences with more than 20% non-canonical residues; and
25
+ 6. in the OMG payload, keep numeric JGI/IMG accessions and remove `ERZ` MGnify-
26
+ origin rows so MGnify is not represented twice.
27
+
28
+ The measured funnel was:
29
+
30
+ | Source | Original records | Short | >20% ambiguous | Wrong source | Quality eligible |
31
+ |---|---:|---:|---:|---:|---:|
32
+ | UniRef90 | 170,669,877 | 4,755,787 | 29,797 | 0 | 165,884,293 |
33
+ | MGnify | 729,215,663 | 117,372,608 | 26,021 | 0 | 611,817,034 |
34
+ | OMG/IMG | 3,280,269,924 | 145,672,826 | 0 | 1,048,850,563 | 2,085,746,535 |
35
+
36
+ ## 3. Global exact deduplication
37
+
38
+ Accepted records are partitioned into 256 leading-byte SHA-256 buckets. Exact
39
+ normalized sequences are collapsed globally while preserving every
40
+ `(sha256, source, source_id)` membership in Parquet. A source-specific FASTA
41
+ view is then emitted for every source in which the sequence occurred.
42
+
43
+ The source views contain 165,884,293 UniRef90, 611,788,129 MGnify, and
44
+ 963,673,186 OMG/IMG unique sequences. Their global union contains
45
+ 1,661,993,387 exact unique sequences; source-view counts are larger because one
46
+ digest can belong to multiple source arms.
47
+
48
+ ## 4. Source-specific diversity clustering
49
+
50
+ Each source view is clustered independently with MMseqs2 Linclust:
51
+
52
+ ```text
53
+ mmseqs linclust sequences clusters tmp \
54
+ --min-seq-id 0.70 \
55
+ -c 0.80 \
56
+ --cov-mode 1 \
57
+ --cluster-mode 2 \
58
+ --threads 64
59
+ ```
60
+
61
+ `--cov-mode 1` applies the 80% coverage requirement to the shorter sequence.
62
+ `createtsv` emits the representative/member digest pairs and `result2repseq`
63
+ plus `result2flat --use-fasta-header` emits the representative FASTA.
64
+
65
+ ## 5. Reproduction commands
66
+
67
+ ```bash
68
+ uv sync --frozen
69
+ PIPE=dev/data/process_full_corpus.py
70
+ ROOT=/absolute/path/to/protein-corpus
71
+ MMSEQS=/absolute/path/to/mmseqs
72
+
73
+ uv run --frozen python "$PIPE" download \
74
+ --data-root "$ROOT" \
75
+ --omg-manifest dev/data/omg_upstream_shards.tsv \
76
+ --download-workers 8
77
+
78
+ uv run --frozen python "$PIPE" normalize --source uniref90 \
79
+ --input "$ROOT/raw/uniref90_2023_02/uniref2023_02.tar.gz" \
80
+ --output "$ROOT/normalized/uniref90"
81
+
82
+ uv run --frozen python "$PIPE" normalize --source mgnify \
83
+ --input "$ROOT/raw/mgnify_2023_02/mgy_clusters.fa.gz" \
84
+ --output "$ROOT/normalized/mgnify"
85
+
86
+ # Expand all 959 OMG inputs from dev/data/omg_upstream_shards.tsv, then:
87
+ uv run --frozen python "$PIPE" normalize --source omg_img \
88
+ "${omg_inputs[@]}" --output "$ROOT/normalized/omg_img"
89
+
90
+ uv run --frozen python "$PIPE" deduplicate \
91
+ --input "$ROOT/normalized/uniref90" \
92
+ --input "$ROOT/normalized/mgnify" \
93
+ --input "$ROOT/normalized/omg_img" \
94
+ --output "$ROOT/deduplicated"
95
+
96
+ for source in uniref90 mgnify omg_img; do
97
+ uv run --frozen python "$PIPE" cluster \
98
+ --dedup-root "$ROOT/deduplicated" \
99
+ --source "$source" \
100
+ --output "$ROOT/clusters/$source" \
101
+ --mmseqs "$MMSEQS" \
102
+ --threads 64
103
+ done
104
+ ```
105
+
106
+ Every output directory is create-once. The builder refuses to overwrite an
107
+ existing normalization, deduplication, or clustering directory.
108
+
109
+ ## 6. Boundary of this RAW release
110
+
111
+ This release stops immediately after source-specific 70%-identity clustering.
112
+ It does not perform evaluation homology exclusion, exact evaluation exclusion,
113
+ cross-source representative ownership, length 32–16,384 filtering, validation
114
+ selection, or Parquet packing. Those steps produce the final
115
+ [`LuminBench-Nano-ESMC`](https://huggingface.co/datasets/LuminScience/LuminBench-Nano-ESMC)
116
+ release.
117
+
LICENSE_AND_ATTRIBUTION.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # License and attribution
2
+
3
+ Reviewed: 2026-08-26
4
+
5
+ This repository contains a mixed-terms compilation. Lumin Science licenses only
6
+ its original selection, arrangement, SHA-addressed clustering metadata,
7
+ verification receipts, and documentation under
8
+ [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). It does not
9
+ relicense third-party protein sequences or identifiers.
10
+
11
+ ## UniRef90
12
+
13
+ `representatives/uniref90.fasta` derives from UniRef release 2023_02. UniProt
14
+ applies [CC BY 4.0](https://www.uniprot.org/help/license) to copyrightable
15
+ database content. Attribute the UniProt Consortium / UniRef, retain its notice,
16
+ link to the source where practical, and state the processing changes.
17
+
18
+ ## MGnify
19
+
20
+ `representatives/mgnify.fasta` derives from the official MGnify Protein Database
21
+ 2023_02 archive. It remains governed by the
22
+ [EMBL-EBI Terms of Use](https://www.ebi.ac.uk/about/terms-of-use/) and applicable
23
+ original-owner rights. Attribute EMBL-EBI MGnify and the original contributors.
24
+ Lumin Science does not apply a new Creative Commons license to these records.
25
+
26
+ ## OMG/IMG
27
+
28
+ `representatives/omg_img.fasta` contains numeric-accession JGI/IMG protein CDS
29
+ rows from [`tattabio/OMG`](https://huggingface.co/datasets/tattabio/OMG), after
30
+ removing its `ERZ` MGnify-origin rows. The direct distribution declares CC
31
+ BY-SA 4.0. Attribute the OMG authors/TattaBio, JGI/IMG, and original
32
+ contributors; retain the license and modification notices.
33
+
34
+ ## Derived cluster maps
35
+
36
+ `clusters/**`, receipts, manifests, and build documentation are Lumin Science
37
+ derived database metadata offered under CC BY-SA 4.0. The cluster maps contain
38
+ SHA-256 digests rather than member sequences or original accessions. Applying
39
+ the maps to upstream data does not replace the upstream terms for the recovered
40
+ records.
41
+
42
+ ## Processing changes
43
+
44
+ Records were normalized, quality filtered, globally exact-deduplicated with
45
+ source membership retained, and clustered independently per source at 70%
46
+ sequence identity and 80% shorter-sequence coverage. The data in this RAW
47
+ repository have not yet been evaluation-decontaminated.
48
+
README.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: LuminBench Nano ESMC Raw 70% Cluster Outputs v1
3
+ license: other
4
+ size_categories:
5
+ - 100M<n<1B
6
+ tags:
7
+ - biology
8
+ - protein
9
+ - protein-language-model
10
+ - fasta
11
+ - clustering
12
+ - mmseqs2
13
+ ---
14
+
15
+ # LuminBench Nano ESMC Raw 70% Cluster Outputs v1
16
+
17
+ This repository preserves the source-specific 70%-identity clustering outputs
18
+ that precede evaluation decontamination and final Parquet packing in
19
+ [`LuminScience/LuminBench-Nano-ESMC`](https://huggingface.co/datasets/LuminScience/LuminBench-Nano-ESMC).
20
+
21
+ It contains **241,600,826,413 bytes of representative FASTA data** covering
22
+ **765,290,002 source-specific cluster representatives**. It also preserves the
23
+ three cluster-membership maps so the clustering result is not reduced to the
24
+ representatives alone.
25
+
26
+ > **Not decontaminated training data.** These FASTAs precede the P@L/P-CORE
27
+ > evaluation exclusion, cross-source ownership assignment, length gate, and
28
+ > train/validation split. Use the final repository above for clean training.
29
+
30
+ ## Files
31
+
32
+ | Source arm | Representative FASTA | Representatives | Cluster map | Source-specific member rows |
33
+ |---|---:|---:|---:|---:|
34
+ | UniRef90 2023_02 | 38,626,189,542 bytes | 92,230,941 | 23,887,338,192 bytes | 165,884,293 |
35
+ | MGnify Protein DB 2023_02 | 93,319,863,106 bytes | 348,135,082 | 88,097,490,576 bytes | 611,788,129 |
36
+ | OMG/IMG | 109,654,773,765 bytes | 324,923,979 | 138,768,938,784 bytes | 963,673,186 |
37
+ | **Total** | **241,600,826,413 bytes** | **765,290,002** | **250,753,767,552 bytes** | **1,741,345,608 source memberships** |
38
+
39
+ Paths are:
40
+
41
+ ```text
42
+ representatives/{uniref90,mgnify,omg_img}.fasta
43
+ clusters/{uniref90,mgnify,omg_img}.clusters.tsv
44
+ receipts/{uniref90,mgnify,omg_img}.verification.json
45
+ ```
46
+
47
+ FASTA identifiers are `sha256_<digest>`, where the digest is computed from the
48
+ normalized ASCII amino-acid sequence. Each cluster-map row is:
49
+
50
+ ```text
51
+ representative_sha256<TAB>member_sha256
52
+ ```
53
+
54
+ The maps are source-specific. The same exact sequence can therefore occur as a
55
+ member in more than one source arm.
56
+
57
+ ## Does this preserve every clustered protein?
58
+
59
+ It preserves the **cluster assignment relation**, but it is not a self-contained
60
+ copy of every cluster-member sequence:
61
+
62
+ - the representative FASTAs contain the 765.29M representative sequences;
63
+ - the `clusters.tsv` files map each representative digest to every member digest;
64
+ - non-representative member sequences and original upstream accessions are not
65
+ stored in those TSVs.
66
+
67
+ To recover all member sequences or original identifiers, redownload the pinned
68
+ upstream snapshots, rerun normalization and exact deduplication, and join the
69
+ resulting membership Parquet rows to `member_sha256`. This repository therefore
70
+ preserves enough information to reproduce cluster membership **when combined
71
+ with the pinned upstream inputs and build recipe**, but the representative
72
+ FASTAs alone would not be sufficient.
73
+
74
+ See [`BUILD_RECIPE.md`](BUILD_RECIPE.md), [`manifest.json`](manifest.json), and
75
+ [`SOURCE_PROVENANCE.json`](SOURCE_PROVENANCE.json) for the exact pipeline,
76
+ commands, checksums, and limitations.
77
+
78
+ ## License and source terms
79
+
80
+ This is a mixed-terms dataset, so the Hub metadata uses `license: other` rather
81
+ than pretending that one license replaces all upstream terms.
82
+
83
+ | Path | Direct source | Governing terms |
84
+ |---|---|---|
85
+ | `representatives/uniref90.fasta` | UniRef90 2023_02 | [UniProt CC BY 4.0](https://www.uniprot.org/help/license) |
86
+ | `representatives/mgnify.fasta` | MGnify Protein DB 2023_02 | [EMBL-EBI Terms of Use](https://www.ebi.ac.uk/about/terms-of-use/) plus applicable original-owner rights; not relicensed by Lumin Science |
87
+ | `representatives/omg_img.fasta` | JGI/IMG records distributed by [`tattabio/OMG`](https://huggingface.co/datasets/tattabio/OMG) | CC BY-SA 4.0 as declared by the direct distribution |
88
+ | `clusters/**`, manifests, receipts, and build documentation | Lumin Science selection, arrangement, and derived clustering metadata | CC BY-SA 4.0 |
89
+
90
+ See [`LICENSE_AND_ATTRIBUTION.md`](LICENSE_AND_ATTRIBUTION.md) before reuse.
91
+
SOURCE_PROVENANCE.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "distribution_license": {
3
+ "license": "mixed; see LICENSE_AND_ATTRIBUTION.md",
4
+ "lumin_science_metadata_license": "CC BY-SA 4.0",
5
+ "third_party_records_relicensed": false
6
+ },
7
+ "release": "raw-source-specific-70pct-clusters-v1",
8
+ "reviewed_at": "2026-08-26",
9
+ "schema_version": 1,
10
+ "source_arms": {
11
+ "mgnify": {
12
+ "governing_terms": "EMBL-EBI Terms of Use plus applicable original-owner rights",
13
+ "raw_bytes": 83473342442,
14
+ "raw_md5": "332d36d2a943bdb769237a03e050ed03",
15
+ "raw_url": "https://ftp.ebi.ac.uk/pub/databases/metagenomics/peptide_database/2023_02/mgy_clusters.fa.gz"
16
+ },
17
+ "omg_img": {
18
+ "governing_terms": "CC BY-SA 4.0 as declared by tattabio/OMG",
19
+ "raw_bytes": 1253813127320,
20
+ "raw_manifest_sha256": "bb24ae4e819c92faa20767bf9f4070dfd3e27f673e77d064b7a45cc897ebd7d0",
21
+ "raw_repository": "https://huggingface.co/datasets/tattabio/OMG",
22
+ "raw_shards": 959
23
+ },
24
+ "uniref90": {
25
+ "governing_terms": "CC BY 4.0",
26
+ "raw_bytes": 211819312677,
27
+ "raw_md5": "353681f464572bb199fa032f714d4669",
28
+ "raw_url": "https://ftp.uniprot.org/pub/databases/uniprot/previous_releases/release-2023_02/uniref/uniref2023_02.tar.gz"
29
+ }
30
+ }
31
+ }
32
+
manifest.json ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "clustering": {
3
+ "cluster_mode": 2,
4
+ "coverage_mode": 1,
5
+ "minimum_coverage": 0.8,
6
+ "minimum_sequence_identity": 0.7,
7
+ "method": "MMseqs2 Linclust",
8
+ "scope": "independent per source arm"
9
+ },
10
+ "files": {
11
+ "mgnify": {
12
+ "cluster_map": {
13
+ "bytes": 88097490576,
14
+ "path": "clusters/mgnify.clusters.tsv",
15
+ "rows": 611788129,
16
+ "sha256": "7c1ffedd2d772b6955da746f53ede3885e23242faad27fcae75a7323877d5342"
17
+ },
18
+ "representatives": {
19
+ "bytes": 93319863106,
20
+ "path": "representatives/mgnify.fasta",
21
+ "records": 348135082,
22
+ "sha256": "c40a97fcc8fee4777e8da8568e8f049f4e3f80dcecdc51f15da51005b28ad96a"
23
+ }
24
+ },
25
+ "omg_img": {
26
+ "cluster_map": {
27
+ "bytes": 138768938784,
28
+ "path": "clusters/omg_img.clusters.tsv",
29
+ "rows": 963673186,
30
+ "sha256": "530e00984d0f3eff9ca53a8588221b08a2bc0eb9ab5ce9b5302366289bbd4bbf"
31
+ },
32
+ "representatives": {
33
+ "bytes": 109654773765,
34
+ "path": "representatives/omg_img.fasta",
35
+ "records": 324923979,
36
+ "sha256": "163b764c9aca5241da1c499e58dcf25fa2b6670046bf1f2dbd28789aaa3e439e"
37
+ }
38
+ },
39
+ "uniref90": {
40
+ "cluster_map": {
41
+ "bytes": 23887338192,
42
+ "path": "clusters/uniref90.clusters.tsv",
43
+ "rows": 165884293,
44
+ "sha256": "50bede91d10a00b3c2c11ad22e16b87bf69cdecb96470e8a485382c869f16dd5"
45
+ },
46
+ "representatives": {
47
+ "bytes": 38626189542,
48
+ "path": "representatives/uniref90.fasta",
49
+ "records": 92230941,
50
+ "sha256": "521e57d099102945e11db852cc4f4870e288c2994c6a0a5dea9bff8e5bfdcec8"
51
+ }
52
+ }
53
+ },
54
+ "limitations": {
55
+ "cluster_maps_contain_member_sequences": false,
56
+ "cluster_maps_contain_original_accessions": false,
57
+ "evaluation_decontaminated": false,
58
+ "full_members_can_be_reconstructed_from_pinned_upstream_and_recipe": true
59
+ },
60
+ "protocol": "raw-source-specific-70pct-cluster-release-v1",
61
+ "schema_version": 1,
62
+ "status": "verified",
63
+ "totals": {
64
+ "cluster_map_bytes": 250753767552,
65
+ "representative_bytes": 241600826413,
66
+ "representative_records": 765290002,
67
+ "source_specific_member_rows": 1741345608,
68
+ "total_published_bytes": 492354593965
69
+ }
70
+ }
71
+