get_indel_context: Get indel contexts

Description Usage Arguments Details Value See Also Examples

View source: R/get_indel_context.R

Description

Get indel contexts

Usage

1
get_indel_context(vcf_list, ref_genome)

Arguments

vcf_list

GRanges or GRangesList object containing Indel mutations. The mutations should be called similarly to HaplotypeCaller.

ref_genome

BSGenome reference genome object

Details

Determines the COSMIC context from a GRanges or GRangesList object containing Indel mutations. It applies the get_indel_context_gr function to each gr in the input.

Value

A modified version of the input grl. In each gr two columns have been added. "muttype" showing the main indel type and "muttype_sub" which shows the subtype. The subtype is either the number of repeats or the microhomology length.

See Also

read_vcfs_as_granges, get_mut_type

Other Indels: count_indel_contexts(), plot_compare_indels(), plot_indel_contexts(), plot_main_indel_contexts()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Get a GRangesList or GRanges object with only indels.
## See 'read_vcfs_as_granges' or 'get_mut_type' for more info on how to do this.
indel_grl <- readRDS(system.file("states/blood_grl_indel.rds",
  package = "MutationalPatterns"
))

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

## Get the indel contexts
get_indel_context(indel_grl, ref_genome)

MutationalPatterns documentation built on Nov. 14, 2020, 2:03 a.m.