Skip to contents

combine feature data information

Usage

combineFeatureOverlapData(
  gobject,
  feat_type = "rna",
  sel_feats = NULL,
  poly_info = "cell"
)

Arguments

gobject

giotto object

feat_type

feature type

sel_feats

selected features (default: NULL or no selection)

poly_info

polygon information name

Value

data.table with combined spatial polygon 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"

combineFeatureOverlapData(g, poly_info = "aggregate")
#> $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
#>    ---                                                                         
#> 32067:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#> 32068:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#> 32069:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#> 32070:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#> 32071:  Vmn2r1        7   1.515152   41.22525 0.08923213      5.889321       no
#>              var    hvf  geom  part        x         y  hole
#>            <num> <char> <int> <num>    <num>     <num> <num>
#>     1: 3.2630074    yes   327     1 6434.212 -4994.575     0
#>     2: 3.2630074    yes   372     1 6435.822 -4993.068     0
#>     3: 3.2630074    yes   387     1 6436.190 -4993.599     0
#>     4: 3.2630074    yes   389     1 6436.225 -4994.331     0
#>     5: 3.2630074    yes  3476     1 6583.026 -5109.118     0
#>    ---                                                      
#> 32067: 0.9765725     no 12671     1 6835.198 -4821.361     0
#> 32068: 0.9765725     no 13128     1 6850.250 -4791.958     0
#> 32069: 0.9765725     no 15407     1 6432.064 -5016.469     0
#> 32070: 0.9765725     no 21939     1 6742.455 -4972.980     0
#> 32071: 0.9765725     no 31289     1 6876.786 -5032.958     0
#>                                        poly_ID feat_ID_uniq stack poly_info
#>                                         <char>        <num> <num>    <char>
#>     1: 304842190541754537761816256358565562302         1414     1 aggregate
#>     2: 304842190541754537761816256358565562302         1534     1 aggregate
#>     3: 304842190541754537761816256358565562302         1574     1 aggregate
#>     4: 304842190541754537761816256358565562302         1578     1 aggregate
#>     5: 183227745956657225549068107012033843521         8860     1 aggregate
#>    ---                                                                     
#> 32067: 134146760472988945324695838070256730703        30405     1 aggregate
#> 32068: 248026342734562151407765229569772513183        31685     1 aggregate
#> 32069:  21934936165997373583174173761929761438        37793     2 aggregate
#> 32070: 293490979527928845906184572736930005899        53817     2 aggregate
#> 32071: 236938169420664432126575547704304293443        78156     2 aggregate
#>          feat
#>        <char>
#>     1:    rna
#>     2:    rna
#>     3:    rna
#>     4:    rna
#>     5:    rna
#>    ---       
#> 32067:    rna
#> 32068:    rna
#> 32069:    rna
#> 32070:    rna
#> 32071:    rna
#>