sort_exposure {mSigTools} | R Documentation |
Sort columns of an exposure matrix based on the number of mutations in each sample (column).
sort_exposure(exposure, decreasing = TRUE)
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 |
The original exposure
with columns sorted.
file <- system.file("extdata",
"Liver-HCC.exposure.csv",
package = "mSigTools"
)
exposure <- read_exposure(file)
exposure.sorted <- sort_exposure(exposure)