callMutationBurden: Call mutation burden

Description Usage Arguments Value Author(s) See Also Examples

View source: R/callMutationBurden.R

Description

This function provides detailed mutation burden information.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
callMutationBurden(
  res,
  id = 1,
  remove.flagged = TRUE,
  min.prior.somatic = 0.1,
  max.prior.somatic = 1,
  min.cellfraction = 0,
  fun.countMutation = function(vcf) width(vcf) == 1,
  callable = NULL,
  exclude = NULL
)

Arguments

res

Return object of the runAbsoluteCN function.

id

Candidate solution to extract mutation burden from. id=1 will use the maximum likelihood solution.

remove.flagged

Remove variants flagged by predictSomatic.

min.prior.somatic

Exclude variants with somatic prior probability lower than this cutoff.

max.prior.somatic

Exclude variants with somatic prior probability higher than this cutoff. This is useful for removing hotspot mutations in small panels that might inflate the mutation burden.

min.cellfraction

Exclude variants with cellular fraction lower than this cutoff. These are sub-clonal mutations or artifacts with very low allelic fraction.

fun.countMutation

Function that can be used to filter the input VCF further for filtering, for example to only keep missense mutations. Expects a logical vector indicating whether variant should be counted (TRUE) or not (FALSE). Default is to keep only single nucleotide variants.

callable

GRanges object with callable genomic regions, for example obtained by ‘GATK CallableLoci’ BED file, imported with rtracklayer.

exclude

GRanges object with genomic regions that should be excluded from the callable regions, for example intronic regions. Requires callable.

Value

Returns data.frame with mutation counts and sizes of callable regions.

Author(s)

Markus Riester

See Also

runAbsoluteCN predictSomatic

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
data(purecn.example.output)
callMutationBurden(purecn.example.output)

# To calculate exact mutations per megabase, we can provide a BED
# file containing all callable regions
callableBed <- import(system.file("extdata", "example_callable.bed.gz", 
    package = "PureCN"))

# We can exclude some regions for mutation burden calculation, 
# for example intronic regions. 
exclude <- GRanges(seqnames="chr1", IRanges(start=1, 
    end=max(end(callableBed))))

# We can also exclude specific mutations by filtering the input VCF
myVcfFilter <- function(vcf) seqnames(vcf)!="chr2"

callsCallable <- callMutationBurden(purecn.example.output, 
    callable=callableBed, exclude=exclude, fun.countMutation=myVcfFilter)

PureCN documentation built on Nov. 8, 2020, 5:37 p.m.