UniRef90 / README.md
anindya64's picture
Add files using upload-large-folder tool
d2b7eec verified
---
license: cc-by-4.0
pretty_name: UniRef90
size_categories:
- 100M<n<1B
task_categories:
- other
language:
- en
tags:
- biology
- proteins
- sequences
- fasta
- uniref
- clustering
---
# UniRef90
Normalized FASTA shards of UniRef90 cluster representative sequences (90% sequence identity threshold).
Processed and uploaded by the [MegaData](https://github.com/) post-download pipeline
(internal repo). Original source: <https://www.uniprot.org/help/uniref>.
## Statistics
| | |
|---|---|
| Source files | 1 |
| Shards | 189 |
| Compressed shard bytes | 38.65 GiB (41,498,595,315) |
| Records (per-source manifest sum) | 188,848,220 |
| Residues (per-source manifest sum) | 66,359,825,357 |
| Aggregate manifest `total_records` | 188848220 |
## Layout
```
.
├── _MANIFEST.json # aggregate manifest written by the pipeline
├── manifests/<source_slug>.json # per-source manifest (records, residues, shards)
├── metadata/<source_slug>.records.jsonl # per-record provenance
└── sequences/<source_slug>/shard-NNNNNN.fasta.zst
```
`<source_slug>` corresponds 1:1 with an upstream source archive; e.g.
`sequence_uniprotkb_uniprot_sprot.fasta.gz`.
## Loading
Stream every shard of one source (replace `<source_slug>` with the directory of
interest under `sequences/`):
```bash
hf download LiteFold/UniRef90 --repo-type dataset \
--include 'sequences/<source_slug>/shard-*.fasta.zst' \
--local-dir ./uniref90
zstd -dc ./uniref90/sequences/<source_slug>/shard-*.fasta.zst | head
```
Programmatic streaming with [`zstandard`](https://pypi.org/project/zstandard/):
```python
from huggingface_hub import snapshot_download
from pathlib import Path
import zstandard as zstd
local = snapshot_download(
repo_id="LiteFold/UniRef90",
repo_type="dataset",
allow_patterns=["sequences/*/shard-*.fasta.zst"],
)
dctx = zstd.ZstdDecompressor()
for shard in sorted(Path(local).rglob("shard-*.fasta.zst")):
with shard.open("rb") as f, dctx.stream_reader(f) as reader:
buf = b""
while chunk := reader.read(1 << 20):
buf += chunk
*lines, buf = buf.split(b"\n")
for line in lines:
... # naive splitter; swap in your FASTA parser
```
## License
CC BY 4.0 (UniProt Consortium).
## Citation
> Suzek BE, Wang Y, Huang H, McGarvey PB, Wu CH; UniProt Consortium. UniRef clusters: a comprehensive and scalable alternative for improving sequence similarity searches. Bioinformatics, 31(6):926-32, 2015.
## Provenance
Built from the local manifest entry `uniref90` of `manifests/atlas_download_plan.json`.
Pipeline source: `megadata-post normalize --dataset uniref90`.