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
1likes196downloads
Dataset Card

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

ConfigRaw sourceDescription
protein_linksprotein.links.full.v12.0.txt.gzProtein-protein association edges with all STRING evidence channels and combined_score.
protein_infoprotein.info.v12.0.txt.gzProtein identifiers, preferred names, sizes, and annotations.
protein_aliasesprotein.aliases.v12.0.txt.gzExternal aliases and identifier sources for STRING proteins.
protein_sequencesprotein.sequences.v12.0.fa.gzProtein amino-acid sequences parsed from FASTA.
speciesspecies.v12.0.txtOrganism metadata: taxonomy id, STRING type, compact name, official NCBI name, and domain.

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:

ConfigSplit key
protein_linksprotein1 + protein2
protein_infostring_protein_id
protein_aliasesstring_protein_id + alias + source
protein_sequencesstring_protein_id
speciestaxon_id

Usage

Install the client library:

bash
python -m pip install datasets

Load the interaction table in streaming mode:

python
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:

python
from datasets import load_dataset

proteins = load_dataset("LiteFold/STRING", "protein_info", split="train")
print(proteins[0])

Load local Parquet files generated before upload:

python
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:

bash
python -m pip install -r requirements.txt

Create the full Parquet dataset using 32 worker processes:

bash
python scripts/prepare_hf_dataset.py \
  --raw-dir v12.0 \
  --output-dir data \
  --num-proc 32 \
  --overwrite

Create a quick preview dataset before running the full conversion:

bash
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 \
  --overwrite

Useful options:

OptionPurpose
--num-proc 32Uses 32 parser workers.
--rows-per-chunk 100000Controls rows parsed per worker task. Lower this if memory is tight.
--max-in-flight 32Bounds queued chunks to avoid unbounded RAM growth. Defaults to --num-proc.
--link-min-combined-score 700Optionally keep only higher-confidence links.
--compression zstdWrites compressed Parquet shards.

Validate generated local files:

bash
python scripts/validate_hf_dataset.py --data-dir data --config protein_links --split train --streaming

Validate after upload:

bash
python scripts/validate_hf_dataset.py --repo-id LiteFold/STRING --config protein_links --split train --streaming

Upload

After generating data/, upload the processed files and this dataset card:

bash
huggingface-cli upload LiteFold/STRING README.md README.md --repo-type dataset
huggingface-cli upload LiteFold/STRING data data --repo-type dataset

The repository already tracks *.parquet with Git LFS through .gitattributes.

Citation

Please cite the upstream STRING database:

bibtex
@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}
}