Skip to contents

Get a multiomics integration result from a Giotto object

Usage

getMultiomics(
  gobject = NULL,
  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"
)

getMultiomics(gobject = g, spat_unit = "cell", feat_type = "rna_protein")
#>               [,1]        [,2]       [,3]        [,4]        [,5]       [,6]
#>  [1,] -0.701836993  0.90639045  1.6667728 -1.25745550  0.37969672 -0.2013585
#>  [2,]  0.573351259 -0.77007572  1.0805134 -0.27499746  0.81051411 -1.7947501
#>  [3,]  0.653506513 -0.10392922  1.0956876  1.18512009  0.16798153 -1.5936760
#>  [4,]  1.102562583 -0.59883015 -0.8235445  0.03108054 -0.82634150 -0.5880921
#>  [5,] -0.331979510  0.86307592 -0.7896969 -0.20427061  0.48015487 -2.4436502
#>  [6,] -0.006015914  1.53498056 -2.2300375 -1.34758305 -0.22734637  0.8733072
#>  [7,]  0.542548136 -0.07677495  1.2682960  0.32840023 -0.38144334 -1.5700947
#>  [8,]  1.073179083  0.36398407  0.7477098  1.50785612 -0.51130892  1.2064433
#>  [9,]  0.431113801  0.80003990  0.2902944  0.51282324  1.61615062 -0.6020315
#> [10,]  0.899647924 -1.51114608 -0.2336790  0.27261523  0.05862038  0.6160790
#>              [,7]        [,8]        [,9]       [,10]
#>  [1,] -0.29940886  0.61040765  0.21277709 -0.43014614
#>  [2,] -0.54314989  0.86164700 -0.36930863 -0.23013339
#>  [3,] -0.11165896  0.88285986 -0.10648446  1.82750672
#>  [4,] -0.59879136  0.25782948 -0.52105633  1.63416402
#>  [5,] -0.64283303 -2.41919619 -0.31239384 -0.30347819
#>  [6,] -2.18494492  0.98255604 -1.73132386  0.05761964
#>  [7,]  0.11409361  0.73347719  1.46947149 -0.50750744
#>  [8,]  0.01148282  0.76860157  0.01044213 -1.61633811
#>  [9,]  0.35329552 -0.01777067  0.40827683  0.89181656
#> [10,]  2.29670311 -1.10088452  1.70418504 -0.03268551