melt_gct: Transform a GCT object in to a long form 'data.table' (aka...

Description Usage Arguments Value See Also Examples

Description

Utilizes the melt.data.table function to transform the matrix into long form. Optionally can include the row and column annotations in the transformed data.table.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
melt.gct(...)

melt_gct(
  g,
  suffixes = NULL,
  remove_symmetries = FALSE,
  keep_rdesc = TRUE,
  keep_cdesc = TRUE,
  ...
)

## S4 method for signature 'GCT'
melt_gct(
  g,
  suffixes = NULL,
  remove_symmetries = FALSE,
  keep_rdesc = TRUE,
  keep_cdesc = TRUE,
  ...
)

Arguments

...

further arguments passed along to data.table::merge

g

the GCT object

suffixes

the character suffixes to be applied if there are collisions between the names of the row and column descriptors

remove_symmetries

boolean indicating whether to remove the lower triangle of the matrix (only applies if g@mat is symmetric)

keep_rdesc

boolean indicating whether to keep the row descriptors in the final result

keep_cdesc

boolean indicating whether to keep the column descriptors in the final result

Value

a data.table object with the row and column ids and the matrix values and (optinally) the row and column descriptors

See Also

Other GCT utilities: annotate.gct(), merge.gct(), rank.gct(), subset.gct()

Examples

1
2
3
4
5
6
7
8
# simple melt, keeping both row and column meta
head(melt_gct(ds))

# update row/colum suffixes to indicate rows are genes, columns experiments
head(melt_gct(ds, suffixes = c("_gene", "_experiment")))

# ignore row/column meta
head(melt_gct(ds, keep_rdesc = FALSE, keep_cdesc = FALSE))

cmap/cmapR documentation built on Oct. 14, 2021, 12:51 a.m.