Update dataset card
Browse files
README.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
pretty_name:
|
| 3 |
size_categories:
|
| 4 |
- 100K<n<1M
|
| 5 |
task_categories:
|
|
|
|
| 6 |
- other
|
| 7 |
tags:
|
| 8 |
- biology
|
| 9 |
- protein
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
|
|
|
| 14 |
configs:
|
| 15 |
- config_name: files
|
| 16 |
default: true
|
|
@@ -27,164 +29,176 @@ configs:
|
|
| 27 |
path: parts.csv
|
| 28 |
---
|
| 29 |
|
| 30 |
-
#
|
| 31 |
|
| 32 |
-
This
|
| 33 |
|
| 34 |
-
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
|
| 39 |
-
|
|
| 40 |
-
|
|
| 41 |
-
|
|
| 42 |
-
|
|
| 43 |
-
| Max shard payload | 20.00 GiB |
|
| 44 |
-
| Max large-file part | 20.00 GiB |
|
| 45 |
-
| Metadata generated | 2026-05-25T06:39:53Z |
|
| 46 |
|
| 47 |
-
|
| 48 |
|
| 49 |
-
|
|
| 50 |
-
|
|
| 51 |
-
| . |
|
| 52 |
-
|
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
-
|
|
| 58 |
-
|
|
| 59 |
-
|
|
| 60 |
-
|
|
| 61 |
-
|
|
| 62 |
-
|
|
| 63 |
-
|
|
| 64 |
-
|
|
| 65 |
-
| .md | 1 | 543 B |
|
| 66 |
|
| 67 |
-
##
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
## Metadata
|
| 74 |
|
| 75 |
-
`metadata.csv`
|
| 76 |
|
| 77 |
-
| Column |
|
| 78 |
|---|---|
|
| 79 |
-
| `path` | Original relative path
|
| 80 |
-
| `storage_type` | `tar` for files inside tar
|
| 81 |
-
| `shard_path` | Tar shard containing the file
|
| 82 |
| `member_path` | Path of the file inside the tar shard. |
|
| 83 |
-
| `parts_count` | Number of
|
| 84 |
-
| `part_paths` | Semicolon-separated part paths
|
| 85 |
-
| `top_level`
|
| 86 |
-
| `
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
#
|
| 96 |
-
|
| 97 |
-
```bash
|
| 98 |
-
pip install -U huggingface_hub
|
| 99 |
-
hf download LiteFold/evo-dplm-data --repo-type dataset --local-dir ./evo-dplm-data
|
| 100 |
```
|
| 101 |
|
| 102 |
-
|
| 103 |
|
| 104 |
-
```
|
| 105 |
-
|
| 106 |
-
for shard in ./evo-dplm-data/shards/*.tar; do
|
| 107 |
-
tar -xf "$shard" -C ./data
|
| 108 |
-
done
|
| 109 |
```
|
| 110 |
|
| 111 |
-
|
| 112 |
|
| 113 |
-
```
|
| 114 |
-
|
| 115 |
-
import csv
|
| 116 |
-
from pathlib import Path
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
for row in csv.DictReader(handle):
|
| 122 |
-
if row["storage_type"] != "parts":
|
| 123 |
-
continue
|
| 124 |
-
target = out / row["path"]
|
| 125 |
-
target.parent.mkdir(parents=True, exist_ok=True)
|
| 126 |
-
with target.open("wb") as dst:
|
| 127 |
-
for part in row["part_paths"].split(";"):
|
| 128 |
-
with (root / part).open("rb") as src:
|
| 129 |
-
while True:
|
| 130 |
-
chunk = src.read(8 * 1024 * 1024)
|
| 131 |
-
if not chunk:
|
| 132 |
-
break
|
| 133 |
-
dst.write(chunk)
|
| 134 |
-
PY
|
| 135 |
```
|
| 136 |
|
| 137 |
-
|
| 138 |
|
| 139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
```python
|
|
|
|
|
|
|
|
|
|
| 142 |
from datasets import load_dataset
|
| 143 |
from huggingface_hub import hf_hub_download
|
| 144 |
-
import tarfile
|
| 145 |
|
| 146 |
-
|
| 147 |
-
|
| 148 |
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
with target.open("wb") as dst:
|
| 163 |
-
for part_path in row["part_paths"].split(";"):
|
| 164 |
-
part = hf_hub_download(
|
| 165 |
-
repo_id="LiteFold/evo-dplm-data",
|
| 166 |
-
repo_type="dataset",
|
| 167 |
-
filename=part_path,
|
| 168 |
-
)
|
| 169 |
-
with Path(part).open("rb") as src:
|
| 170 |
-
while True:
|
| 171 |
-
chunk = src.read(8 * 1024 * 1024)
|
| 172 |
-
if not chunk:
|
| 173 |
-
break
|
| 174 |
-
dst.write(chunk)
|
| 175 |
```
|
| 176 |
|
| 177 |
-
|
|
|
|
|
|
|
| 178 |
|
| 179 |
```python
|
| 180 |
-
from
|
|
|
|
|
|
|
| 181 |
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
```
|
| 187 |
|
| 188 |
## Notes
|
| 189 |
|
| 190 |
-
The
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: Evolutionary MSA Data
|
| 3 |
size_categories:
|
| 4 |
- 100K<n<1M
|
| 5 |
task_categories:
|
| 6 |
+
- feature-extraction
|
| 7 |
- other
|
| 8 |
tags:
|
| 9 |
- biology
|
| 10 |
- protein
|
| 11 |
+
- msa
|
| 12 |
+
- evolutionary
|
| 13 |
+
- sequence-alignment
|
| 14 |
+
- mmseqs2
|
| 15 |
+
- archive
|
| 16 |
configs:
|
| 17 |
- config_name: files
|
| 18 |
default: true
|
|
|
|
| 29 |
path: parts.csv
|
| 30 |
---
|
| 31 |
|
| 32 |
+
# Evolutionary MSA Data
|
| 33 |
|
| 34 |
+
This repository contains precomputed evolutionary sequence-alignment data in an archive format that is practical to host and download from the Hub. The original file paths are preserved inside the tar shard, while `metadata.csv` gives a searchable index of every file.
|
| 35 |
|
| 36 |
+
The dataset is meant for workflows that need ready-to-use MSA/cache files without rebuilding them from sequence databases.
|
| 37 |
|
| 38 |
+
## Contents
|
| 39 |
+
|
| 40 |
+
| Component | Files | Size |
|
| 41 |
+
|---|---:|---:|
|
| 42 |
+
| `msa_cache/` | 134,898 | 19.37 GiB |
|
| 43 |
+
| `mmseqs30/` | 4 | 82.32 MiB |
|
| 44 |
+
| root files | 4 | 41.99 MiB |
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
File types:
|
| 47 |
|
| 48 |
+
| Type | Files | Size |
|
| 49 |
+
|---|---:|---:|
|
| 50 |
+
| `.npz` | 134,898 | 19.37 GiB |
|
| 51 |
+
| `.fasta` | 3 | 80.71 MiB |
|
| 52 |
+
| `.parquet` | 1 | 34.33 MiB |
|
| 53 |
+
| `.json` | 1 | 7.65 MiB |
|
| 54 |
+
| `.tsv` | 1 | 1.61 MiB |
|
| 55 |
+
| `.sh` | 1 | 806 B |
|
| 56 |
+
| `.md` | 1 | 543 B |
|
| 57 |
|
| 58 |
+
Packaging:
|
| 59 |
|
| 60 |
+
| Item | Value |
|
| 61 |
+
|---|---:|
|
| 62 |
+
| Indexed files | 134,906 |
|
| 63 |
+
| Original payload | 19.49 GiB |
|
| 64 |
+
| Tar shards | 1 |
|
| 65 |
+
| Split large-file parts | 0 |
|
| 66 |
+
| Archive size | 19.72 GiB |
|
| 67 |
+
| Metadata generated | 2026-05-25T06:39:53Z |
|
|
|
|
| 68 |
|
| 69 |
+
## Layout
|
| 70 |
|
| 71 |
+
```text
|
| 72 |
+
README.md
|
| 73 |
+
_MANIFEST.json
|
| 74 |
+
metadata.csv
|
| 75 |
+
shards.csv
|
| 76 |
+
parts.csv
|
| 77 |
+
shards/
|
| 78 |
+
shard-00000.tar
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
Most users only need `metadata.csv` and `shards/shard-00000.tar`. The metadata table is configured as the default Dataset Viewer table.
|
| 82 |
|
| 83 |
## Metadata
|
| 84 |
|
| 85 |
+
`metadata.csv` has one row per original file.
|
| 86 |
|
| 87 |
+
| Column | Meaning |
|
| 88 |
|---|---|
|
| 89 |
+
| `path` | Original relative path. |
|
| 90 |
+
| `storage_type` | `tar` for files stored inside a tar shard; `parts` for oversized files split into byte parts. |
|
| 91 |
+
| `shard_path` | Tar shard containing the file. |
|
| 92 |
| `member_path` | Path of the file inside the tar shard. |
|
| 93 |
+
| `parts_count` | Number of split parts, if any. |
|
| 94 |
+
| `part_paths` | Semicolon-separated part paths, if any. |
|
| 95 |
+
| `top_level`, `directory`, `filename`, `extension` | Path fields for filtering. |
|
| 96 |
+
| `size_bytes`, `size_human`, `modified_utc` | Size and timestamp captured during packaging. |
|
| 97 |
+
|
| 98 |
+
`shards.csv` lists archive shards. `parts.csv` is present for consistency with the archive format; this upload does not currently require split parts.
|
| 99 |
+
|
| 100 |
+
## Python API Examples
|
| 101 |
+
|
| 102 |
+
Install recent Hugging Face clients in your environment:
|
| 103 |
+
|
| 104 |
+
```python
|
| 105 |
+
# pip install -U huggingface_hub datasets
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
```
|
| 107 |
|
| 108 |
+
Set the repo id once:
|
| 109 |
|
| 110 |
+
```python
|
| 111 |
+
repo_id = "LiteFold/Evolutionary"
|
|
|
|
|
|
|
|
|
|
| 112 |
```
|
| 113 |
|
| 114 |
+
### Browse Files
|
| 115 |
|
| 116 |
+
```python
|
| 117 |
+
from datasets import load_dataset
|
|
|
|
|
|
|
| 118 |
|
| 119 |
+
files = load_dataset(repo_id, "files", split="train")
|
| 120 |
+
print(files)
|
| 121 |
+
print(files[0])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
```
|
| 123 |
|
| 124 |
+
For streaming access to the index:
|
| 125 |
|
| 126 |
+
```python
|
| 127 |
+
from datasets import load_dataset
|
| 128 |
+
|
| 129 |
+
files = load_dataset(repo_id, "files", split="train", streaming=True)
|
| 130 |
+
for row in files:
|
| 131 |
+
if row["extension"] == ".npz":
|
| 132 |
+
print(row["path"], row["size_human"], row["shard_path"])
|
| 133 |
+
break
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
### Extract One MSA Cache File
|
| 137 |
+
|
| 138 |
+
This downloads the shard containing the selected file, then extracts only that member.
|
| 139 |
|
| 140 |
```python
|
| 141 |
+
from pathlib import Path
|
| 142 |
+
import tarfile
|
| 143 |
+
|
| 144 |
from datasets import load_dataset
|
| 145 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 146 |
|
| 147 |
+
repo_id = "LiteFold/Evolutionary"
|
| 148 |
+
out_dir = Path("./evolutionary")
|
| 149 |
|
| 150 |
+
files = load_dataset(repo_id, "files", split="train", streaming=True)
|
| 151 |
+
row = next(item for item in files if item["extension"] == ".npz")
|
| 152 |
+
|
| 153 |
+
shard = hf_hub_download(
|
| 154 |
+
repo_id=repo_id,
|
| 155 |
+
repo_type="dataset",
|
| 156 |
+
filename=row["shard_path"],
|
| 157 |
+
)
|
| 158 |
+
|
| 159 |
+
with tarfile.open(shard) as archive:
|
| 160 |
+
archive.extract(row["member_path"], path=out_dir)
|
| 161 |
+
|
| 162 |
+
print(out_dir / row["path"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
```
|
| 164 |
|
| 165 |
+
### Restore The Full Tree
|
| 166 |
+
|
| 167 |
+
This downloads the repository snapshot and extracts all tar shards into a local directory.
|
| 168 |
|
| 169 |
```python
|
| 170 |
+
from pathlib import Path
|
| 171 |
+
import csv
|
| 172 |
+
import tarfile
|
| 173 |
|
| 174 |
+
from huggingface_hub import snapshot_download
|
| 175 |
+
|
| 176 |
+
repo_id = "LiteFold/Evolutionary"
|
| 177 |
+
snapshot = Path(snapshot_download(repo_id=repo_id, repo_type="dataset"))
|
| 178 |
+
out_dir = Path("./evolutionary")
|
| 179 |
+
out_dir.mkdir(parents=True, exist_ok=True)
|
| 180 |
+
|
| 181 |
+
for shard in sorted((snapshot / "shards").glob("*.tar")):
|
| 182 |
+
with tarfile.open(shard) as archive:
|
| 183 |
+
archive.extractall(out_dir)
|
| 184 |
+
|
| 185 |
+
with (snapshot / "metadata.csv").open(newline="") as handle:
|
| 186 |
+
for row in csv.DictReader(handle):
|
| 187 |
+
if row["storage_type"] != "parts":
|
| 188 |
+
continue
|
| 189 |
+
target = out_dir / row["path"]
|
| 190 |
+
target.parent.mkdir(parents=True, exist_ok=True)
|
| 191 |
+
with target.open("wb") as dst:
|
| 192 |
+
for part_path in row["part_paths"].split(";"):
|
| 193 |
+
with (snapshot / part_path).open("rb") as src:
|
| 194 |
+
while chunk := src.read(8 * 1024 * 1024):
|
| 195 |
+
dst.write(chunk)
|
| 196 |
+
|
| 197 |
+
print(out_dir)
|
| 198 |
```
|
| 199 |
|
| 200 |
## Notes
|
| 201 |
|
| 202 |
+
- The archive is uncompressed so individual files can be extracted directly from the tar shard.
|
| 203 |
+
- The file paths are kept as they appeared in the source data directory.
|
| 204 |
+
- Use `metadata.csv` as the source of truth for locating files inside shards.
|