
Last chance! 50% off unlimited learning
Sale ends in
Obtain or Modify Signature Information
sig_names(sig)sig_modify_names(sig, new_names)
sig_number(sig)
sig_attrs(sig)
sig_signature(sig, normalize = c("row", "column", "raw", "feature"))
sig_exposure(sig, type = c("absolute", "relative"))
a Signature
object or data.
a Signature
object obtained either from sig_extract or sig_auto_extract.
new signature names.
one of 'row', 'column', 'raw' and "feature", for row normalization (signature), column normalization (component), raw data, row normalization by feature, respectively.
one of 'absolute' and 'relative'.
## Operate signature names
load(system.file("extdata", "toy_mutational_signature.RData",
package = "sigminer", mustWork = TRUE
))
sig_names(sig2)
cc <- sig_modify_names(sig2, new_names = c("Sig2", "Sig1", "Sig3"))
sig_names(cc)
# The older names are stored in tags.
print(attr(cc, "tag"))
## Get signature number
sig_number(sig2)
## Get signature attributes
sig_number(sig2)
## Get signature matrix
z <- sig_signature(sig2)
z <- sig_signature(sig2, normalize = "raw")
## Get exposure matrix
## Of note, this is different from get_sig_exposure()
## it returns a matrix instead of data table.
z <- sig_exposure(sig2) # it is same as sig$Exposure
z <- sig_exposure(sig2, type = "relative") # it is same as sig2$Exposure.norm
Run the code above in your browser using DataLab