sort_exposure {mSigTools}R Documentation

Sort columns of an exposure matrix based on the number of mutations in each sample (column).

Description

Sort columns of an exposure matrix based on the number of mutations in each sample (column).

Usage

sort_exposure(exposure, decreasing = TRUE)

Arguments

exposure

Exposures as a numerical matrix (or data.frame) with signatures in rows and samples in columns. Rownames are taken as the signature names and column names are taken as the sample IDs.

decreasing

If TRUE, sort from largest to smallest.

Value

The original exposure with columns sorted.

Examples

file <- system.file("extdata",
  "Liver-HCC.exposure.csv",
  package = "mSigTools"
)
exposure <- read_exposure(file)
exposure.sorted <- sort_exposure(exposure)

[Package mSigTools version 1.0.7 Index]