This model helps us learn relationships between antibody Fc structural features and immune receptor interaction, effector cell recruitment, and disease outcome. See our manuscript.
This project uses Rye for dependency management.
You can clone the repository and install the dependencies by running the following commands:
git clone https://github.com/meyer-lab/mechanismSerology.git
cd mechanismSerology
rye sync
The figures can be generated using:
rye run make all
or for a specific figure:
rye run make output/figure_X.svg
The model can be used without any fine-tuning on new systems serology datasets.
The model uses numerical optimization to infer its outputs and this is handled
by the optimize_loss
function.
from maserol.core import optimize_loss
# load data ...
# run inference
opts = assemble_options(data)
x, ctx = optimize_loss(data, **opts, return_reshaped_params=True)
# x contains the inferred parameters, including the inferred antibody abundances (as "Rtot")
# if you want the inferences as a pandas DataFrame
Rtot = Rtot_to_df(x["Rtot"], data, rcps=list(opts["rcps"]))
All of our datasets can be accessed through the maserol.datasets
module.
from maserol.datasets import Zohar, Kaplonek
zohar = Zohar()
zohar_data = zohar.get_detection_signal()
zohar_meta = zohar.get_metadata()