Creates a circos plot of genomic fusions, with options to highlight specific fusions and annotate links based on breakpoint types. Data input should ideally be generated from the 'get_fusions_from_vcf' function

plot_fusions(sv_data, highlight = NULL, annotate = FALSE, title = "")

Arguments

sv_data

A data frame containing fusion data with at least the columns `chr1`, `chr2`, `start1`, and `start2`. If `annotate=TRUE`, must also include `bp1_type` and `bp2_type` columns.

highlight

Integer vector of row indices to highlight with a thicker black line. Default is NULL.

annotate

Logical; whether to color-code links based on fusion types (genic vs. intergenic). Default is FALSE.

title

Character; title for the plot. Default is empty string.

Value

Invisibly returns NULL, but creates a circos plot as a side effect.

Details

The function creates a circos plot showing genomic fusions. When `annotate=TRUE`, fusions are color-coded: - Red: gene-gene fusions (both breakpoints are genic) - Blue: mixed fusions (one breakpoint is genic, the other intergenic) - Green: intergenic fusions (both breakpoints are intergenic)

Examples

if (FALSE) { # \dontrun{
# Basic plot
plot_fusions(fusions)

# Highlight the first three fusions and add annotation
plot_fusions(fusions, highlight = 1:3, annotate = TRUE,
             title = "Genomic Fusions with Highlighted Examples")
} # }