plot_lesion_segregation {MutationalPatterns} | R Documentation

## Plot the strands of variants to show lesion segregation

### Description

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

### Usage

    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

    ## 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")

[Package MutationalPatterns version 3.0.1 Index]