predictSomatic: Predict germline vs. somatic status

Description Usage Arguments Value Author(s) See Also Examples

View source: R/predictSomatic.R

Description

This function takes as input the output of a runAbsoluteCN run and provides SNV posterior probabilities for all possible states.

Usage

1
predictSomatic(res, id = 1, return.vcf = FALSE)

Arguments

res

Return object of the runAbsoluteCN function.

id

Candidate solutions to be analyzed. id=1 will analyze the maximum likelihood solution.

return.vcf

Returns an annotated CollapsedVCF object. Note that this VCF will only contain variants not filtered out by the filterVcf functions. Variants outside segments or intervals might be included or not depending on runAbsoluteCN arguments.

Value

A data.frame or CollapsedVCF with SNV state posterior probabilities.

Author(s)

Markus Riester

See Also

runAbsoluteCN

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(purecn.example.output)
# the output data was created using a matched normal sample, but in case
# no matched normal is available, this will help predicting somatic vs. 
# germline status
purecnSnvs <- predictSomatic(purecn.example.output)

# Prefer GRanges?
purecnSnvs <- GRanges(predictSomatic(purecn.example.output))

# write a VCF file
purecnVcf <- predictSomatic(purecn.example.output, return.vcf=TRUE)
writeVcf(purecnVcf, file = "Sample1_PureCN.vcf")

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