Skip to contents

Plots the distance to integer copy number (dis_integer_CN) as a function of purity (rho), with the minimum distance point highlighted.

Usage

PlotCovDisCN(dis, purity, min_dis, prefix, out_dir)

Arguments

dis

Data frame or tibble. Must include columns rho and dis_integer_CN.

purity

Numeric. The selected purity value to highlight.

min_dis

Numeric. The minimum distance to integer copy number to highlight.

prefix

Character. Output file prefix.

out_dir

Character. Output directory for saving the plot.

Value

Invisibly returns the ggplot object (or FALSE if plotting failed). The plot is saved as a PNG file in the output directory.

Examples

# PlotCovDisCN(dis, purity = 0.7, min_dis = 2, prefix = "Sample1", out_dir = "results/")