Skip to contents

Get a multiomics integration result from a Giotto object

Usage

get_multiomics(
  gobject,
  spat_unit = NULL,
  feat_type = NULL,
  integration_method = "WNN",
  result_name = "theta_weighted_matrix"
)

Arguments

gobject

A Giotto object

spat_unit

spatial unit (e.g. 'cell')

feat_type

integrated feature type (e.g. 'rna_protein')

integration_method

multiomics integration method used. Default = 'WNN'

result_name

Default = 'theta_weighted_matrix'

Value

A multiomics integration result (e.g. theta_weighted_matrix from WNN)

Examples

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 : 'giotto_env'
#>  python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#>  "/usr/share/miniconda/envs/giotto_env/bin/python"
g <- setMultiomics(
    gobject = g, result = matrix(rnorm(100), nrow = 10),
    spat_unit = "cell", feat_type = "rna_protein"
)

get_multiomics(gobject = g, spat_unit = "cell", feat_type = "rna_protein")
#>             [,1]        [,2]       [,3]       [,4]       [,5]        [,6]
#>  [1,]  1.1884979  1.47605219 -1.9719497  1.7008620 -1.1675388 -0.05642605
#>  [2,] -0.6211862 -0.07589098 -0.4848200 -0.4662269 -0.7923482  1.19142146
#>  [3,] -0.4248148  0.62842700 -1.3848879 -0.3168777 -0.3003550 -0.02745457
#>  [4,] -1.2693983  0.19674511 -0.1762610 -1.2131392  0.1794639  0.88144485
#>  [5,] -0.2533625  0.08158049  0.2596137  0.2466786 -0.9374372 -3.09168198
#>  [6,] -0.1116180 -0.89830298 -0.2510197  0.1118254  1.4479660  1.12917805
#>  [7,] -0.1315426 -0.61990929 -1.0445444 -1.0078516  1.3361280  1.96047642
#>  [8,]  0.8725992 -1.06214909 -2.0920704  1.2416995  0.4995538  0.24592419
#>  [9,] -0.1657629  0.78311754 -0.5391583  1.3815616 -2.7557557 -0.43052706
#> [10,] -1.2409544 -2.78007372 -1.5206390 -2.5197112  0.4713136 -0.28259708
#>              [,7]       [,8]        [,9]       [,10]
#>  [1,] -0.37221254 -0.4087357 -0.87151065  1.04067074
#>  [2,]  0.18263134 -2.2371918 -0.50174591  0.48370651
#>  [3,]  0.06055847  1.6845247  0.61345388 -1.38514216
#>  [4,] -0.28844587  0.8478142 -2.27293071 -0.98822934
#>  [5,]  1.40416927 -1.4393261 -0.02903636 -0.81254630
#>  [6,]  1.96437541  0.7074581 -1.31878087 -0.03695966
#>  [7,] -1.76916228  2.4144420 -1.59245568  0.12226510
#>  [8,]  0.11502054 -0.9043406 -0.15879473 -0.74855108
#>  [9,] -0.47298787  0.4745312  0.39397965  0.09353390
#> [10,] -0.95256772 -0.6146149  0.01302273  1.73000527