Metabolic modeling of single Th17 cells reveals regulators of autoimmunity
August 5, 2021
Authors
Allon Wagner, Chao Wang, Johannes Fessler, ..., Aviv Regev, Vijay K. Kuchroo, Nir Yosef
--Cell
Wagner, Allon, et al. "Metabolic modeling of single Th17 cells reveals regulators of autoimmunity." Cell 184.16 (2021): 4168-4185.
To understand metabolic regulation in autoimmune disease
Compass
A Python‑based algorithm designed to model cellular metabolic heterogeneity using single‑cell RNA‑Seq data combined with flux balance analysis (FBA).
Compass
Mouse Th17 cells
Human Th17 cells
Gene expression matrix
primary input
Rows
Genes = [G6PD, ENO....]
Columns
Cells [cell1, cell2, ....]
Values
Expression levels [ TPM, Normalized counts]
.tsv
.mtx
.h5ad
.tsv format file overview
In scRNA-seq analysis, .tsv (tab-separated values) files are commonly used to store data, particularly for gene expression matrices, cell barcodes, and gene information.
.tsv format file overview
After opening a command line in a directory with an input file expression.tsv, you can run Compass on the data with the following command, which will limit the number of processes used to 10:
compass --data expression.tsv --num-processes 10 --species homo_sapiens
.mtx format file overview
In scRNA-seq data, the .mtx file, often in Matrix Market format, represents the count data as a sparse matrix. This format is used because scRNA-seq data matrices are typically very large and mostly contain zero values (sparse).
.mtx format file overview
To run Compass on mtx formatted data, use the following command:
compass --data-mtx expression.mtx genes.tsv sample_names.tsv --num-processes 10 --species homo_sapiens
.h5ad format file overview
https://cellgeni.readthedocs.io/en/latest/visualisations.html
X (red block):
The cells × genes expression matrix (usually sparse), storing raw or normalized data.
obs (orange):
Per-cell metadata (e.g., sample ID, cluster, cell‑type labels).
var (green):
Per-gene metadata (e.g., gene names, IDs, biotype).
obsm (blue):
Multi-dimensional cell-associated data (e.g., PCA or UMAP coordinates).
layers, uns, varm/obsp (purple):
Extra data such as raw counts, embeddings, graph structures, or plotting settings
.h5ad format file overview
https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE289733
.h5ad format file overview
conda install -c conda-forge numpy | conda install -c conda-forge scanpy | conda install -c conda-forge cobra | conda install -c conda-forge plotly | conda install -c conda-forge Pybrain | conda install -c conda-forge jupyterlab |
conda install -c conda-forge scipy | conda install -c conda-forge anndata | conda install -c conda-forge optlang | conda install -c conda-forge tensorflow | conda install -c conda-forge Pydot | conda install -c conda-forge notebook |
conda install -c conda-forge pandas | conda install -c conda-forge h5py | conda install -c conda-forge swiglpk | conda install -c conda-forge bokeh | conda install -c conda-forge Polars | conda install -c conda-forge ipykernel |
conda install -c conda-forge tensorboard | conda install -c conda-forge scikit-learn | conda install -c conda-forge gurobi | conda install -c conda-forge matplotlib | conda install -c conda-forge Caffe | conda install -c conda-forge keras |
conda install -c conda-forge theano | conda install -c conda-forge statsmodels | conda install -c conda-forge glpk | conda install -c conda-forge seaborn | conda install -c conda-forge StatsModel | conda install -c conda-forge openCV |
Pre-requisites for running Compass --- Libraries
compass run \
--model path/to/Recon2.v04.mat \
--expression path/to/expression.tsv \
--output path/to/output_folder \
--threads 4
compass -h
pip install requirements.txt
python -m pip install git+https://github.com//Compass.git --upgrade
compass --set-license <PATH_TO_LICENSE>
run setup.py
this is a .py file named as setup.py and must be placed in the same directory as the .tsv file
now go to anaconda prompt and type
cd <PATH_TO_LICENSE>
<PATH_TO_LICENSE>
is the same place where you have placed your gurobi license
WLSACCESSID=203dec48-e3f8-46ac-0184-92d7d6ded944
WLSSECRET=a080cce8-4e01-4e36-955e-61592c5630db
LICENSEID=12127
Windows:
C:\gurobi and your home directory (C:\Users\yourusername)
Linux:
/opt/gurobi and your home directory (/home/yourusername)
th17 (raw single-cell)
5
PCA (Fig. 2B)
th17 (raw single-cell) : used for ---
5
Volcano plots (Fig. 2C)
th17_micropooled
5
th17_micropooled : used for ---
5
Violin plots (Fig. 2E)
recon2
5
Possibly used for:
recon2
5
recon2
5
Guided by
Dr. Payel Roy
2025 June 23
Thank you
for listening
Harshini Suresha