predictSomatic {PureCN} | R Documentation

## Predict germline vs. somatic status

### Description

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

### Usage

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

### 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.
`vcf.field.prefix` | Prefix all VCF info field names with this string.

### Value

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

### Author(s)

Markus Riester

### See Also

`runAbsoluteCN`

### Examples

    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")

[Package PureCN version 1.8.1 Index]