Function that plots copy number segments as log2 fold change relative to tumor ploidy, i.e. log2(total_cn / ploidy). Segments with gains (log2FC > 0) and losses (log2FC < 0) are shown in contrasting colors. Two reference lines are drawn: one at y = 0 (neutral/diploid state) and one at log2(amp_threshold_effective / ploidy) marking the amplification cutoff.
Usage
plot_cna_segments_relative(
chrom_coordinates = NULL,
cna_segment = NULL,
cna_gene = NULL,
tumor_ploidy = 2,
amp_threshold_effective = 5,
threshold_mode = "absolute",
gain_threshold_effective = 3,
del_threshold_effective = 1,
color_palette = pcgrr::color_palette
)Arguments
- chrom_coordinates
data frame with assembly-specific chromosome coordinate data
- cna_segment
data frame with annotated copy number segments
- cna_gene
data frame with gene-level copy number data
- tumor_ploidy
numeric tumor ploidy used as the log2FC baseline (default 2)
- amp_threshold_effective
numeric effective amplification threshold in absolute copy number units (converted to log2FC for the reference line)
- threshold_mode
character thresholding mode applied to all CNA tiers: "absolute", "relative", or "combined". The amplification threshold line is shown only when mode is "relative" or "combined". Default "absolute".
- gain_threshold_effective
numeric effective gain threshold in absolute copy number units (converted to log2FC for the reference line). Default 3.
- del_threshold_effective
numeric effective heterozygous deletion threshold in absolute copy number units (converted to log2FC for the reference line). Default 1.
