diff --git a/R/NMF.R b/R/NMF.R index 6a9fcba..19eb658 100644 --- a/R/NMF.R +++ b/R/NMF.R @@ -157,7 +157,11 @@ NMF <- function(stana, species, rank=3, target="KO", seed=53, method="snmf/r", cat("Present feature per factor:", apply(basisMat!=0, 2, function(x) sum(x)), "\n") stana@NMF[[species]] <- res - return(stana) + if (estimate & !nnlm_flag) { + return(list(stana, test)) + } else { + return(stana) + } } #' plotStackedBarPlot diff --git a/R/utils.R b/R/utils.R index d758443..6e64a67 100644 --- a/R/utils.R +++ b/R/utils.R @@ -69,7 +69,7 @@ listToNV <- function(l) { #' @export #' @return ggplot plotSNVInfo <- function(stana, sp) { - if (!is.null(stana@includeSNVID)[[sp]]) {cat_subtle("# The set SNV ID information is not used in this function\n")} + if (!is.null(stana@includeSNVID[[sp]])) {cat_subtle("# The set SNV ID information is not used in this function\n")} d <- stana@snpsInfo[[sp]] tbl <- data.frame(table(paste0(d$major_allele,"/",d$minor_allele))) if ("locus_type" %in% colnames(d)) { diff --git a/inst/extdata/sysdata.rda b/inst/extdata/sysdata.rda index a709907..fd63734 100644 Binary files a/inst/extdata/sysdata.rda and b/inst/extdata/sysdata.rda differ diff --git a/man/consensusSeqGeneral.Rd b/man/consensusSeqGeneral.Rd index 2b74a0c..bcfe64d 100644 --- a/man/consensusSeqGeneral.Rd +++ b/man/consensusSeqGeneral.Rd @@ -12,6 +12,7 @@ consensusSeqGeneral( output_seq = FALSE, tree = FALSE, return_mat = FALSE, + allele_columns = c("major_allele", "minor_allele"), verbose = FALSE ) } @@ -30,6 +31,8 @@ consensusSeqGeneral( \item{return_mat}{return matrix of characters} +\item{allele_columns}{columns specifying major and minor allele} + \item{verbose}{output current status} } \description{