This function maps points to their corresponding hexagonal bins based on the provided data frames.
Arguments
- full_grid_with_hexbin_id
A data frame with hexagonal bin IDs and coordinates.
- nldr_data_with_hb_id
A data frame with 2D embedding data and hexagonal bin IDs.
Examples
num_bins_x <- 4
shape_value <- 1.833091
hexbin_data_object <- extract_hexbin_centroids(nldr_df = s_curve_noise_umap,
num_bins = num_bins_x, shape_val = shape_value)
df_bin_centroids <- hexbin_data_object$hexdf_data
full_centroid_df <- generate_full_grid_centroids(df_bin_centroids)
hex_grid <- full_hex_grid(full_centroid_df)
full_grid_with_hexbin_id <- map_hexbin_id(full_centroid_df, df_bin_centroids)
UMAP_data_with_hb_id <- s_curve_noise_umap |> dplyr::mutate(hb_id = hexbin_data_object$hb_data@cID)
find_pts_in_hexbins(full_grid_with_hexbin_id, nldr_data_with_hb_id = UMAP_data_with_hb_id)
#> hexID pts
#> 1 6 1, 17, 31, 39, 54, 64, 66
#> 2 24 2, 8, 11, 25, 67, 69, 74
#> 3 29 3, 34, 41, 56, 59, 60
#> 4 2 4, 24, 63, 71, 87, 97
#> 5 12 6, 21
#> 6 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 7 24 2, 8, 11, 25, 67, 69, 74
#> 8 18 9, 14, 19, 23, 38, 40, 43, 80
#> 9 24 2, 8, 11, 25, 67, 69, 74
#> 10 45 12, 16, 45, 65, 75, 76, 81
#> 11 18 9, 14, 19, 23, 38, 40, 43, 80
#> 12 11 15, 44
#> 13 45 12, 16, 45, 65, 75, 76, 81
#> 14 6 1, 17, 31, 39, 54, 64, 66
#> 15 18 9, 14, 19, 23, 38, 40, 43, 80
#> 16 39 20, 22, 72, 79, 89, 94, 95, 100
#> 17 12 6, 21
#> 18 39 20, 22, 72, 79, 89, 94, 95, 100
#> 19 18 9, 14, 19, 23, 38, 40, 43, 80
#> 20 2 4, 24, 63, 71, 87, 97
#> 21 24 2, 8, 11, 25, 67, 69, 74
#> 22 1 26, 46
#> 23 6 1, 17, 31, 39, 54, 64, 66
#> 24 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 25 29 3, 34, 41, 56, 59, 60
#> 26 7 35, 57, 77, 84, 99
#> 27 13 37, 55
#> 28 18 9, 14, 19, 23, 38, 40, 43, 80
#> 29 6 1, 17, 31, 39, 54, 64, 66
#> 30 18 9, 14, 19, 23, 38, 40, 43, 80
#> 31 29 3, 34, 41, 56, 59, 60
#> 32 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 33 18 9, 14, 19, 23, 38, 40, 43, 80
#> 34 11 15, 44
#> 35 45 12, 16, 45, 65, 75, 76, 81
#> 36 1 26, 46
#> 37 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 38 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 39 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 40 6 1, 17, 31, 39, 54, 64, 66
#> 41 13 37, 55
#> 42 29 3, 34, 41, 56, 59, 60
#> 43 7 35, 57, 77, 84, 99
#> 44 29 3, 34, 41, 56, 59, 60
#> 45 29 3, 34, 41, 56, 59, 60
#> 46 38 62, 93
#> 47 2 4, 24, 63, 71, 87, 97
#> 48 6 1, 17, 31, 39, 54, 64, 66
#> 49 45 12, 16, 45, 65, 75, 76, 81
#> 50 6 1, 17, 31, 39, 54, 64, 66
#> 51 24 2, 8, 11, 25, 67, 69, 74
#> 52 24 2, 8, 11, 25, 67, 69, 74
#> 53 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 54 2 4, 24, 63, 71, 87, 97
#> 55 39 20, 22, 72, 79, 89, 94, 95, 100
#> 56 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 57 24 2, 8, 11, 25, 67, 69, 74
#> 58 45 12, 16, 45, 65, 75, 76, 81
#> 59 45 12, 16, 45, 65, 75, 76, 81
#> 60 7 35, 57, 77, 84, 99
#> 61 44 7, 33, 42, 47, 51, 52, 70, 73, 78
#> 62 39 20, 22, 72, 79, 89, 94, 95, 100
#> 63 18 9, 14, 19, 23, 38, 40, 43, 80
#> 64 45 12, 16, 45, 65, 75, 76, 81
#> 65 7 35, 57, 77, 84, 99
#> 66 2 4, 24, 63, 71, 87, 97
#> 67 39 20, 22, 72, 79, 89, 94, 95, 100
#> 68 28 91
#> 69 38 62, 93
#> 70 39 20, 22, 72, 79, 89, 94, 95, 100
#> 71 39 20, 22, 72, 79, 89, 94, 95, 100
#> 72 17 96
#> 73 2 4, 24, 63, 71, 87, 97
#> 74 7 35, 57, 77, 84, 99
#> 75 39 20, 22, 72, 79, 89, 94, 95, 100