mut_context {MutationalPatterns} | R Documentation

## Retrieve context of base substitutions

### Description

A function to extract the bases 3' upstream and 5' downstream of the base substitutions from the reference genome

### Usage

    mut_context(vcf, ref_genome)

### Arguments

`vcf` | A Granges object
`ref_genome` | Reference genome

### Value

Character vector with the context of the base substitutions

### See Also

`read_vcfs_as_granges`,

### Examples

    ## See the 'read_vcfs_as_granges()' example for how we obtained the
    ## following data:
    vcfs <- readRDS(system.file("states/read_vcfs_as_granges_output.rds",
                    package="MutationalPatterns"))

    ## Load the corresponding reference genome.
    ref_genome <- "BSgenome.Hsapiens.UCSC.hg19"
    library(ref_genome, character.only = TRUE)

    mut_context <- mut_context(vcfs[[1]], ref_genome)

[Package MutationalPatterns version 1.99.3 Index]