cytonormpy.CytoNorm.run_anndata_setup#
- CytoNorm.run_anndata_setup(adata, layer='compensated', reference_column='reference', reference_value='ref', batch_column='batch', sample_identifier_column='file_name', n_cells_reference=None, channels='markers', key_added='cyto_normalized', copy=False)#
Method to setup the data handling for anndata objects. Will instantiate a
DataHandlerAnnDataobject.- Parameters:
adata (
AnnData) – The AnnData objectlayer (
str) – The layer in adata.uns containing the compensated expression valuesreference_column (
str) – The column in adata.obs that specifies whether a sample is used for reference and is therefore present in all batches.reference_value (
str) – Specifies the value that is considered a reference. Defaults to ‘ref’batch_column (
str) – The column in adata.obs that specifies the batch.sample_identifier_column (
str) – Specifies the column in adata.obs that is unique to the samples.n_cells_reference (
Optional[int]) – If there are no reference samples for a batch, this number will define how many cells from a batch are subsampled to comprise the new reference file.channels (
Union[list[str],str,Literal['all','markers']]) – Can be a list of detectors (e.g. BV421-A), a single channel or ‘all’ or ‘markers’. If markers, channels containing ‘FSC’, ‘SSC’, ‘Time’, ‘AF’ and CyTOF technicals will be excluded.key_added (
str) – The name of the layer in adata.layers where the normalized data are inserted to.
- Return type:
None, appends ._datahandler attribute.