Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Study context and metadata

The study context is a short description of your experiment that you pass to run() or CyteTypeR() as study_context. It is your main way to tell CyteType what the sample is. This page shows what to write and how CyteType uses it, and how metadata tags and your cell metadata add to it.

Python
R
adata = annotator.run(
    study_context=(
        "Peripheral blood mononuclear cells from three healthy adult human donors, "
        "profiled with 10x Genomics 3' v3 single-cell RNA-seq."
    ),
    metadata={
        "title": "PBMC healthy donors",
        "GEO": "https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=<accession>",
    },
)

How CyteType uses the study context

At the start of every job, CyteType builds the background of your study:

  1. Organism. It identifies the organism from your study context and the marker genes.

  2. Tissue. It infers the likely tissue from the expression data.

  3. Study summary. It writes a short summary of the biological context, with keywords, from your study context, the organism and the inferred tissue.

  4. Pathway libraries. It chooses the pathway libraries that fit the study. They are used to describe the pathway activity of each cluster.

The summary then goes with every cluster through annotation and review, including the comparison of CyteType’s labels with yours. In the report, the Context Fit section of each cluster shows how its label fits the study (see The CyteType report).

The study context guides the reasoning but does not restrict it. CyteType is not limited to the tissue or the cell types you mention: when the evidence supports it, it can call cell types that you did not mention or that are unexpected for the stated tissue.

In Python, study_context is a required argument. In R it is optional, but without it CyteType has only the genes to go on, so always write one.

What to include

Describe the sample in a sentence or two, or a short paragraph, in plain language. Cover the items that apply to your study:

ItemExamples
Organismhuman; mouse (C57BL/6J)
Tissue or organ, with the region when it matterslung, distal parenchyma; hippocampus; bone marrow aspirate
Disease or conditionhealthy donors; idiopathic pulmonary fibrosis; tumor with matched adjacent normal tissue
Assay10x Genomics 3’ single-cell RNA-seq; single-nucleus RNA-seq; Smart-seq2
Enrichment or sortingCD45+ cells sorted by FACS; dead-cell removal; epithelial enrichment
Notable perturbationsLPS stimulation for 6 hours; anti-PD-1 treatment; knockout of a named gene; organoids after 30 days of differentiation
Developmental stage or ageembryonic day 14.5; fetal, 18 weeks post-conception; aged mice, 24 months

Some guidance:

Examples

Blood

The better version adds the organism, the condition and the assay.

Brain

The better version names the region, the model and its controls, the age, and that nuclei were profiled.

Tumor

The better version adds the organism, the disease, the sample types, the immune-cell enrichment and the assay. Without the enrichment, the near absence of epithelial and stromal cells would be hard to interpret.

Metadata tags

metadata labels a run: a dictionary in Python, a named list in R. Useful tags include a title, the dataset accession, the publication, the sample or batch, and an analysis version.

Cell metadata columns

Besides the study context, CyteType reads the categorical columns of your cell metadata (adata.obs or obj@meta.data). For each cluster, the client records which values make up more than min_percentage of its cells (see Cell metadata). CyteType then uses them in two ways:

The most useful columns describe where the cells came from:

Some guidance:

Next steps