Cell type descriptions#

CyteOnto does not embed labels directly. The LLM first writes a CellDescription of each label, and of each Cell Ontology term, and to_sentence() turns it into the text that is embedded:

<initialLabel> is <descriptiveName>. Function: <function> Disease relevance: <diseaseRelevance> Developmental stage: <developmentalStage>

The lengths below are what the prompt asks the model for; they are not validated. When a label cannot be described after all retries, it gets a blank description, which is not cached, and its embedding is computed from the label text instead. How CyteOnto works describes the steps.

class cyteonto.CellDescription(*, initialLabel, descriptiveName, function, diseaseRelevance, developmentalStage)#

Structured description of a single cell type.

initialLabel: str#

Required. The label, as the model copied it. The prompt asks for a verbatim copy, including any synonyms separated by semicolons, but CyteOnto does not check it.

descriptiveName: str#

Required. One noun phrase of at most 12 words that names the cell type.

function: str#

Required. One to three sentences, at most 60 words, on the primary role of the cell type.

diseaseRelevance: str#

Required. One to three sentences, at most 60 words, on the conditions that involve the cell type, or Not established.

developmentalStage: str#

Required. One sentence of at most 30 words on the lineage or developmental window, Terminally differentiated or Not established.

classmethod blank(label='')#

Return a description of label with all other fields empty.

Return type:

CellDescription

is_blank()#

Return whether every field except initialLabel is empty.

Return type:

bool

to_sentence()#

Return the text that is embedded for this cell type.

The form is <initialLabel> is <descriptiveName>. Function: <function> Disease relevance: <diseaseRelevance> Developmental stage: <developmentalStage>.

Return type:

str

classmethod get_blank()#

Return blank() with an empty label.

Return type:

CellDescription