get_mut_type: Get variants with mut_type from GRanges

Description Usage Arguments Value See Also Examples

View source: R/get_mut_type.R

Description

Get the variants of a certain mutation type from a GRanges or GRangesList object. All other variants will be filtered out. It is assumed that DBS/MBSs are called as separate SNVs. They are merged into single variants. The type of variant can be chosen with type.

Usage

1
get_mut_type(vcf_list, type = c("snv", "indel", "dbs", "mbs"))

Arguments

vcf_list

GRanges/GRangesList

type

The type of variant that will be returned.

Value

GRanges/GRangesList of the desired mutation type.

See Also

read_vcfs_as_granges

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Get a GRanges list object.
## See 'read_vcfs_as_granges' for more info how to do this.
grl <- readRDS(system.file("states/blood_grl.rds",
  package = "MutationalPatterns"
))

## Get a specific mutation type.
snv_grl <- get_mut_type(grl, "snv")
indel_grl <- get_mut_type(grl, "indel")
dbs_grl <- get_mut_type(grl, "dbs")
mbs_grl <- get_mut_type(grl, "mbs")

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