Skip to contents

combine feature data information

Usage

combineFeatureData(
  gobject,
  feat_type = NULL,
  spat_unit = NULL,
  sel_feats = NULL
)

Arguments

gobject

giotto object

feat_type

feature type

spat_unit

spatial unit

sel_feats

selected features (default: NULL or no selection)

Value

data.table with combined spatial feature information

Examples

g <- GiottoData::loadGiottoMini("vizgen")
#> 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"

combineFeatureData(g, spat_unit = "aggregate", feat_type = "rna")
#> $rna
#> Key: <feat_ID>
#>        feat_ID nr_cells perc_cells total_expr  mean_expr mean_expr_det hvg_orig
#>         <char>    <int>      <num>      <num>      <num>         <num>   <char>
#>     1:   Abcc9       10   2.164502   71.39463 0.15453382      7.139463       no
#>     2:   Abcc9       10   2.164502   71.39463 0.15453382      7.139463       no
#>     3:   Abcc9       10   2.164502   71.39463 0.15453382      7.139463       no
#>     4:   Abcc9       10   2.164502   71.39463 0.15453382      7.139463       no
#>     5:   Abcc9       10   2.164502   71.39463 0.15453382      7.139463       no
#>    ---                                                                         
#> 79757:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#> 79758:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#> 79759:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#> 79760:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#> 79761:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#>              var    hvf  geom  part        x         y  hole global_z
#>            <num> <char> <int> <num>    <num>     <num> <num>    <int>
#>     1: 3.2630074    yes    52     1 6401.822 -5074.172     0        0
#>     2: 3.2630074    yes  1405     1 6434.212 -4994.575     0        0
#>     3: 3.2630074    yes  1524     1 6435.822 -4993.068     0        0
#>     4: 3.2630074    yes  1564     1 6436.190 -4993.599     0        0
#>     5: 3.2630074    yes  1568     1 6436.225 -4994.331     0        0
#>    ---                                                               
#> 79757: 0.9765725     no 55606     1 6755.787 -4842.521     0        1
#> 79758: 0.9765725     no 64289     1 6788.817 -4766.861     0        1
#> 79759: 0.9765725     no 64391     1 6789.242 -4927.838     0        1
#> 79760: 0.9765725     no 65159     1 6792.122 -4894.507     0        1
#> 79761: 0.9765725     no 77586     1 6876.786 -5032.958     0        1
#>        feat_ID_uniq   feat spat_unit
#>               <int> <char>    <char>
#>     1:           52    rna aggregate
#>     2:         1414    rna aggregate
#>     3:         1534    rna aggregate
#>     4:         1574    rna aggregate
#>     5:         1578    rna aggregate
#>    ---                              
#> 79757:        56040    rna aggregate
#> 79758:        64767    rna aggregate
#> 79759:        64870    rna aggregate
#> 79760:        65645    rna aggregate
#> 79761:        78156    rna aggregate
#>