Harmonize the Principal Components previously calculated by runPCA
for a defined batch variable (batch_var
).
Arguments
- fcd
flow cytometry dataset.
- data_slot
name of the PCA data slot to use for harmonization. If no prefix was added the,
orig
.- batch_var
vector of column names from
fcd$anno$cell_anno
to use for correcting the data.- seed
A seed is set for reproducibility.
- prefix
Prefix for the output.
Value
The function returns a fcd with a harmonized Principal Components based on HarmonyMatrix
. If no prefix is added, the harmonized PCs are saved in fcd$pca$norm
.