Skip to contents

Extract hexagonal bin mean coordinates and the corresponding standardize counts.

Usage

extract_hexbin_mean(data_hb, counts_df, centroids_df)

Arguments

data_hb

A tibble with embedding components and hexagonal bin IDs.

counts_df

A tibble that contains hexagon IDs with the standardise number of points within each hexagon.

centroids_df

A tibble that contains all hexagonal bin centroid coordinates with hexagon IDs.

Value

A tibble contains hexagon ID, bin mean coordinates, and standardize counts.

Examples

all_centroids_df <- s_curve_obj$s_curve_umap_hb_obj$centroids
counts_df <- s_curve_obj$s_curve_umap_hb_obj$std_cts
umap_with_hb_id <- s_curve_obj$s_curve_umap_hb_obj$data_hb_id
extract_hexbin_mean(data_hb = umap_with_hb_id, counts_df = counts_df,
centroids_df = all_centroids_df)
#> # A tibble: 20 × 6
#>    hexID      c_x     c_y bin_counts std_counts drop_empty
#>    <int>    <dbl>   <dbl>      <int>      <dbl> <lgl>     
#>  1     1  0.0188   0.0236         17     0.0302 FALSE     
#>  2     2  0.201    0.0227        169     0.300  FALSE     
#>  3     3  0.553    0.0594         34     0.0604 FALSE     
#>  4     4 NA       NA              NA    NA      TRUE      
#>  5     5  0.0887   0.149         431     0.766  FALSE     
#>  6     6  0.404    0.179         430     0.764  FALSE     
#>  7     7  0.691    0.213         407     0.723  FALSE     
#>  8     8  0.922    0.286          57     0.101  FALSE     
#>  9     9 NA       NA              NA    NA      TRUE      
#> 10    10 NA       NA              NA    NA      TRUE      
#> 11    11  0.618    0.342          82     0.146  FALSE     
#> 12    12  0.860    0.424         367     0.652  FALSE     
#> 13    13  0.0917   0.777         442     0.785  FALSE     
#> 14    14  0.383    0.765         478     0.849  FALSE     
#> 15    15  0.700    0.750         563     1      FALSE     
#> 16    16 NA       NA              NA    NA      TRUE      
#> 17    17  0.00598  0.928          26     0.0462 FALSE     
#> 18    18  0.218    0.912         149     0.265  FALSE     
#> 19    19  0.542    0.907          98     0.174  FALSE     
#> 20    20 NA       NA              NA    NA      TRUE