View source: R/make.counts.heatmap.R
make.counts.heatmap | R Documentation |
Make a heatmap of counts
make.counts.heatmap(
nano.counts, fname.stem = NULL, covs.rows = NULL, covs.cols = NULL,
clust.dim = 'both', clust.method = 'euclidean', print.ylab = NULL
)
nano.counts |
A gene by sample matrix or data-frame of NanoString counts, where row names are probe names and column names are sample IDs. Counts can be normalized or raw. |
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 |
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 |
clust.dim |
Which dimensions to cluster. Accepts 'none', 'rows', 'columns', or 'both' (default) |
clust.method |
Which distance method should be used for clustering. Accepts 'euclidean' (default), 'correlation', 'jaccard', and other methods supported in ?dist |
print.ylab |
Whether to print the yaxis labels. Passed directly to the BoutrosLab.plotting.general::create.heatmap function. Leave as NULL (default) if you don't want them printed |
Make a clustered heatmap of counts for all samples and genes
None
Cindy Yao and Emilie Lalonde
## Not run:
# load data
data(NanoString.DNA.raw);
data(NanoString.DNA.norm);
data(PhenoData);
# plot normalized NanoString counts
make.counts.heatmap(
nano.counts = NanoString.DNA.norm[, -(1:3)],
fname.stem = 'normalized',
covs.rows = PhenoData[, c('SampleID', 'Type', 'Cartridge')],
covs.cols = NanoString.DNA.raw[, c('Name', 'CodeClass')]
);
# plot raw NanoString counts
# make sure raw count data frame has gene names for rownames!
NanoString.DNA.formatted <- NanoString.DNA.raw[, -(1:3)];
rownames(NanoString.DNA.formatted) <- NanoString.DNA.raw$Name;
make.counts.heatmap(
nano.counts = NanoString.DNA.formatted,
fname.stem = 'raw',
covs.rows = PhenoData[, c('SampleID', 'Type', 'Cartridge')],
covs.cols = NanoString.DNA.raw[, c('Name', 'CodeClass')]
);
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.