Learn R Programming

sigminer (version 1.0.6)

show_sig_number_survey2: Show Comprehensive Signature Number Survey

Description

This function is modified from NMF package to better help users to explore survey of signature number.

Usage

show_sig_number_survey2(
  x,
  y = NULL,
  what = c("all", "cophenetic", "rss", "residuals", "dispersion", "evar", "sparseness",
    "sparseness.basis", "sparseness.coef", "silhouette", "silhouette.coef",
    "silhouette.basis", "silhouette.consensus"),
  na.rm = FALSE,
  xlab = "Number of signature",
  ylab = "",
  main = "Signature number survey using NMF package"
)

Arguments

x

a data.frame or NMF.rank object obtained from sig_estimate().

y

for random simulation, a data.frame or NMF.rank object obtained from sig_estimate().

what

a character vector whose elements partially match one of the following item, which correspond to the measures computed by summary on each -- multi-run -- NMF result: ‘all’, ‘cophenetic’, ‘rss’, ‘residuals’, ‘dispersion’, ‘evar’, ‘silhouette’ (and more specific *.coef, *.basis, *.consensus), ‘sparseness’ (and more specific *.coef, *.basis). It specifies which measure must be plotted (what='all' plots all the measures).

na.rm

single logical that specifies if the rank for which the measures are NA values should be removed from the graph or not (default to FALSE). This is useful when plotting results which include NAs due to error during the estimation process. See argument stop for nmfEstimateRank.

xlab

x-axis label

ylab

y-axis label

main

main title

Value

a ggplot object

Examples

Run this code
# NOT RUN {
load(system.file("extdata", "toy_copynumber_tally_M.RData",
  package = "sigminer", mustWork = TRUE
))
library(NMF)
cn_estimate <- sig_estimate(cn_tally_M$nmf_matrix,
  cores = 1, nrun = 5,
  verbose = TRUE,
  keep_nmfObj = TRUE
)

# Show from data.frame obtained by sig_estimate()
show_sig_number_survey2(cn_estimate$survey)
show_sig_number_survey2(cn_estimate$survey, y = cn_estimate$survey.random)

# Show directly from NMF.rank object
show_sig_number_survey2(cn_estimate$nmfEstimate)
show_sig_number_survey2(cn_estimate$nmfEstimate, y = cn_estimate$nmfEstimate.random)
# }

Run the code above in your browser using DataLab