From f08da410ac87ce3cba7630ef62a87b0014b90052 Mon Sep 17 00:00:00 2001 From: thpralas Date: Thu, 22 Feb 2024 11:13:45 +0200 Subject: [PATCH] add new man page 'get-values' (#474) --- R/taxonomy.R | 27 ++++++++++++++++++--------- man/get-values.Rd | 30 ++++++++++++++++++++++++++++++ man/taxonomy-methods.Rd | 13 ++----------- 3 files changed, 50 insertions(+), 20 deletions(-) create mode 100644 man/get-values.Rd diff --git a/R/taxonomy.R b/R/taxonomy.R index 7852f3b45..09f1e9a31 100644 --- a/R/taxonomy.R +++ b/R/taxonomy.R @@ -18,15 +18,8 @@ #' the lowest taxonomic information possible. If data from different levels, #' is to be mixed, the taxonomic level is prepended by default. #' -#' \code{getHierarchyTree} generates a hierarchy tree from the available -#' taxonomic information. Internally it uses -#' \code{\link[TreeSummarizedExperiment:toTree]{toTree}} and -#' \code{\link[TreeSummarizedExperiment:resolveLoop]{resolveLoop}} to sanitize -#' data if needed. -#' #' \code{addTree} calculates hierarchy tree from the available taxonomic #' information and add it to rowTree. -#' #' #' \code{IdTaxaToDataFrame} extracts taxonomic results from results of #' \code{\link[DECIPHER:IdTaxa]{IdTaxa}}. @@ -383,13 +376,29 @@ setMethod("getTaxonomyLabels", signature = c(x = "SummarizedExperiment"), ans } -#' @rdname taxonomy-methods +#' Functions for accessing data +#' +#' These functions find and return data present in a +#' \code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}} +#' object. +#' +#' \code{getHierarchyTree} generates a hierarchy tree from the available +#' taxonomic information. Internally it uses +#' \code{\link[TreeSummarizedExperiment:toTree]{toTree}} and +#' \code{\link[TreeSummarizedExperiment:resolveLoop]{resolveLoop}} to sanitize +#' data if needed. +#' +#' @inheritParams taxonomy-methods +#' +#' @name get-values + +#' @rdname get-values setGeneric("getHierarchyTree", signature = "x", function(x, ...) standardGeneric("getHierarchyTree")) -#' @rdname taxonomy-methods +#' @rdname get-values #' @export setMethod("getHierarchyTree", signature = c(x = "SummarizedExperiment"), function(x){ diff --git a/man/get-values.Rd b/man/get-values.Rd new file mode 100644 index 000000000..ef6ae5dcb --- /dev/null +++ b/man/get-values.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/taxonomy.R +\name{get-values} +\alias{get-values} +\alias{getHierarchyTree,SummarizedExperiment-method} +\title{Functions for accessing data} +\usage{ +getHierarchyTree(x, ...) + +\S4method{getHierarchyTree}{SummarizedExperiment}(x) +} +\arguments{ +\item{x}{a +\code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}} +object} + +\item{...}{optional arguments not used currently.} +} +\description{ +These functions find and return data present in a +\code{\link[SummarizedExperiment:SummarizedExperiment-class]{SummarizedExperiment}} +object. +} +\details{ +\code{getHierarchyTree} generates a hierarchy tree from the available +taxonomic information. Internally it uses +\code{\link[TreeSummarizedExperiment:toTree]{toTree}} and +\code{\link[TreeSummarizedExperiment:resolveLoop]{resolveLoop}} to sanitize +data if needed. +} diff --git a/man/taxonomy-methods.Rd b/man/taxonomy-methods.Rd index 4cd296cbf..ab24f1b84 100644 --- a/man/taxonomy-methods.Rd +++ b/man/taxonomy-methods.Rd @@ -12,7 +12,6 @@ \alias{checkTaxonomy,SummarizedExperiment-method} \alias{getTaxonomyLabels} \alias{getTaxonomyLabels,SummarizedExperiment-method} -\alias{getHierarchyTree,SummarizedExperiment-method} \alias{addTree} \alias{addTree,SummarizedExperiment-method} \alias{mapTaxonomy} @@ -57,8 +56,6 @@ getTaxonomyLabels(x, ...) ... ) -\S4method{getHierarchyTree}{SummarizedExperiment}(x) - addTree(x, ...) \S4method{addTree}{SummarizedExperiment}(x) @@ -75,11 +72,11 @@ IdTaxaToDataFrame(from) object} \item{rank}{a single character defining a taxonomic rank. Must be a value of -\code{taxonomyRanks()} function.} +\code{taxonomyRanks()} function} \item{empty.fields}{a \code{character} value defining, which values should be regarded as empty. (Default: \code{c(NA, "", " ", "\t")}). They will be -removed if \code{na.rm = TRUE} before agglomeration.} +removed if \code{na.rm = TRUE} before agglomeration} \item{...}{optional arguments not used currently.} @@ -143,12 +140,6 @@ creation. the lowest taxonomic information possible. If data from different levels, is to be mixed, the taxonomic level is prepended by default. -\code{getHierarchyTree} generates a hierarchy tree from the available -taxonomic information. Internally it uses -\code{\link[TreeSummarizedExperiment:toTree]{toTree}} and -\code{\link[TreeSummarizedExperiment:resolveLoop]{resolveLoop}} to sanitize -data if needed. - \code{addTree} calculates hierarchy tree from the available taxonomic information and add it to rowTree.