get_indel_context: Get indel contexts

View source: R/get_indel_context.R

get_indel_contextR Documentation

Get indel contexts

Description

Get indel contexts

Usage

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. It searches for repeat units both to the left and right of the indel.

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


## 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)

UMCUGenetics/MutationalPatterns documentation built on Nov. 24, 2022, 4:31 a.m.