Skip to contents

This function calculates and visualizes the genotypic frequencies of a specified allele across H3 hexagons within a given state. It uses census tract data, H3 hexagon resolution, and NMDP HLA frequencies to compute adjusted genotypic frequencies.

Usage

summarize_tract_genotypic_frequencies_by_h3_hexagon(
  state_abbreviation,
  query_allele,
  h3_resolution
)

Arguments

state_abbreviation

A string representing the state abbreviation, e.g., 'MA'.

query_allele

A string representing the allele to query, e.g., 'A*11:01'.

h3_resolution

An integer specifying the resolution of the H3 hexagon, e.g., 5.

Value

A list containing:

genotypic_frequencies_by_hexon

A data frame with genotypic frequencies summarized by H3 hexagon.

p1

A ggplot object visualizing the genotypic frequencies by H3 hexagon.

Examples

if (FALSE) { # \dontrun{
summarize_tract_genotypic_frequencies_by_h3_hexagon('MA', 'A*11:01', 5)
} # }