| type_context {MutationalPatterns} | R Documentation |
A function to extract the bases 3' upstream and 5' downstream of the base substitution types.
type_context(vcf, ref_genome)
vcf |
A CollapsedVCF object |
ref_genome |
Reference genome |
Mutation types and context character vectors in a named list
read_vcfs_as_granges,
mut_context
## 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)
type_context <- type_context(vcfs[[1]], ref_genome)