Description Usage Arguments Value See Also Examples
A function to extract the bases 3' upstream and 5' downstream of the base substitution types.
1 | type_context(vcf, ref_genome, extension = 1)
|
vcf |
A CollapsedVCF object |
ref_genome |
Reference genome |
extension |
The number of bases, that's extracted upstream and downstream of the base substitutions. (Default: 1). |
Mutation types and context character vectors in a named list
read_vcfs_as_granges
,
mut_context
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## 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)
## Get type context
type_context <- type_context(vcfs[[1]], ref_genome)
## Get larger type context
type_context_larger <- type_context(vcfs[[1]], ref_genome, extension = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.