TorchCell

TorchCell is a Python library for modeling the relationship between a cell’s genotype, its environment and its phenotype, starting with the yeast Saccharomyces cerevisiae. It records each published measurement as a typed experiment, a pydantic genotype x environment -> phenotype object whose genotype is a list of gene perturbations (deletions, alleles, gene additions, copy-number changes, CRISPR activation and interference). Dataset loaders convert the supplementary data of each source paper into these objects, a BioCypher build loads them into a Neo4j knowledge graph, and the modeling code queries that graph to train graph neural networks and transformers on the resulting cell graphs.

The project’s aim is the experimental-data layer that a virtual yeast cell would be trained on, so provenance is part of the data model: retrieved source files are recorded with their retrieval command and sha256 (torchcell.literature), extracted constants carry their source quote (torchcell.verification), built datasets are checked at five record-level verification levels (L0 to L4), and a schema change flags every built dataset it makes stale (torchcell.provenance). The served knowledge graph can be browsed at torchcell-database.ncsa.illinois.edu, and an interactive map of the schema is at /ontology/.

Not documented

The API reference leaves out these parts of the torchcell package:

  • torchcell.cell: an __init__.py with a docstring and nothing else.

  • torchcell.scratch and torchcell.experiments: working scripts, not library code.