CoolFace
Datasetpublic

LiteFold/STRING

STRING v12.0 STRING is a protein association network database that integrates experimental, computational, text-mined, and curated evidence for functional and physical protein interactions. Configs Config Raw source Description protein_links protein.links.full.v12.0.txt.gz Protein-protein association edges with all STRING evidence channels and combined_score. protein_info protein.info.v12.0.txt.gz Protein identifiers, preferred names, sizes, and… See the full description on the dataset page: https://huggingface.co/datasets/LiteFold/STRING.

sourceHugging Facecc-by-4.0updated 4mo agoView on Hugging Face
1likes193downloads
README.md200 linesDownload Raw Back to root
1---2license: cc-by-4.03pretty_name: STRING v12.04tags:5- biology6- proteomics7- protein-protein-interaction8- graph9- string-db10configs:11- config_name: protein_links12  data_files:13  - split: train14    path: "data/protein_links/train-*.parquet"15  - split: validation16    path: "data/protein_links/validation-*.parquet"17  - split: test18    path: "data/protein_links/test-*.parquet"19- config_name: protein_info20  data_files:21  - split: train22    path: "data/protein_info/train-*.parquet"23  - split: validation24    path: "data/protein_info/validation-*.parquet"25  - split: test26    path: "data/protein_info/test-*.parquet"27- config_name: protein_aliases28  data_files:29  - split: train30    path: "data/protein_aliases/train-*.parquet"31  - split: validation32    path: "data/protein_aliases/validation-*.parquet"33  - split: test34    path: "data/protein_aliases/test-*.parquet"35- config_name: protein_sequences36  data_files:37  - split: train38    path: "data/protein_sequences/train-*.parquet"39  - split: validation40    path: "data/protein_sequences/validation-*.parquet"41  - split: test42    path: "data/protein_sequences/test-*.parquet"43- config_name: species44  data_files:45  - split: train46    path: "data/species/train-*.parquet"47  - split: validation48    path: "data/species/validation-*.parquet"49  - split: test50    path: "data/species/test-*.parquet"51---52 53# STRING v12.054 55STRING is a protein association network database that integrates experimental, computational, text-mined, and curated evidence for functional and physical protein interactions.56 57## Configs58 59| Config | Raw source | Description |60| --- | --- | --- |61| `protein_links` | `protein.links.full.v12.0.txt.gz` | Protein-protein association edges with all STRING evidence channels and `combined_score`. |62| `protein_info` | `protein.info.v12.0.txt.gz` | Protein identifiers, preferred names, sizes, and annotations. |63| `protein_aliases` | `protein.aliases.v12.0.txt.gz` | External aliases and identifier sources for STRING proteins. |64| `protein_sequences` | `protein.sequences.v12.0.fa.gz` | Protein amino-acid sequences parsed from FASTA. |65| `species` | `species.v12.0.txt` | Organism metadata: taxonomy id, STRING type, compact name, official NCBI name, and domain. |66 67## Splits68 69The post-processing script assigns rows to `train`, `validation`, and `test` with a deterministic CRC32 hash. The default ratios are 98/1/1. Re-running with the same `--split-seed` gives the same split assignment.70 71Split keys:72 73| Config | Split key |74| --- | --- |75| `protein_links` | `protein1 + protein2` |76| `protein_info` | `string_protein_id` |77| `protein_aliases` | `string_protein_id + alias + source` |78| `protein_sequences` | `string_protein_id` |79| `species` | `taxon_id` |80 81## Usage82 83Install the client library:84 85```bash86python -m pip install datasets87```88 89Load the interaction table in streaming mode:90 91```python92from datasets import load_dataset93 94links = load_dataset("LiteFold/STRING", "protein_links", split="train", streaming=True)95first_row = next(iter(links))96print(first_row)97```98 99Load a smaller metadata table normally:100 101```python102from datasets import load_dataset103 104proteins = load_dataset("LiteFold/STRING", "protein_info", split="train")105print(proteins[0])106```107 108Load local Parquet files generated before upload:109 110```python111from datasets import load_dataset112 113data_files = {114    "train": "data/protein_links/train-*.parquet",115    "validation": "data/protein_links/validation-*.parquet",116    "test": "data/protein_links/test-*.parquet",117}118links = load_dataset("parquet", data_files=data_files, split="train", streaming=True)119```120 121## Post-processing122 123Install conversion dependencies:124 125```bash126python -m pip install -r requirements.txt127```128 129Create the full Parquet dataset using 32 worker processes:130 131```bash132python scripts/prepare_hf_dataset.py \133  --raw-dir v12.0 \134  --output-dir data \135  --num-proc 32 \136  --overwrite137```138 139Create a quick preview dataset before running the full conversion:140 141```bash142python scripts/prepare_hf_dataset.py \143  --raw-dir v12.0 \144  --output-dir data_preview \145  --tables species,protein_info,protein_links \146  --max-rows-per-table 10000 \147  --num-proc 32 \148  --overwrite149```150 151Useful options:152 153| Option | Purpose |154| --- | --- |155| `--num-proc 32` | Uses 32 parser workers. |156| `--rows-per-chunk 100000` | Controls rows parsed per worker task. Lower this if memory is tight. |157| `--max-in-flight 32` | Bounds queued chunks to avoid unbounded RAM growth. Defaults to `--num-proc`. |158| `--link-min-combined-score 700` | Optionally keep only higher-confidence links. |159| `--compression zstd` | Writes compressed Parquet shards. |160 161Validate generated local files:162 163```bash164python scripts/validate_hf_dataset.py --data-dir data --config protein_links --split train --streaming165```166 167Validate after upload:168 169```bash170python scripts/validate_hf_dataset.py --repo-id LiteFold/STRING --config protein_links --split train --streaming171```172 173## Upload174 175After generating `data/`, upload the processed files and this dataset card:176 177```bash178huggingface-cli upload LiteFold/STRING README.md README.md --repo-type dataset179huggingface-cli upload LiteFold/STRING data data --repo-type dataset180```181 182The repository already tracks `*.parquet` with Git LFS through `.gitattributes`.183 184## Citation185 186Please cite the upstream STRING database:187 188```bibtex189@article{szklarczyk2023string,190  title = {The STRING database in 2023: protein-protein association networks and functional enrichment analyses for any sequenced genome of interest},191  author = {Szklarczyk, Damian and Kirsch, Rebecca and Koutrouli, Mikaela and Nastou, Katerina and Mehryary, Farrokh and Hachilif, Radja and Gable, Annika L. and Fang, Tao and Doncheva, Nadezhda T. and Pyysalo, Sampo and Bork, Peer and Jensen, Lars J. and von Mering, Christian},192  journal = {Nucleic Acids Research},193  volume = {51},194  number = {D1},195  pages = {D638--D646},196  year = {2023},197  doi = {10.1093/nar/gkac1000}198}199```200 
LiteFold/STRING · CoolFace