Skip to content

Commit

Permalink
Add explanation to rarefyAssay man page (microbiome#555)
Browse files Browse the repository at this point in the history
Co-authored-by: Tuomas Borman <[email protected]>
  • Loading branch information
thpralas and TuomasBorman authored May 22, 2024
1 parent ceb70fc commit df1bd41
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,5 @@ Changes in version 1.13.x
+ Rename perSampleDominant* functions to getDominant and addPerSampleDominant*
functions to addDominant
+ Rename splitByRanks to agglomerateByRanks and add option as.list
+ Explain that rarefyAssay returns a new SummarizedExperiment object that
includes the newly added subsampled assay.
13 changes: 6 additions & 7 deletions R/rarefyAssay.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#' Subsample Counts
#'
#' \code{rarefyAssay} will randomly subsample counts in
#' \code{SummarizedExperiment} and return the a modified object in which each
#' sample has same number of total observations/counts/reads.
#' \code{rarefyAssay} randomly subsamples counts within a
#' \code{SummarizedExperiment} object and returns a new
#' \code{SummarizedExperiment} containing the original assay and the new
#' subsampled assay.
#'
#' @details
#' Although the subsampling approach is highly debated in microbiome research,
Expand Down Expand Up @@ -30,15 +31,13 @@
#' simulated this can equal to lowest number of total counts
#' found in a sample or a user specified number.
#'
#'
#'
#' @param replace Logical Default is \code{TRUE}. The default is with
#' replacement (\code{replace=TRUE}).
#' See \code{\link[phyloseq:rarefy_even_depth]{phyloseq::rarefy_even_depth}}
#' for details on implications of this parameter.
#'
#' @param name A single character value specifying the name of transformed
#' abundance table.
#' abundance table that will be added to the new \code{SummarizedExperiment}.
#'
#' @param verbose Logical Default is \code{TRUE}. When \code{TRUE} an additional
#' message about the random number used is printed.
Expand Down Expand Up @@ -77,7 +76,7 @@
#' )
#' tse.subsampled
#' dim(tse)
#' dim(tse.subsampled)
#' dim(assay(tse.subsampled, "subsampled"))
#'
NULL

Expand Down
11 changes: 6 additions & 5 deletions man/rarefyAssay.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit df1bd41

Please sign in to comment.