compute_signed_score

besca.tl.sig.compute_signed_score(adata, signature_dict, method='scanpy', overwrite=False, verbose=False, use_raw=None)[source]

Compute signed score combining UP and DN for all signatures in signature_dict This function combines genesets (signatures) scores. Results are stored in adata.obs with the key: “score_” + method + signature_name. Multiples methods can be used to compute geneset scores. The scanpy method is the score_gene method. Combination of the scores is done substracting UP and DN (scanpy = UP - DN). Method in development. Not all options implemented yet.

Parameters:
  • adata (class:~anndata.AnnData) – An AnnData object (from scanpy). Following besca convention, var names (gene) are HGNC symbol and should match the signatures values.

  • signature_dict (dict) – a dictionary of signature. Nested dictionnaries, key: signature names Values are a dict with keys as the directions (UP/DN) and genes names in values.

  • method (str | default = scanpy) – a string indicating which method to use (‘scanpy’ available)

  • overwrite (boolean | default = False) – If False, will parse the data.obs to only recompute scores that are not present.

  • use_raw (boolean | default = None) –

Return type:

None