SignatureSpecificFeatures | R Documentation |
Returns the list of signatures specific features for all factorization ranks or for the indicated rank, if return_all_features = TRUE returns a binary matrix for every factorization rank, with features in the rows and samples in the columns, in which 1 means that the features is contributing to the signature, and 0 it does not. The extraction of Signature Specific Features is not supported for k = 2
SignatureSpecificFeatures(x, k = NULL, return_all_features = FALSE, ...) ## S4 method for signature 'ButchR_NMF' SignatureSpecificFeatures(x, k = NULL, return_all_features = FALSE, ...) ## S4 method for signature 'ButchR_integrativeNMF' SignatureSpecificFeatures( x, k = NULL, return_all_features = FALSE, view_id = NULL, ... ) ## S4 method for signature 'ButchR_joinNMF' SignatureSpecificFeatures( x, k = NULL, return_all_features = FALSE, view_id = NULL, ... )
x |
an object of class ButchR_NMF, ButchR_joinNMF, or ButchR_integrativeNMF. |
k |
numeric - factorization rank |
return_all_features |
logical indicating whether to return a binary matrix with the same dimension as the selected factorization rank. Were a 1 is assigned to those features contributing towards a signature and a 0 to those that do not show a significant contribution. |
... |
additional parameters. |
view_id |
character vector with views from which signature specific features will be extracted. |
list of signature specific features or binary matrices for all features
data("leukemia") nmf_exp <- run_NMF_tensor(leukemia$matrix, ranks = 3, method = "NMF", n_initializations = 2, extract_features = TRUE) SignatureSpecificFeatures(nmf_exp) SignatureSpecificFeatures(nmf_exp, k = 3) SignatureSpecificFeatures(nmf_exp, k = 3, return_all_features = TRUE) ## Not run: # For ButchR_NMF objects: SignatureSpecificFeatures(nmf_exp) lapply(SignatureSpecificFeatures(nmf_exp), function(x) sapply(x, length)) SignatureSpecificFeatures(nmf_exp, k = 3) SignatureSpecificFeatures(nmf_exp, k = 3, return_all_features = TRUE) ## End(Not run) ## Not run: # For ButchR_integrativeNMF objects: SignatureSpecificFeatures(inmf_exp) lapply(SignatureSpecificFeatures(inmf_exp), function(view){ sapply(view, function(x) sapply(x, length)) } ) lapply(SignatureSpecificFeatures(inmf_exp, k = 3), function(view){ sapply(view, length) }) SignatureSpecificFeatures(inmf_exp, k = 3, return_all_features = TRUE) SignatureSpecificFeatures(inmf_exp, k = 3, return_all_features = TRUE, view_id = "atac") SignatureSpecificFeatures(inmf_exp, return_all_features = TRUE, view_id = "atac") ## End(Not run) ## Not run: # For ButchR_joinNMF objects: SignatureSpecificFeatures(jnmf_exp) SignatureSpecificFeatures(jnmf_exp) lapply(SignatureSpecificFeatures(jnmf_exp), function(view){ sapply(view, function(x) sapply(x, length)) }) lapply(SignatureSpecificFeatures(jnmf_exp, k = 3), function(view){ sapply(view, length) }) SignatureSpecificFeatures(jnmf_exp, k = 3, return_all_features = TRUE) SignatureSpecificFeatures(jnmf_exp, k = 3, return_all_features = TRUE, view_id = "atac") SignatureSpecificFeatures(jnmf_exp, return_all_features = TRUE, view_id = "atac") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.