run UMAP
runGiottoHarmony(
gobject,
spat_unit = NULL,
feat_type = NULL,
vars_use = "list_ID",
do_pca = FALSE,
expression_values = c("normalized", "scaled", "custom"),
reduction = "cells",
dim_reduction_to_use = "pca",
dim_reduction_name = NULL,
dimensions_to_use = 1:10,
name = NULL,
feats_to_use = NULL,
set_seed = TRUE,
seed_number = 1234,
toplevel_params = 2,
return_gobject = TRUE,
verbose = NULL,
...
)
giotto object
spatial unit
feature type
If meta_data is dataframe, this defines which variable(s) to remove (character vector).
Whether to perform PCA on input matrix.
expression values to use
reduction on cells or features
use another dimension reduction set as input
name of dimension reduction set to use
number of dimensions to use as input
arbitrary name for Harmony run
if dim_reduction_to_use = NULL, which feats to use
use of seed
seed number to use
parameters to extract
boolean: return giotto object (default = TRUE)
be verbose
additional HarmonyMatrix
parameters
giotto object with updated Harmony dimension reduction
This is a simple wrapper for the HarmonyMatrix function in the Harmony package doi:10.1038/s41592-019-0619-0 .
g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> cell_spatInfo_spatVector.shp
#> cell
#>
#> 3.2 read Giotto spatial centroid information
#> cell
#>
#> 3.3 read Giotto spatial overlap information
#> No overlaps were found, overlap loading will be
#> skipped
#>
#> 4. read Giotto image information
#> a giotto python environment was found
#> Using python path:
#> "/Users/yuanlab/Library/r-miniconda/envs/giotto_env/bin/pythonw"
runGiottoHarmony(g, vars_use = "leiden_clus")
#> using 'Harmony' to integrate different datasets. If used in
#> published research, please cite:
#> Korsunsky, I., Millard, N., Fan, J. et al.
#> Fast, sensitive and accurate integration of single-cell data with Harmony.
#> Nat Methods 16, 1289-1296 (2019).
#> https://doi.org/10.1038/s41592-019-0619-0
#> Transposing data matrix
#> Initializing state using k-means centroids initialization
#> Harmony 1/10
#> Harmony 2/10
#> Harmony 3/10
#> Harmony 4/10
#> Harmony converged after 4 iterations
#> An object of class giotto
#> >Active spat_unit: cell
#> >Active feat_type: rna
#> [SUBCELLULAR INFO]
#> polygons : cell
#> [AGGREGATE INFO]
#> expression -----------------------
#> [cell][rna] raw normalized scaled
#> spatial locations ----------------
#> [cell] raw
#> spatial networks -----------------
#> [cell] Delaunay_network spatial_network
#> spatial enrichments --------------
#> [cell][rna] cluster_metagene DWLS
#> dim reduction --------------------
#> [cell][rna] pca custom_pca umap custom_umap tsne harmony
#> nearest neighbor networks --------
#> [cell][rna] sNN.pca custom_NN
#> attached images ------------------
#> images : alignment image
#>
#>
#> Use objHistory() to see steps and params used