plotHeatmap: Plot Heatmap

Description Usage Arguments Value Author(s) Examples

View source: R/plotHeatmap.R

Description

This function plots heatmaps of the data

Usage

1
2
plotHeatmap(data, sampleTypes, k = NULL, pathToOutput = "", log2 = FALSE,
  pseudoCount = NULL)

Arguments

data

quantified data to be visualized (finalOutput_molPct.csv)

sampleTypes

file that associates column names of MS1 with the sample types

k

number of k in the k-means algorithm.

pathToOutput

the directory path to save the plots

log2

logical argument that specifies whether or not data has to be log2 transformed

pseudoCount

pseudo count added to the data if the data is log2 transformed in order to avoid negative infinite values in the data

Value

Two heatmap images: heatmap of species (heatmapSpecies_k_n.png) and heatmap of classes (heatmapClasses_k_n.png), where n indicates the amount of clusters k. If clusters are not chosen by the user, a majority vote chart will also be included called nbclustResults.png.

Author(s)

André Vidas Olsen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# load sample types file and data to be used for visualization
sampleTypes <- read.csv(system.file("extdata", "sampleTypes.csv",
 package = "lipidQ"), stringsAsFactors = FALSE)

data <- read.csv(system.file("extdata/dataTables/checks",
 "finalOutput_molPct.csv", package = "lipidQ"), stringsAsFactors = FALSE)


# create heatmap from log2 transformed data with 0.0001 added pseudo counts
plotHeatmap(data = data, sampleTypes = sampleTypes, k = 2,
 pathToOutput = "",
 log2 = TRUE, pseudoCount = 0.0001)

ELELAB/lipidQ documentation built on Feb. 24, 2020, 12:54 a.m.