cell2home.compute_cell_scores

cell2home.compute_cell_scores(adata, signatures, source_col='source', target_col='target', exp=True)

Take the query AnnData object and a set of signatures from construct_signatures(), retrieving the target gene expression for each interaction from the query and multiplying it by the source expression from the signature to obtain cell scores. Yields a MuData object with the original query as "rna" and the computed cell scores as "cell_scores".

Input

adataAnnData

The query object, with log-normalised expression in .X.

signaturespd.DataFrame

Output of construct_signatures(), must have source_col and target_col present.

source_colstr, optional (default: "source")

The signatures column holding information on the source gene that was used to construct the reference signature. Will be present in the output.

target_colstr, optional (default: "target")

The signatures column holding information on the target gene, the expression of which is to be extracted from the query. Will be present in the output.

expbool, optional (default: True)

Whether to use the exponential formulation or simple multiplication.