Plot delNero2022 Catchment Areas
Source:R/plot_delNero2022_catchment_areas.R
plot_delNero2022_catchment_areas.Rd
This function generates a plot of the delNero2022 catchment areas, showing the adjusted genotypic frequency (GF) for a specified allele across the National Cancer Institute (NCI) catchment areas in the continental United States.
Usage
plot_delNero2022_catchment_areas(
query_allele,
sf_tract_centroids_for_all_states_with_catchment_with_us_population_race_code_percentages_by_tract_summed
)
Arguments
- query_allele
A character string specifying the allele to plot (e.g., "A*11:01").
- sf_tract_centroids_for_all_states_with_catchment_with_us_population_race_code_percentages_by_tract_summed
A spatial data frame containing tract centroids for all states, including catchment areas and US population race code percentages by tract, summed for the analysis.
Value
A ggplot2 object representing the plot of the catchment areas with the genotypic frequency for the specified allele.
Details
The function uses the
rnaturalearth
package to retrieve state boundaries and filters out non-continental states (e.g., Hawaii, Alaska, and territories).The coordinate reference system (CRS) is transformed to match the census data (EPSG: 4269).
The plot includes a base map of the continental United States and overlays the catchment areas with the genotypic frequency data.
The
viridis
color scale is used for better visualization of the genotypic frequency.