plotAbs {PureCN} | R Documentation

## Plots for analyzing PureCN solutions

### Description

This function provides various plots for finding correct purity and ploidy combinations in the results of a `runAbsoluteCN` call.

### Usage

    plotAbs(
      res,
      id = 1,
      type = c("hist", "overview", "BAF", "AF", "all"),
      chr = NULL,
      germline.only = TRUE,
      show.contour = FALSE,
      purity = NULL,
      ploidy = NULL,
      alpha = TRUE,
      show.segment.means = c("SNV", "segments", "both"),
      max.mapping.bias = 0.8,
      palette.name = "Paired",
      col.snps = "#2b6391",
      col.chr.shading = "#f0f0f0",
      ...
    )

### Arguments

`res` | Return object of the `runAbsoluteCN` function.
`id` | Candidate solutions to be plotted. `id=1` will draw the plot for the maximum likelihood solution.
`type` | Different types of plots. `hist` will plot a histogram, assigning log-ratio peaks to integer values. `overview` will plot all local optima, sorted by likelihood. `BAF` plots something like a B-allele frequency plot known from SNP arrays: it plots allele frequencies of germline variants (or most likely germline when status is not available) against copy number. `AF` plots observed allelic fractions against expected (purity), maximum likelihood (optimal multiplicity) allelic fractions. `all` plots types `BAF` and `AF` for all local optima, and is useful for generating a PDF for manual inspection.
`chr` | If `NULL`, show all chromosomes, otherwise only the ones specified (`type="BAF"` only).
`germline.only` | If `TRUE`, show only variants most likely being germline in BAF plot. Useful to set to `FALSE` (in combination with `chr`) to study potential artifacts.
`show.contour` | For `type="overview"`, display contour plot.
`purity` | Display expected integer copy numbers for purity, defaults to purity of the solution (`type="hist"` and `"AF"` only).
`ploidy` | Display expected integer copy numbers for ploidy, defaults to ploidy of the solution (`type="hist"` and `"AF"` only).
`alpha` | Add transparency to the plot if VCF contains many variants (>2000, `type="AF"` and `type="BAF"` only).
`show.segment.means` | Show segment means in germline allele frequency plot? If `both`, show SNVs and segment means. If `SNV` show all SNVs. Only for `type="AF"`.
`max.mapping.bias` | Exclude variants with high mapping bias from plotting. Note that bias is reported on an inverse scale; a variant with mapping bias of 1 has no bias. (`type="AF"` and `type="BAF"` only).
`palette.name` | The default `RColorBrewer` palette.
`col.snps` | The color used for germline SNPs.
`col.chr.shading` | The color used for shading alternate chromosomes.
`...` | Additonal parameters passed to the `plot` function.

### Value

Returns `NULL`.

### Author(s)

Markus Riester

### See Also

`runAbsoluteCN`

### Examples

    data(purecn.example.output)
    plotAbs(purecn.example.output, type="overview")
    # plot details for the maximum likelihood solution (rank 1)
    plotAbs(purecn.example.output, 1, type="hist")
    plotAbs(purecn.example.output, 1, type="BAF")
    plotAbs(purecn.example.output, 1, type = "BAF", chr="chr2")

[Package PureCN version 1.22.2 Index]