make.cna.heatmap: Make a heatmap of CNAs

View source: R/make.cna.heatmap.R

make.cna.heatmapR Documentation

Make a heatmap of CNAs

Description

Make a heatmap of CNAs

Usage

make.cna.heatmap(
  nano.cnas, fname.stem = NULL, covs.rows = NULL, covs.cols = NULL,
  rounded = FALSE, clust.dim = 'both', centering.value = 2, min.cn = NULL, ...
  )

Arguments

nano.cnas

A gene by sample matrix of CNA information (raw ratios or rounded CNA calls)

fname.stem

To use in filename. Description of how CNAs were called is suggested. Defaults to NULL

covs.rows

A sample by covariate data-frame. Currently only accepts sample covariates 'Type' and 'Cartridge' (see output of load.phenodata). A 'SampleID' column is mandatory to match to 'nano.counts' sample IDs. Defaults to NULL

covs.cols

A gene by covariate data-frame. Currently only accepts gene covariate 'CodeClass'. A 'Name' column is mandatory to match to 'nano.counts' gene probe names. Defaults to NULL

rounded

Whether the CNA data has been rounded to the nearest integer. If false (default), euclidean distance measure is used to cluster data. If true, jaccard is used.

clust.dim

Which dimensions to cluster. Accepts 'none', 'rows', 'columns', or 'both' (default)

centering.value

The center value of the colour map. Defaults to 2

min.cn

A value to be set as the colour scheme minimum. If NULL (default), takes minimum value of 'nano.cnas'

...

Other parameters to be passed to the BoutrosLab.plotting.general::create.heatmap function

Details

Make a clustered heatmap of CNAs for all samples and genes

Value

None

Author(s)

Cindy Yao and Emilie Lalonde

Examples

## Not run: 
  # load data
  data(NanoString.DNA.raw);
  data(NanoString.DNA.norm);
  data(PhenoData);

  # call CNAs
  cnas <- call.cnas.with.pooled.normals(
    normalized.data = NanoString.DNA.norm,
    phenodata = PhenoData
    );
  
  # plot rounded copy number calls
  make.cna.heatmap(
    nano.cnas = cnas$rounded,
    fname.stem = 'round',
    covs.rows = PhenoData[, c('SampleID', 'Type', 'Cartridge')],
    covs.cols = NanoString.DNA.raw[, c('Name', 'CodeClass')],
    rounded = TRUE
    );

  # plot raw (not rounded) copy number calls
  make.cna.heatmap(
    nano.cnas = cnas$raw,
    fname.stem = 'raw',
    covs.rows = PhenoData[, c('SampleID', 'Type', 'Cartridge')],
    covs.cols = NanoString.DNA.raw[, c('Name', 'CodeClass')],
    rounded = FALSE
    );

## End(Not run)

uclahs-cds/public-R-NanoStringNormCNV documentation built on May 31, 2024, 9:09 p.m.