anindya64 commited on
Commit
aebee68
·
verified ·
1 Parent(s): fe0d1d0

Update dataset card

Browse files
Files changed (1) hide show
  1. README.md +140 -126
README.md CHANGED
@@ -1,16 +1,18 @@
1
  ---
2
- pretty_name: Evo-DPLM Data
3
  size_categories:
4
  - 100K<n<1M
5
  task_categories:
 
6
  - other
7
  tags:
8
  - biology
9
  - protein
10
- - rna
11
- - structure-prediction
12
- - tar
13
- - datasets
 
14
  configs:
15
  - config_name: files
16
  default: true
@@ -27,164 +29,176 @@ configs:
27
  path: parts.csv
28
  ---
29
 
30
- # Evo-DPLM Data
31
 
32
- This dataset preserves the source folder as tar shards plus split part files for any source file larger than one shard. `metadata.csv` has one row per original file and is configured as the default Dataset Viewer table.
33
 
34
- ## Summary
35
 
36
- | | |
37
- |---|---:|
38
- | Original files | 134,906 |
39
- | Original payload | 19.49 GiB (20,930,421,331 bytes) |
40
- | Tar shards | 1 |
41
- | Large-file parts | 0 |
42
- | Archive size | 19.72 GiB (21,172,090,880 bytes) |
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
- ## Source Layout
48
 
49
- | Directory | Files | Size |
50
- | --- | --- | --- |
51
- | . | 4 | 41.99 MiB |
52
- | mmseqs30 | 4 | 82.32 MiB |
53
- | msa_cache | 134,898 | 19.37 GiB |
 
 
 
 
54
 
55
- ## Common File Types
56
 
57
- | Extension | Files | Size |
58
- | --- | --- | --- |
59
- | .npz | 134,898 | 19.37 GiB |
60
- | .fasta | 3 | 80.71 MiB |
61
- | .parquet | 1 | 34.33 MiB |
62
- | .json | 1 | 7.65 MiB |
63
- | .tsv | 1 | 1.61 MiB |
64
- | .sh | 1 | 806 B |
65
- | .md | 1 | 543 B |
66
 
67
- ## Shards
68
 
69
- | Shard | Files | Payload | Archive |
70
- | --- | --- | --- | --- |
71
- | shards/shard-00000.tar | 134,906 | 19.49 GiB | 19.72 GiB |
 
 
 
 
 
 
 
 
72
 
73
  ## Metadata
74
 
75
- `metadata.csv` columns:
76
 
77
- | Column | Description |
78
  |---|---|
79
- | `path` | Original relative path in the source folder. |
80
- | `storage_type` | `tar` for files inside tar shards, or `parts` for oversized files split into byte parts. |
81
- | `shard_path` | Tar shard containing the file when `storage_type` is `tar`. |
82
  | `member_path` | Path of the file inside the tar shard. |
83
- | `parts_count` | Number of part files when `storage_type` is `parts`. |
84
- | `part_paths` | Semicolon-separated part paths when `storage_type` is `parts`. |
85
- | `top_level` | First directory under the source folder. |
86
- | `directory` | Parent directory of the file. |
87
- | `filename` | File basename. |
88
- | `extension` | File extension, preserving compound suffixes such as `.csv.gz`. |
89
- | `size_bytes` | Original file size in bytes. |
90
- | `size_human` | Human-readable original file size. |
91
- | `modified_utc` | Local file modification timestamp captured during packaging. |
92
-
93
- `shards.csv` lists one row per tar shard. `parts.csv` lists one row per split large-file part. `_MANIFEST.json` contains the aggregate build summary.
94
-
95
- ## Download Everything
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
- Extract all shards:
103
 
104
- ```bash
105
- mkdir -p ./data
106
- for shard in ./evo-dplm-data/shards/*.tar; do
107
- tar -xf "$shard" -C ./data
108
- done
109
  ```
110
 
111
- Reassemble any split large files:
112
 
113
- ```bash
114
- python - <<'PY'
115
- import csv
116
- from pathlib import Path
117
 
118
- root = Path("./evo-dplm-data")
119
- out = Path("./data")
120
- with (root / "metadata.csv").open(newline="") as handle:
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
- ## Use With `datasets`
138
 
139
- Use the `datasets` API to query file metadata, then use `huggingface_hub` to download the shard that contains the file.
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
  ```python
 
 
 
142
  from datasets import load_dataset
143
  from huggingface_hub import hf_hub_download
144
- import tarfile
145
 
146
- files = load_dataset("LiteFold/evo-dplm-data", "files", split="train")
147
- row = files[0]
148
 
149
- if row["storage_type"] == "tar":
150
- shard = hf_hub_download(
151
- repo_id="LiteFold/evo-dplm-data",
152
- repo_type="dataset",
153
- filename=row["shard_path"],
154
- )
155
- with tarfile.open(shard) as archive:
156
- archive.extract(row["member_path"], path="./data")
157
- else:
158
- from pathlib import Path
159
-
160
- target = Path("./data") / row["path"]
161
- target.parent.mkdir(parents=True, exist_ok=True)
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
- For streaming metadata:
 
 
178
 
179
  ```python
180
- from datasets import load_dataset
 
 
181
 
182
- files = load_dataset("LiteFold/evo-dplm-data", "files", split="train", streaming=True)
183
- for row in files:
184
- print(row["path"], row["shard_path"])
185
- break
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  ```
187
 
188
  ## Notes
189
 
190
- The tar shards are uncompressed by design. This keeps packaging and random extraction simple and avoids spending CPU compressing data that is often already compressed.
 
 
 
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.