pheatmap.type: Plots heatmap with clustering only within types.

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/pheatmap.type.R

Description

This function first performs hierarchical clustering on samples (rows of data) within each condition. Then, plots a heatmap without further clustering of rows.

Usage

1
2
pheatmap.type(Data, annRow, type = colnames(annRow)[1],
doTranspose=FALSE, conditions="Auto",...)

Arguments

Data

A matrix with samples on rows and features (genes) on columns.

annRow

A data frame with 1 column or more. Row names must be the same as row names of Data.

type

The column of annRow used for determining the condition

doTranspose

If TRUE, the matrix will be transposed for the final plot. E.g., if the genes are on the columns of Data, they will be shown on rows of the heatmap.

conditions

A character vector that determines the conditions, and their order, to be included in the heatmap. By default ("Auto"), an alphabetical order of all available conditions in annRow will be used.

...

Additional arguments passed to pheatmap function.

Value

A list of:

pheatmapS

The results of pheatmap function for each condition

pheat

The output of final pheatmap function applied on all data

ordering

The ordering of the rows in the final heatmap

annRowAll

The row annotation used in the final heatmap

Note

If type is not determined, by default the first column of annRow is used.

Author(s)

Habil Zare

See Also

eigengenes33

Examples

1
2
3
4
5
6
7
     data(eigengenes33)
     d1 <- eigengenes33$aml
     d2 <- eigengenes33$mds
     Disease <- c(rep("AML",nrow(d1)), rep("MDS",nrow(d2)))
     Disease <- as.data.frame(Disease)
     rownames(Disease) <- c(rownames(d1), rownames(d2))
     p1 <- pheatmap.type(Data=rbind(d1,d2),annRow=Disease,show_rownames=FALSE)

Example output

Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Pigengene documentation built on Nov. 8, 2020, 6:47 p.m.