Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
pretty_name: NanoPLM UniRef50 3M Subset
|
| 4 |
-
language:
|
| 5 |
-
- en
|
| 6 |
tags:
|
| 7 |
- biology
|
| 8 |
- protein
|
|
@@ -13,6 +11,13 @@ tags:
|
|
| 13 |
- bioinformatics
|
| 14 |
size_categories:
|
| 15 |
- 1M<n<10M
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# NanoPLM UniRef50 3M Subset
|
|
@@ -31,17 +36,43 @@ experimenting with small protein language models (PLMs).
|
|
| 31 |
|
| 32 |
## Format
|
| 33 |
|
| 34 |
-
|
| 35 |
-
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
``
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
## Usage
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
```python
|
| 47 |
from huggingface_hub import hf_hub_download
|
|
@@ -51,22 +82,6 @@ train_path = hf_hub_download(
|
|
| 51 |
filename="train.fasta",
|
| 52 |
repo_type="dataset",
|
| 53 |
)
|
| 54 |
-
val_path = hf_hub_download(
|
| 55 |
-
repo_id="heispv/nanoplm-uniref50-3M-subset",
|
| 56 |
-
filename="val.fasta",
|
| 57 |
-
repo_type="dataset",
|
| 58 |
-
)
|
| 59 |
-
```
|
| 60 |
-
|
| 61 |
-
Parse the FASTA (e.g. with Biopython):
|
| 62 |
-
|
| 63 |
-
```python
|
| 64 |
-
from Bio import SeqIO
|
| 65 |
-
|
| 66 |
-
for record in SeqIO.parse(train_path, "fasta"):
|
| 67 |
-
seq_id = record.id # e.g. "UniRef50_A0A4Y2FNR1"
|
| 68 |
-
sequence = str(record.seq)
|
| 69 |
-
...
|
| 70 |
```
|
| 71 |
|
| 72 |
## Source & License
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
pretty_name: NanoPLM UniRef50 3M Subset
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
- biology
|
| 6 |
- protein
|
|
|
|
| 11 |
- bioinformatics
|
| 12 |
size_categories:
|
| 13 |
- 1M<n<10M
|
| 14 |
+
configs:
|
| 15 |
+
- config_name: default
|
| 16 |
+
data_files:
|
| 17 |
+
- split: train
|
| 18 |
+
path: data/train-*.parquet
|
| 19 |
+
- split: validation
|
| 20 |
+
path: data/validation-*.parquet
|
| 21 |
---
|
| 22 |
|
| 23 |
# NanoPLM UniRef50 3M Subset
|
|
|
|
| 36 |
|
| 37 |
## Format
|
| 38 |
|
| 39 |
+
The dataset is provided as **Parquet** (powers the Dataset Viewer and `load_dataset`).
|
| 40 |
+
Each row is a UniRef50 cluster representative with the header parsed into columns:
|
| 41 |
|
| 42 |
+
| Column | Type | Description |
|
| 43 |
+
| ---------- | ------ | ------------------------------------------------------ |
|
| 44 |
+
| `id` | string | UniRef50 cluster ID, e.g. `UniRef50_A0A4Y2FNR1` |
|
| 45 |
+
| `name` | string | Cluster name / protein description |
|
| 46 |
+
| `n` | int64 | Number of members in the cluster (`n=` field) |
|
| 47 |
+
| `tax` | string | Lowest common taxon (`Tax=` field) |
|
| 48 |
+
| `tax_id` | string | NCBI taxonomy ID (`TaxID=` field) |
|
| 49 |
+
| `rep_id` | string | Representative member ID (`RepID=` field) |
|
| 50 |
+
| `sequence` | string | Amino-acid sequence |
|
| 51 |
+
| `length` | int64 | Sequence length |
|
| 52 |
+
|
| 53 |
+
The original **FASTA** files (`train.fasta`, `val.fasta`) are also included in the repo
|
| 54 |
+
for direct use.
|
| 55 |
|
| 56 |
## Usage
|
| 57 |
|
| 58 |
+
Load with the 🤗 `datasets` library:
|
| 59 |
+
|
| 60 |
+
```python
|
| 61 |
+
from datasets import load_dataset
|
| 62 |
+
|
| 63 |
+
ds = load_dataset("heispv/nanoplm-uniref50-3M-subset")
|
| 64 |
+
print(ds) # DatasetDict with 'train' and 'validation'
|
| 65 |
+
print(ds["train"][0]["sequence"])
|
| 66 |
+
|
| 67 |
+
# Stream without downloading everything:
|
| 68 |
+
ds = load_dataset("heispv/nanoplm-uniref50-3M-subset", split="train", streaming=True)
|
| 69 |
+
for ex in ds:
|
| 70 |
+
seq = ex["sequence"]
|
| 71 |
+
...
|
| 72 |
+
break
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
Or download the raw FASTA files directly:
|
| 76 |
|
| 77 |
```python
|
| 78 |
from huggingface_hub import hf_hub_download
|
|
|
|
| 82 |
filename="train.fasta",
|
| 83 |
repo_type="dataset",
|
| 84 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
```
|
| 86 |
|
| 87 |
## Source & License
|