callMutationBurden {PureCN} | R Documentation

## Call mutation burden

### Description

This function provides detailed mutation burden information.

### Usage

    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

    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)

[Package PureCN version 1.18.1 Index]