Learn R Programming

sigminer (version 0.1.11)

sig_assign_samples: Return sample clustering from NMF run results

Description

One of key results from NMF decomposition is to cluster samples into different groups. This function takes NMF result (a NMF object) as input and return the membership in each cluster.

Usage

sig_assign_samples(nmfObj, type = "consensus", matchConseOrder = F)

Arguments

nmfObj

a NMF result object which is an element return from sig_extract or run results of NMF package.

type

cluster type, could be 'consensus' or 'samples'.

matchConseOrder

if TRUE, the result will match order as shown in consensus map when type argument is 'consensus'.

Value

a data.table object

Details

X = W x H

W is the feature matrix, H is the sample matrix After NMF run, use this function to select import features and assign groups for the two matrix.

More detail please see NMF::predict().

See Also

Other signature analysis series function: sig_estimate, sig_extract, sig_get_activity, sig_get_correlation, sig_get_similarity, sig_prepare, sig_summarize_subtypes

Examples

Run this code
# NOT RUN {
# Load copy number signature
load(system.file("extdata", "toy_copynumber_signature.RData",
  package = "sigminer", mustWork = TRUE
))
# Assign samples to clusters
subtypes <- sig_assign_samples(res$nmfObj, type = "samples")
# }

Run the code above in your browser using DataLab