plot_lesion_segregation: Plot the strands of variants to show lesion segregation

Description Usage Arguments Value See Also Examples

View source: R/plot_lesion_segregation.R

Description

The strands of variants in a GRanges object is plotted. This way the presence of any lesion segregation is visualized.

Usage

1
plot_lesion_segregation(vcf, per_chrom = FALSE, sample_name = NA)

Arguments

vcf

GRanges object

per_chrom

Boolean. Determines whether to create a separate plot per chromosome

sample_name

Name of the sample

Value

ggplot2 object

See Also

calculate_lesion_segregation

Other Lesion_segregation: calculate_lesion_segregation()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## See the 'read_vcfs_as_granges()' example for how we obtained the
## following data:
grl <- readRDS(system.file("states/read_vcfs_as_granges_output.rds",
  package = "MutationalPatterns"
))
## Select a single GRanges object to plot.
gr <- grl[[1]]

## Plot lesion segregation
plot_lesion_segregation(gr, sample_name = "Colon1")

## Plot lesion segregation per chromosome
plot_lesion_segregation(gr, per_chrom = TRUE, sample_name = "Colon1")

MutationalPatterns documentation built on Nov. 14, 2020, 2:03 a.m.