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.
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
Splits
The 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.
Split keys:
Usage
Install the client library:
python -m pip install datasetsLoad the interaction table in streaming mode:
from datasets import load_dataset
links = load_dataset("LiteFold/STRING", "protein_links", split="train", streaming=True)
first_row = next(iter(links))
print(first_row)Load a smaller metadata table normally:
from datasets import load_dataset
proteins = load_dataset("LiteFold/STRING", "protein_info", split="train")
print(proteins[0])Load local Parquet files generated before upload:
from datasets import load_dataset
data_files = {
"train": "data/protein_links/train-*.parquet",
"validation": "data/protein_links/validation-*.parquet",
"test": "data/protein_links/test-*.parquet",
}
links = load_dataset("parquet", data_files=data_files, split="train", streaming=True)Post-processing
Install conversion dependencies:
python -m pip install -r requirements.txtCreate the full Parquet dataset using 32 worker processes:
python scripts/prepare_hf_dataset.py \
--raw-dir v12.0 \
--output-dir data \
--num-proc 32 \
--overwriteCreate a quick preview dataset before running the full conversion:
python scripts/prepare_hf_dataset.py \
--raw-dir v12.0 \
--output-dir data_preview \
--tables species,protein_info,protein_links \
--max-rows-per-table 10000 \
--num-proc 32 \
--overwriteUseful options:
Validate generated local files:
python scripts/validate_hf_dataset.py --data-dir data --config protein_links --split train --streamingValidate after upload:
python scripts/validate_hf_dataset.py --repo-id LiteFold/STRING --config protein_links --split train --streamingUpload
After generating data/, upload the processed files and this dataset card:
huggingface-cli upload LiteFold/STRING README.md README.md --repo-type dataset
huggingface-cli upload LiteFold/STRING data data --repo-type datasetThe repository already tracks *.parquet with Git LFS through .gitattributes.
Citation
Please cite the upstream STRING database:
@article{szklarczyk2023string,
title = {The STRING database in 2023: protein-protein association networks and functional enrichment analyses for any sequenced genome of interest},
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},
journal = {Nucleic Acids Research},
volume = {51},
number = {D1},
pages = {D638--D646},
year = {2023},
doi = {10.1093/nar/gkac1000}
}