Function to get expression values from giotto object
Usage
getExpression(
gobject,
values = NULL,
spat_unit = NULL,
feat_type = NULL,
output = c("exprObj", "matrix"),
set_defaults = TRUE
)Arguments
- gobject
giotto object
- values
expression values to extract (e.g. "raw", "normalized", "scaled")
- spat_unit
spatial unit (e.g. "cell")
- feat_type
feature type (e.g. "rna", "dna", "protein")
- output
what object type to retrieve the expression as. Currently either matrix' for the matrix object contained in the exprObj or 'exprObj' (default) for the exprObj itself are allowed.
- set_defaults
set default spat_unit and feat_type. Change to FALSE only when expression and spat_info are not expected to exist.
See also
Other expression accessor functions:
setExpression()
Other functions to get data from giotto object:
getCellMetadata(),
getDimReduction(),
getFeatureInfo(),
getFeatureMetadata(),
getGiottoImage(),
getMultiomics(),
getNearestNetwork(),
getPolygonInfo(),
getSpatialEnrichment(),
getSpatialGrid(),
getSpatialLocations(),
getSpatialNetwork(),
get_multiomics()
Examples
g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 4. read Giotto image information
#> python already initialized in this session
#> active environment : '/usr/bin/python3'
#> python version : 3.12
getExpression(g)
#> An object of class exprObj : "raw"
#> spat_unit : "cell"
#> feat_type : "rna"
#> provenance: cell
#>
#> contains:
#> 634 x 624 sparse Matrix of class "dgCMatrix"
#>
#> Gna12 1 2 1 1 9 1 3 5 3 . . 10 7 ......
#> Ccnd2 . 1 1 . . 1 . 1 1 . . . 3 ......
#> Btbd17 . 1 1 1 . . 2 . . . . . . ......
#>
#> ........suppressing 611 columns and 628 rows
#>
#> Gm19935 . 1 . . . . . . . . 1 . . ......
#> 9630013A20Rik . . . . . . . . . . 1 . . ......
#> 2900040C04Rik 1 . . . . . . . . 1 . . . ......
#>
#> First four colnames:
#> AAAGGGATGTAGCAAG-1 AAATGGCATGTCTTGT-1
#> AAATGGTCAATGTGCC-1 AAATTAACGGGTAGCT-1
