Get Signature Exposure from 'Signature' Object
get_sig_exposure(
Signature,
type = c("absolute", "relative"),
rel_threshold = 0.01
)
a Signature
object obtained either from sig_extract or sig_auto_extract,
or just a raw exposure matrix with column representing samples (patients) and row
representing signatures.
'absolute' for signature exposure and 'relative' for signature relative exposure.
used when type is 'relative', relative exposure less than this value will be set to 0 and the remaining signature exposure will be scaled to make sum as 1 accordingly. Of note, this is a little different from the same parameter in sig_fit.
a data.table
# NOT RUN {
# Load mutational signature
load(system.file("extdata", "toy_mutational_signature.RData",
package = "sigminer", mustWork = TRUE
))
# Get signature exposure
expo1 <- get_sig_exposure(sig2)
expo1
expo2 <- get_sig_exposure(sig2, type = "relative")
expo2
# }
Run the code above in your browser using DataLab