anndict.annotate.harmony_label_transfer#
- anndict.annotate.harmony_label_transfer(origin_adata, destination_adata, origin_subset_column, label_column)[source]#
Perform Harmony integration and transfer labels from
origin_adatatodestination_adata.This function subsets
origin_adatabased on a provided column to get the cells that match in the same column ofdestination_adata. It then performs Harmony integration on the combined dataset and transfers the specified label column from origin_adata todestination_adata.- Parameters:
- origin_adata
AnnData The origin AnnData object containing the reference data and labels.
- destination_adata
AnnData The AnnData object to which labels will be transferred.
- origin_subset_column
str The column name in
origin_adata.obsused for subsettingorigin_adatato matchdestination_adata.- label_column
str The column name in
origin_adata.obscontaining the labels to be transferred.
- origin_adata
- Return type:
None- Returns:
None
Notes
Modifies
destination_adatain-place, adding a new column ‘harmony_labels’ inadata_to_label.obscontaining the transferred labels.