get_indel_context {MutationalPatterns} | R 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.

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

[Package MutationalPatterns version 3.0.1 Index]