callMutationBurden {PureCN} | R Documentation |
This function provides detailed mutation burden information.
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 )
res |
Return object of the |
id |
Candidate solution to extract mutation burden from.
|
remove.flagged |
Remove variants flagged by
|
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 |
callable |
|
exclude |
|
Returns data.frame
with mutation counts and sizes
of callable regions.
Markus Riester
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)