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
- adata
AnnData The query object, with log-normalised expression in
.X.- signatures
pd.DataFrame Output of
construct_signatures(), must havesource_colandtarget_colpresent.- source_col
str, optional (default:"source") The
signaturescolumn holding information on the source gene that was used to construct the reference signature. Will be present in the output.- target_col
str, optional (default:"target") The
signaturescolumn holding information on the target gene, the expression of which is to be extracted from the query. Will be present in the output.- exp
bool, optional (default:True) Whether to use the exponential formulation or simple multiplication.
- adata