mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 10:47:25 +01:00
analyze: Allow to exclude detailed results
This commit is contained in:
parent
074902b505
commit
54e3b433f7
2 changed files with 8 additions and 3 deletions
|
|
@ -5,6 +5,8 @@
|
||||||
#' function should accept a number between 0.0 and 1.0 for the current
|
#' function should accept a number between 0.0 and 1.0 for the current
|
||||||
#' progress. If no function is provided, a simple text progress bar will be
|
#' progress. If no function is provided, a simple text progress bar will be
|
||||||
#' shown.
|
#' shown.
|
||||||
|
#' @param include_results Whether to include the detailed results. If this is
|
||||||
|
#' set to `FALSE`, only the `scores` are available.
|
||||||
#'
|
#'
|
||||||
#' @returns An object containing the results of the analysis with the following
|
#' @returns An object containing the results of the analysis with the following
|
||||||
#' items:
|
#' items:
|
||||||
|
|
@ -15,7 +17,7 @@
|
||||||
#' }
|
#' }
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @export
|
||||||
analyze <- function(preset, progress = NULL) {
|
analyze <- function(preset, progress = NULL, include_results = TRUE) {
|
||||||
if (!inherits(preset, "geposan_preset")) {
|
if (!inherits(preset, "geposan_preset")) {
|
||||||
stop("Preset is invalid. Use geposan::preset() to create one.")
|
stop("Preset is invalid. Use geposan::preset() to create one.")
|
||||||
}
|
}
|
||||||
|
|
@ -60,7 +62,7 @@ analyze <- function(preset, progress = NULL) {
|
||||||
list(
|
list(
|
||||||
preset = preset,
|
preset = preset,
|
||||||
scores = scores,
|
scores = scores,
|
||||||
results = results
|
results = if (include_results) results else NULL
|
||||||
),
|
),
|
||||||
class = "geposan_analysis"
|
class = "geposan_analysis"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
\alias{analyze}
|
\alias{analyze}
|
||||||
\title{Analyze genes based on position data.}
|
\title{Analyze genes based on position data.}
|
||||||
\usage{
|
\usage{
|
||||||
analyze(preset, progress = NULL)
|
analyze(preset, progress = NULL, include_results = TRUE)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{preset}{The preset to use which should be created using \code{\link[=preset]{preset()}}.}
|
\item{preset}{The preset to use which should be created using \code{\link[=preset]{preset()}}.}
|
||||||
|
|
@ -13,6 +13,9 @@ analyze(preset, progress = NULL)
|
||||||
function should accept a number between 0.0 and 1.0 for the current
|
function should accept a number between 0.0 and 1.0 for the current
|
||||||
progress. If no function is provided, a simple text progress bar will be
|
progress. If no function is provided, a simple text progress bar will be
|
||||||
shown.}
|
shown.}
|
||||||
|
|
||||||
|
\item{include_results}{Whether to include the detailed results. If this is
|
||||||
|
set to \code{FALSE}, only the \code{scores} are available.}
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
An object containing the results of the analysis with the following
|
An object containing the results of the analysis with the following
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue