This function generates a histogram of BAF (B-allele frequency) values. It supports options for adding estimated and expected peaks, area colors, and filtering homozygous calls.
plot_baf_hist(
data_sample,
area_single,
ploidy,
colors = FALSE,
add_estimated_peaks = TRUE,
add_expected_peaks = FALSE,
BAF_hist_overall = FALSE,
ratio = FALSE,
rm_homozygous = FALSE,
font_size = 12
)A ggplot object representing the BAF histogram.
A data.frame containing BAF and genomic position information. Must include columns `Chr`, `Position`, and `sample`.
Numeric value defining the area around the expected peak to be considered.
Integer or vector specifying the expected ploidy. If a vector, it must match the number of chromosomes in `data_sample`.
Logical. If TRUE, adds area colors to the histogram. Default is FALSE.
Logical. If TRUE, adds lines for estimated peaks. Default is TRUE.
Logical. If TRUE, adds lines for expected peaks. Default is FALSE.
Logical. If TRUE, plots the BAF histogram for the entire genome. Default is FALSE.
Logical. If TRUE, plots the raw ratio instead of BAF. Default is FALSE.
Logical. If TRUE, removes homozygous calls from the histogram. Default is FALSE.
Numeric value for the font size of plot labels. Default is 12.