run UMAP on subset and project on the rest
runUMAPprojection(
gobject,
feat_type = NULL,
spat_unit = NULL,
expression_values = c("normalized", "scaled", "custom"),
reduction = c("cells", "feats"),
dim_reduction_to_use = "pca",
dim_reduction_name = NULL,
dimensions_to_use = 1:10,
random_subset = 500,
name = NULL,
feats_to_use = NULL,
return_gobject = TRUE,
n_neighbors = 40,
n_components = 2,
n_epochs = 400,
min_dist = 0.01,
n_threads = NA,
spread = 5,
set_seed = TRUE,
seed_number = 1234,
verbose = TRUE,
toplevel_params = deprecated(),
toplevel = 1L,
...
)
giotto object
feature type
spatial unit
expression values to use
'cells' or 'feats'
use another dimension reduction set as input
name of dimension reduction set to use
number of dimensions to use as input
random subset to perform UMAP on
arbitrary name for UMAP run
if dim_reduction_to_use = NULL, which features to use
boolean: return giotto object (default = TRUE)
UMAP param: number of neighbors
UMAP param: number of components
UMAP param: number of epochs
UMAP param: minimum distance
UMAP param: threads/cores to use
UMAP param: spread
use of seed
seed number to use
verbosity of function
deprecated
relative stackframe where call was made from
additional UMAP parameters
giotto object with updated UMAP dimension reduction
See umap
for more information about these and
other parameters.
Input for UMAP dimension reduction can be another dimension reduction (default = 'pca')
To use gene expression as input set dim_reduction_to_use = NULL
If dim_reduction_to_use = NULL, feats_to_use can be used to select a
column name of
highly variable genes (see calculateHVF
) or simply provide a
vector of genes
multiple UMAP results can be stored by changing the name of the analysis
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
#> 3.2 read Giotto spatial centroid information
#> 3.3 read Giotto spatial overlap information
#> 4. read Giotto image information
#> python already initialized in this session
#> active environment : '/usr/bin/python3'
#> python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#> "/usr/bin/python3"
runUMAPprojection(g)
#> Setting dimension reduction [cell][rna] umap.projection
#> An object of class giotto
#> >Active spat_unit: cell
#> >Active feat_type: rna
#> dimensions : 634, 624 (features, cells)
#> [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 umap.projection tsne
#> nearest neighbor networks --------
#> [cell][rna] sNN.pca custom_NN
#> attached images ------------------
#> images : alignment image
#>
#>
#> Use objHistory() to see steps and params used