Datasets:
annotations_creators:
- synthetic
language_creators:
- found
language:
- en
multilinguality:
- monolingual
license: apache-2.0
task_categories:
- tabular-classification
- tabular-regression
tags:
- biology
- synthetic
pretty_name: FOF
size_categories:
- 10M<n<100M
dataset_type: tabular
configs:
- config_name: AGORA
data_files:
- split: train
path: AGORA.csv
- config_name: CARVEME
data_files:
- split: train
path: CARVEME.csv
Welcome to the Friend or Foe Collection!

This file contains the description and general structure of the Friend or Foe collection of bacterial datasets. The environments are stored in .csv files namely AGORA.csv and CARVEME.csv. First 424 columns for AGORA and 499 for CARVEME identify the abreviations for chemical compounds. Last five columns describe the target (regression/classification), the name of dataset (BC/MC/GR), the group of additional compounds (100/50), split (train/val/test) and task (regression/classification).
To enhance the clarity, each dataset is stored in a separate folder related to different ML tasks, namely Supervised Learning, Transfer Learning, Generative Modeling, and Unsupervised Learning. Each subfolder stores datasets that address a specific task of evaluating the microbial interactions suitable for the machine learning pipeline. All datasets are stored as large sparse tables with corresponding indices for the chemical compounds (features).
In addition, we provide full mapping of indices to real names of compounds in compounds.json. Note that for the clustering datasets, we changed the indices as we selected specific compounds, so the provided compounds.json is different from the one for supervised learning, transfer learning, and generative modeling. For clustering, we also provide names of species used in a specific dataset as species.json. Species used for other tasks can be found in the utils folder.
The utils subfolder contains all the metabolic models that we used for the friend or foe construction. All metabolic models are stored in .mat format, the number also identifies the species. In addition, we provide the environment results of the metabolic models in raw .csv files that collect the environments for specific interactions. A General info subfolder contains information about organism names and abbreviations of environmental compounds (to convert the abbreviation to a name, see Agora_env_compounds.xlsx for AGORA and the Bigg database at http://bigg.ucsd.edu for CARVEME).
Compendium structure with links to sole datasets
Supervised Learning (Interaction Classification)
Supervised Learning (Growth Rate Regression)
Transfer Learning
Generative Modeling
Unsupervised Learning
Getting started
from huggingface_hub import hf_hub_download
import pandas as pd
REPO_ID = "powidla/Friend-Or-Foe"
X_train_ID = "Classification/AGORA/100/BC-I/X_train_BC-I-100.csv"
X_val_ID = "Classification/AGORA/100/BC-I/X_val_BC-I-100.csv"
X_test_ID = "Classification/AGORA/100/BC-I/X_test_BC-I-100.csv"
y_train_ID = "Classification/AGORA/100/BC-I/y_train_BC-I-100.csv"
y_val_ID = "Classification/AGORA/100/BC-I/y_val_BC-I-100.csv"
y_test_ID = "Classification/AGORA/100/BC-I/y_test_BC-I-100.csv"
X_train = pd.read_csv(
hf_hub_download(repo_id=REPO_ID, filename=X_train_ID, repo_type="dataset")
)
X_val = pd.read_csv(
hf_hub_download(repo_id=REPO_ID, filename=X_val_ID, repo_type="dataset")
)
X_test = pd.read_csv(
hf_hub_download(repo_id=REPO_ID, filename=X_test_ID, repo_type="dataset")
)
y_train = pd.read_csv(
hf_hub_download(repo_id=REPO_ID, filename=y_train_ID, repo_type="dataset")
)
y_val = pd.read_csv(
hf_hub_download(repo_id=REPO_ID, filename=y_val_ID, repo_type="dataset")
)
y_test = pd.read_csv(
hf_hub_download(repo_id=REPO_ID, filename=y_test_ID, repo_type="dataset")
)
Citation Information
@ARTICLE{Solowiej-Wedderburn2025-ar,
title = "Competition and cooperation: The plasticity of bacterial
interactions across environments",
author = "Solowiej-Wedderburn, Josephine and Pentz, Jennifer T and Lizana,
Ludvig and Schroeder, Bjoern O and Lind, Peter A and Libby, Eric",
journal = "PLoS Comput. Biol.",
publisher = "Public Library of Science (PLoS)",
volume = 21,
number = 7,
pages = "e1013213",
month = jul,
year = 2025,
copyright = "http://creativecommons.org/licenses/by/4.0/",
language = "en"
}