draw_heatmap: Draw a heatmap

Description Usage Arguments Value Examples

View source: R/function_heatmap_new.R

Description

Draw a heatmap

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
draw_heatmap(
  tool,
  fc_cutoff = 2,
  name,
  method = "euclidean",
  pair_name = "G2_over_G1",
  raw_values = FALSE,
  width = 6,
  height = 6,
  res = 300,
  unit = "in",
  image_format = "svg",
  env,
  scale_method = "row",
  outer_margins = c(0, 0, 0, 0),
  cex_col = 0,
  cex_row = 0,
  degree = 45,
  lab_row = NULL,
  lab_col = NULL
)

Arguments

fc_cutoff

Numerical value indicating the maximum value for Fold Change '(FC). The default is 2.

name

A character string indicating the desired values to be used in next analysis. For instance, "HIF3A" in the legacy gene expression matrix, "mir-1307" in the miRNA quantification matrix, or "HER2" in the protein quantification matrix.

method

The agglomeration method to be used: "euclidean", "maximum", "manhattan", "canberra", "binary", "pearson", "abspearson", "correlation", "abscorrelation", "spearman" or "kendall". The default is "euclidean". More details about method argument in amap package Dist method argument.

pair_name

A character string indicating the pair name to be used. When there are only two groups the default is "G2_over_G1"

raw_values

A logical value. If "TRUE" the expression values are going to be converted to Z-Score before draw the heat map.

width

Graphical parameters. See par for more details. As default width = 2000, height = 1500, res = 300 and unit = "px".

height

Graphical parameters. See par for more details. As default width = 2000, height = 1500, res = 300 and unit = "px".

res

Graphical parameters. See par for more details. As default width = 2000, height = 1500, res = 300 and unit = "px".

unit

Graphical parameters. See par for more details. As default width = 2000, height = 1500, res = 300 and unit = "px".

image_format

A character string indicating which image_format will be used. It could be "png" or "svg". The only unit available in "svg" is inches ('in'). The default is "png".

env

A character string containing the environment name that should be used. If none has been set yet, the function will create one in global environment following the standard criteria:

  • 'tumor_data_base_data_type_tumor_data' or

  • 'tumor_data_base_data_type_both_data' (for tumor and not tumor data in separated matrices).

scale_method

A character string indicating which method of scale should be used: "none", "row", "column". The default is "row". More details about scale_method argument in heatmap scale argument.

outer_margins

A numerical vector of the form c(bottom, left, top, right) giving the outer margins measured in lines of text. The default is no outer margins, i.e "c(0,0,0,0)". Note: This argument is only used 'when "lab_row" and "lab_col" are set.

cex_col, cex_row

A numerical value giving the amount by which "lab_row" and "lab_col" should be modified relative to the default size.

degree

The "lab_col" rotation in degrees. The default value is 45 degrees.

lab_row, lab_col

A logical value. If "TRUE" it is displayed row names ("lab_row") and col names ("lab_col"). The default is "FALSE" for both, in order to kepp the plot clean.

Value

a heat map image.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
library(DOAGDC)

# data already downloaded using the 'download_gdc' function
concatenate_expression("gene",
   name = "HIF3A",
   data_base = "legacy",
   tumor = "CHOL",
   work_dir = "~/Desktop"
)

# separating gene HIF3A expression data patients in two groups
groups_identification_mclust("gene", 2,
   name = "HIF3A",
   modelName = "E",
   env = CHOL_LEGACY_gene_tumor_data,
   tumor = "CHOL"
)

# load not normalized data
concatenate_expression("gene",
   normalization = FALSE,
   name = "HIF3A",
   data_base = "legacy",
   tumor = "CHOL",
   env = CHOL_LEGACY_gene_tumor_data,
   work_dir = "~/Desktop"
)

# start DE analysis
# considering concatenate_expression and groups_identification already runned
dea_edger(
   name = "HIF3A",
   group_gen = "mclust",
   env = CHOL_LEGACY_gene_tumor_data
)

draw_heatmap("edgeR", name = "HIF3A", env = CHOL_LEGACY_gene_tumor_data)

Facottons/DOAGDC documentation built on April 7, 2020, 3:17 a.m.