Learn R Programming

SomaticSignatures (version 2.8.4)

mutation-distribution: Distributions of mutational locations.

Description

Summary and plotting function for characterizing the distributions of mutations along the genome.

Usage

mutationDistance(x)
plotRainfall(x, group, size = 2, alpha = 0.5, space.skip = 0, ...)

Arguments

x
A 'GRanges' or 'VRanges' object [required].
group
The variable name for color groups [optional].
size
Point size [default: 2]
alpha
Alpha value for points [default: 0.5]
space.skip
Space between chromosomes, as defined by 'plotGrandLinear' [default: 0]
...
Additional arguments passed to 'plotGrandLinear'

Value

  • mutationDensityThe position-sorted GRanges 'x' with the additional column 'distance', specifying the distance from the previous mutation (or the beginning of the chromosome if it happens to be the first mutation on the chromosome.)
  • plotRainfallObject of class 'ggbio', as returned by 'plotGrandLinear'.

See Also

plotGrandLinear from the 'ggbio' package

Examples

Run this code

library(GenomicRanges)
library(IRanges)

set.seed(1)
chr_len = 100
gr = GRanges(rep(1:3, each = 10),
  IRanges(start = sample.int(chr_len, 30, replace = FALSE), width = 1),
  mutation = sample(c("A", "C", "G", "T"), 30, replace = TRUE))
seqlengths(gr) = rep(chr_len, 3)

p = plotRainfall(gr)
print(p)

Run the code above in your browser using DataLab