Improve dataset card
Browse files
README.md
CHANGED
|
@@ -1,16 +1,19 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
size_categories:
|
| 4 |
- 100K<n<1M
|
| 5 |
task_categories:
|
| 6 |
-
-
|
|
|
|
| 7 |
tags:
|
| 8 |
- biology
|
| 9 |
- protein
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
|
|
|
| 14 |
configs:
|
| 15 |
- config_name: files
|
| 16 |
default: true
|
|
@@ -27,188 +30,218 @@ configs:
|
|
| 27 |
path: parts.csv
|
| 28 |
---
|
| 29 |
|
| 30 |
-
# OpenProteinSet
|
| 31 |
|
| 32 |
-
This
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|---|---:|
|
| 38 |
| Original files | 524,458 |
|
| 39 |
-
| Original payload | 652.27 GiB
|
| 40 |
| Tar shards | 31 |
|
| 41 |
-
|
|
| 42 |
-
|
|
| 43 |
-
| Max shard payload | 20.00 GiB |
|
| 44 |
-
| Max large-file part | 20.00 GiB |
|
| 45 |
| Metadata generated | 2026-05-24T22:58:05Z |
|
| 46 |
|
| 47 |
-
##
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
|
| 72 |
-
| shards/shard-00003.tar | 20,140 | 20.00 GiB | 20.03 GiB |
|
| 73 |
-
| shards/shard-00004.tar | 20,709 | 20.00 GiB | 20.03 GiB |
|
| 74 |
-
| shards/shard-00005.tar | 28,209 | 20.00 GiB | 20.05 GiB |
|
| 75 |
-
| shards/shard-00006.tar | 19,067 | 20.00 GiB | 20.03 GiB |
|
| 76 |
-
| shards/shard-00007.tar | 16,872 | 20.00 GiB | 20.03 GiB |
|
| 77 |
-
| shards/shard-00008.tar | 17,166 | 20.00 GiB | 20.03 GiB |
|
| 78 |
-
| shards/shard-00009.tar | 17,521 | 20.00 GiB | 20.03 GiB |
|
| 79 |
-
| shards/shard-00010.tar | 16,548 | 20.00 GiB | 20.03 GiB |
|
| 80 |
-
| shards/shard-00011.tar | 16,286 | 20.00 GiB | 20.03 GiB |
|
| 81 |
-
| shards/shard-00012.tar | 16,155 | 20.00 GiB | 20.03 GiB |
|
| 82 |
-
| shards/shard-00013.tar | 16,390 | 20.00 GiB | 20.03 GiB |
|
| 83 |
-
| shards/shard-00014.tar | 16,995 | 20.00 GiB | 20.02 GiB |
|
| 84 |
-
| shards/shard-00015.tar | 16,318 | 19.99 GiB | 20.02 GiB |
|
| 85 |
-
| shards/shard-00016.tar | 18,167 | 20.00 GiB | 20.03 GiB |
|
| 86 |
-
| shards/shard-00017.tar | 16,870 | 20.00 GiB | 20.03 GiB |
|
| 87 |
-
| shards/shard-00018.tar | 15,837 | 20.00 GiB | 20.02 GiB |
|
| 88 |
-
| shards/shard-00019.tar | 16,787 | 20.00 GiB | 20.03 GiB |
|
| 89 |
-
| shards/shard-00020.tar | 16,173 | 20.00 GiB | 20.03 GiB |
|
| 90 |
-
| shards/shard-00021.tar | 16,894 | 20.00 GiB | 20.03 GiB |
|
| 91 |
-
| shards/shard-00022.tar | 16,107 | 20.00 GiB | 20.02 GiB |
|
| 92 |
-
| shards/shard-00023.tar | 16,371 | 20.00 GiB | 20.03 GiB |
|
| 93 |
-
| shards/shard-00024.tar | 15,837 | 20.00 GiB | 20.02 GiB |
|
| 94 |
-
|
| 95 |
-
Only the first 25 shards are shown here. See `shards.csv` for all 31 shards.
|
| 96 |
-
|
| 97 |
-
## Metadata
|
| 98 |
-
|
| 99 |
-
`metadata.csv` columns:
|
| 100 |
-
|
| 101 |
-
| Column | Description |
|
| 102 |
|---|---|
|
| 103 |
-
| `path` | Original relative path in the
|
| 104 |
-
| `storage_type` | `tar` for files inside
|
| 105 |
-
| `shard_path` | Tar shard
|
| 106 |
| `member_path` | Path of the file inside the tar shard. |
|
| 107 |
-
| `parts_count` | Number of
|
| 108 |
-
| `part_paths` | Semicolon-separated part paths
|
| 109 |
-
| `top_level`
|
| 110 |
-
| `
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
#
|
| 120 |
-
|
| 121 |
-
```bash
|
| 122 |
-
pip install -U huggingface_hub
|
| 123 |
-
hf download LiteFold/OpenProteinSet-archive --repo-type dataset --local-dir ./OpenProteinSet-archive
|
| 124 |
```
|
| 125 |
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
-
```
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
| 133 |
```
|
| 134 |
|
| 135 |
-
|
| 136 |
|
| 137 |
-
```
|
| 138 |
-
|
| 139 |
-
import csv
|
| 140 |
-
from pathlib import Path
|
| 141 |
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
target.parent.mkdir(parents=True, exist_ok=True)
|
| 150 |
-
with target.open("wb") as dst:
|
| 151 |
-
for part in row["part_paths"].split(";"):
|
| 152 |
-
with (root / part).open("rb") as src:
|
| 153 |
-
while True:
|
| 154 |
-
chunk = src.read(8 * 1024 * 1024)
|
| 155 |
-
if not chunk:
|
| 156 |
-
break
|
| 157 |
-
dst.write(chunk)
|
| 158 |
-
PY
|
| 159 |
```
|
| 160 |
|
| 161 |
-
##
|
| 162 |
|
| 163 |
-
|
| 164 |
|
| 165 |
```python
|
|
|
|
|
|
|
|
|
|
| 166 |
from datasets import load_dataset
|
| 167 |
from huggingface_hub import hf_hub_download
|
| 168 |
-
import tarfile
|
| 169 |
|
| 170 |
-
|
| 171 |
-
|
| 172 |
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
repo_id="LiteFold/OpenProteinSet-archive",
|
| 190 |
-
repo_type="dataset",
|
| 191 |
-
filename=part_path,
|
| 192 |
-
)
|
| 193 |
-
with Path(part).open("rb") as src:
|
| 194 |
-
while True:
|
| 195 |
-
chunk = src.read(8 * 1024 * 1024)
|
| 196 |
-
if not chunk:
|
| 197 |
-
break
|
| 198 |
-
dst.write(chunk)
|
| 199 |
```
|
| 200 |
|
| 201 |
-
|
|
|
|
|
|
|
| 202 |
|
| 203 |
```python
|
|
|
|
|
|
|
| 204 |
from datasets import load_dataset
|
|
|
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
```
|
| 211 |
|
| 212 |
## Notes
|
| 213 |
|
| 214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: other
|
| 3 |
+
pretty_name: OpenProteinSet Archive
|
| 4 |
size_categories:
|
| 5 |
- 100K<n<1M
|
| 6 |
task_categories:
|
| 7 |
+
- protein-folding
|
| 8 |
+
- feature-extraction
|
| 9 |
tags:
|
| 10 |
- biology
|
| 11 |
- protein
|
| 12 |
+
- msa
|
| 13 |
+
- openfold
|
| 14 |
+
- openproteinset
|
| 15 |
+
- pdb
|
| 16 |
+
- archive
|
| 17 |
configs:
|
| 18 |
- config_name: files
|
| 19 |
default: true
|
|
|
|
| 30 |
path: parts.csv
|
| 31 |
---
|
| 32 |
|
| 33 |
+
# OpenProteinSet Archive
|
| 34 |
|
| 35 |
+
This is an upload-friendly mirror of OpenProteinSet/OpenFold training data components. The source tree is kept intact inside archive shards rather than expanded as hundreds of thousands of repository files.
|
| 36 |
|
| 37 |
+
The main use case is simple: search `metadata.csv`, download the shard or part files you need with the Hugging Face Python API, then extract or reassemble the original file.
|
| 38 |
|
| 39 |
+
## What Is Included
|
| 40 |
+
|
| 41 |
+
| Component | Files | Size |
|
| 42 |
+
|---|---:|---:|
|
| 43 |
+
| `alignment_data/` | 524,454 | 600.05 GiB |
|
| 44 |
+
| `pdb_data/` | 3 | 52.22 GiB |
|
| 45 |
+
| `duplicate_pdb_chains.txt` | 1 | 4.31 MiB |
|
| 46 |
+
|
| 47 |
+
File types:
|
| 48 |
+
|
| 49 |
+
| Type | Files | Size |
|
| 50 |
+
|---|---:|---:|
|
| 51 |
+
| `.a3m` | 393,000 | 535.65 GiB |
|
| 52 |
+
| `.hhr` | 131,454 | 64.40 GiB |
|
| 53 |
+
| `.zip` | 1 | 51.77 GiB |
|
| 54 |
+
| `.json` | 2 | 456.83 MiB |
|
| 55 |
+
| `.txt` | 1 | 4.31 MiB |
|
| 56 |
+
|
| 57 |
+
Packaging summary:
|
| 58 |
+
|
| 59 |
+
| Item | Count / Size |
|
| 60 |
|---|---:|
|
| 61 |
| Original files | 524,458 |
|
| 62 |
+
| Original payload | 652.27 GiB |
|
| 63 |
| Tar shards | 31 |
|
| 64 |
+
| Split large-file parts | 3 |
|
| 65 |
+
| Archived tar payload | 601.38 GiB |
|
|
|
|
|
|
|
| 66 |
| Metadata generated | 2026-05-24T22:58:05Z |
|
| 67 |
|
| 68 |
+
## Repository Layout
|
| 69 |
+
|
| 70 |
+
```text
|
| 71 |
+
README.md
|
| 72 |
+
_MANIFEST.json
|
| 73 |
+
metadata.csv
|
| 74 |
+
shards.csv
|
| 75 |
+
parts.csv
|
| 76 |
+
shards/
|
| 77 |
+
shard-00000.tar
|
| 78 |
+
shard-00001.tar
|
| 79 |
+
...
|
| 80 |
+
large_files/
|
| 81 |
+
pdb_data/pdb_mmcif.zip.part-00000
|
| 82 |
+
pdb_data/pdb_mmcif.zip.part-00001
|
| 83 |
+
pdb_data/pdb_mmcif.zip.part-00002
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
Most files live inside `shards/*.tar`. The large `pdb_data/pdb_mmcif.zip` file is stored as byte parts under `large_files/` so no single uploaded object is excessively large.
|
| 87 |
+
|
| 88 |
+
## Metadata Tables
|
| 89 |
+
|
| 90 |
+
`metadata.csv` is the default table shown in the Dataset Viewer. It has one row per original file.
|
| 91 |
+
|
| 92 |
+
| Column | Meaning |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|---|---|
|
| 94 |
+
| `path` | Original relative path in the OpenProteinSet tree. |
|
| 95 |
+
| `storage_type` | `tar` for files inside `shards/*.tar`, `parts` for files split into byte parts. |
|
| 96 |
+
| `shard_path` | Tar shard to download when `storage_type == "tar"`. |
|
| 97 |
| `member_path` | Path of the file inside the tar shard. |
|
| 98 |
+
| `parts_count` | Number of parts when `storage_type == "parts"`. |
|
| 99 |
+
| `part_paths` | Semicolon-separated part paths for split files. |
|
| 100 |
+
| `top_level`, `directory`, `filename`, `extension` | Path fields for filtering. |
|
| 101 |
+
| `size_bytes`, `size_human`, `modified_utc` | File size and timestamp captured during packaging. |
|
| 102 |
+
|
| 103 |
+
`shards.csv` has one row per tar shard. `parts.csv` has one row per split file part. `_MANIFEST.json` contains the packaging summary used to build this card.
|
| 104 |
+
|
| 105 |
+
## Install
|
| 106 |
+
|
| 107 |
+
Use recent versions of the Hugging Face clients:
|
| 108 |
+
|
| 109 |
+
```python
|
| 110 |
+
# pip install -U huggingface_hub datasets
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
```
|
| 112 |
|
| 113 |
+
All examples below use Python APIs only.
|
| 114 |
+
|
| 115 |
+
## Inspect The File List
|
| 116 |
+
|
| 117 |
+
Load the metadata table with `datasets`:
|
| 118 |
|
| 119 |
+
```python
|
| 120 |
+
from datasets import load_dataset
|
| 121 |
+
|
| 122 |
+
repo_id = "LiteFold/OpenProteinSet-archive"
|
| 123 |
+
files = load_dataset(repo_id, "files", split="train")
|
| 124 |
+
|
| 125 |
+
print(files)
|
| 126 |
+
print(files[0])
|
| 127 |
```
|
| 128 |
|
| 129 |
+
For quick inspection without materializing the whole table:
|
| 130 |
|
| 131 |
+
```python
|
| 132 |
+
from datasets import load_dataset
|
|
|
|
|
|
|
| 133 |
|
| 134 |
+
repo_id = "LiteFold/OpenProteinSet-archive"
|
| 135 |
+
files = load_dataset(repo_id, "files", split="train", streaming=True)
|
| 136 |
+
|
| 137 |
+
for row in files:
|
| 138 |
+
if row["extension"] == ".a3m":
|
| 139 |
+
print(row["path"], row["shard_path"], row["size_human"])
|
| 140 |
+
break
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
```
|
| 142 |
|
| 143 |
+
## Download One File From A Tar Shard
|
| 144 |
|
| 145 |
+
This downloads the shard that contains the file, then extracts only that member.
|
| 146 |
|
| 147 |
```python
|
| 148 |
+
from pathlib import Path
|
| 149 |
+
import tarfile
|
| 150 |
+
|
| 151 |
from datasets import load_dataset
|
| 152 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 153 |
|
| 154 |
+
repo_id = "LiteFold/OpenProteinSet-archive"
|
| 155 |
+
out_dir = Path("./openproteinset")
|
| 156 |
|
| 157 |
+
files = load_dataset(repo_id, "files", split="train", streaming=True)
|
| 158 |
+
row = next(item for item in files if item["extension"] == ".a3m")
|
| 159 |
+
|
| 160 |
+
if row["storage_type"] != "tar":
|
| 161 |
+
raise ValueError(f"{row['path']} is not stored in a tar shard")
|
| 162 |
+
|
| 163 |
+
shard = hf_hub_download(
|
| 164 |
+
repo_id=repo_id,
|
| 165 |
+
repo_type="dataset",
|
| 166 |
+
filename=row["shard_path"],
|
| 167 |
+
)
|
| 168 |
+
|
| 169 |
+
with tarfile.open(shard) as archive:
|
| 170 |
+
archive.extract(row["member_path"], path=out_dir)
|
| 171 |
+
|
| 172 |
+
print(out_dir / row["path"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
```
|
| 174 |
|
| 175 |
+
## Reassemble `pdb_mmcif.zip`
|
| 176 |
+
|
| 177 |
+
`pdb_data/pdb_mmcif.zip` is split into three parts. Reassemble it with the paths listed in `metadata.csv`:
|
| 178 |
|
| 179 |
```python
|
| 180 |
+
from pathlib import Path
|
| 181 |
+
|
| 182 |
from datasets import load_dataset
|
| 183 |
+
from huggingface_hub import hf_hub_download
|
| 184 |
|
| 185 |
+
repo_id = "LiteFold/OpenProteinSet-archive"
|
| 186 |
+
out_path = Path("./openproteinset/pdb_data/pdb_mmcif.zip")
|
| 187 |
+
out_path.parent.mkdir(parents=True, exist_ok=True)
|
| 188 |
+
|
| 189 |
+
files = load_dataset(repo_id, "files", split="train")
|
| 190 |
+
row = files.filter(lambda item: item["path"] == "pdb_data/pdb_mmcif.zip")[0]
|
| 191 |
+
|
| 192 |
+
with out_path.open("wb") as dst:
|
| 193 |
+
for part_path in row["part_paths"].split(";"):
|
| 194 |
+
part = hf_hub_download(
|
| 195 |
+
repo_id=repo_id,
|
| 196 |
+
repo_type="dataset",
|
| 197 |
+
filename=part_path,
|
| 198 |
+
)
|
| 199 |
+
with Path(part).open("rb") as src:
|
| 200 |
+
while chunk := src.read(8 * 1024 * 1024):
|
| 201 |
+
dst.write(chunk)
|
| 202 |
+
|
| 203 |
+
print(out_path)
|
| 204 |
+
```
|
| 205 |
+
|
| 206 |
+
## Download And Restore Everything
|
| 207 |
+
|
| 208 |
+
This pulls the full repository snapshot, extracts all tar shards, and reassembles any split large files.
|
| 209 |
+
|
| 210 |
+
```python
|
| 211 |
+
from pathlib import Path
|
| 212 |
+
import csv
|
| 213 |
+
import tarfile
|
| 214 |
+
|
| 215 |
+
from huggingface_hub import snapshot_download
|
| 216 |
+
|
| 217 |
+
repo_id = "LiteFold/OpenProteinSet-archive"
|
| 218 |
+
snapshot = Path(snapshot_download(repo_id=repo_id, repo_type="dataset"))
|
| 219 |
+
out_dir = Path("./openproteinset")
|
| 220 |
+
out_dir.mkdir(parents=True, exist_ok=True)
|
| 221 |
+
|
| 222 |
+
for shard in sorted((snapshot / "shards").glob("*.tar")):
|
| 223 |
+
with tarfile.open(shard) as archive:
|
| 224 |
+
archive.extractall(out_dir)
|
| 225 |
+
|
| 226 |
+
with (snapshot / "metadata.csv").open(newline="") as handle:
|
| 227 |
+
for row in csv.DictReader(handle):
|
| 228 |
+
if row["storage_type"] != "parts":
|
| 229 |
+
continue
|
| 230 |
+
|
| 231 |
+
target = out_dir / row["path"]
|
| 232 |
+
target.parent.mkdir(parents=True, exist_ok=True)
|
| 233 |
+
with target.open("wb") as dst:
|
| 234 |
+
for part_path in row["part_paths"].split(";"):
|
| 235 |
+
with (snapshot / part_path).open("rb") as src:
|
| 236 |
+
while chunk := src.read(8 * 1024 * 1024):
|
| 237 |
+
dst.write(chunk)
|
| 238 |
+
|
| 239 |
+
print(out_dir)
|
| 240 |
```
|
| 241 |
|
| 242 |
## Notes
|
| 243 |
|
| 244 |
+
- This is a raw mirror, not a cleaned or reformatted training set.
|
| 245 |
+
- The alignment tree is preserved under its original relative paths inside the tar shards.
|
| 246 |
+
- Tar shards are uncompressed. The goal is predictable extraction and straightforward random access to individual members.
|
| 247 |
+
- Check the upstream OpenProteinSet/OpenFold data terms and cite the original resources as appropriate for your use case.
|