FACSPy.tl.correct_expression

FACSPy.tl.correct_expression#

FACSPy.tl.correct_expression(adata, layer='compensated', use_only_fluo=True, batch_key='batch', embedding_key='X_pca', reference_samples=None, reference_key=None, reference_value=None, key_added='integrated', n_comps=20, return_matrix=False, copy=False)#

Function to correct the expression values based on a joint PCA embedding.

Parameters:
  • embedding_key (str) – key in adata.obsm that stores the integrated embedding

  • reference_samples (Optional[list[str]]) – a list of sample_IDs corresponding to the reference samples. Will be combined the batch_key information to extract reference samples

  • reference_key (Optional[str]) – Key of the .obs slot column that points to the reference samples

  • reference_value (Optional[str]) – specifies the value which marks the reference samples, e.g. “ref”. Other values will be ignored and treated as non-reference samples

  • key_added (str) – Key in adata.layers that stores the corrected expression matrix

  • iterations – repeat the PCA correction step n times

Returns:

  • If copy, the anndata instance with new layers