diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index d7a9c5e..37b1d33 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -35,8 +35,8 @@ name: R-CMD-check-bioc ## "/nocache" in the commit message. env: has_testthat: 'true' - run_covr: 'true' - run_pkgdown: 'false' + run_covr: 'false' + run_pkgdown: 'true' has_RUnit: 'false' cache-version: 'cache-v1' run_docker: 'false' @@ -52,9 +52,9 @@ jobs: fail-fast: false matrix: config: - - { os: ubuntu-latest, r: 'devel', bioc: '3.17', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } - - { os: macOS-latest, r: 'devel', bioc: '3.17'} - - { os: windows-latest, r: 'devel', bioc: '3.17'} + - { os: ubuntu-latest, r: '4.3', bioc: '3.17', cont: "bioconductor/bioconductor_docker:RELEASE_3_17", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" } + - { os: macOS-latest, r: '4.3', bioc: '3.17'} + - { os: windows-latest, r: '4.3', bioc: '3.17'} ## Check https://github.com/r-lib/actions/tree/master/examples ## for examples using the http-user-agent env: @@ -105,23 +105,23 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.R_LIBS_USER }} - key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel- + key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_17-r-4.3-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_17-r-4.3- - name: Cache R packages on Linux if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' " uses: actions/cache@v3 with: path: /home/runner/work/_temp/Library - key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel- + key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_17-r-4.3-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_17-r-4.3- - - name: Install Linux system dependencies - if: runner.os == 'Linux' - run: | - sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))') - echo $sysreqs - sudo -s eval "$sysreqs" + # - name: Install Linux system dependencies + # if: runner.os == 'Linux' + # run: | + # sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))') + # echo $sysreqs + # sudo -s eval "$sysreqs" - name: Install macOS system dependencies if: matrix.config.os == 'macOS-latest' @@ -169,35 +169,19 @@ jobs: ## https://github.com/r-lib/remotes/issues/296 ## Ideally, all dependencies should get installed in the first pass. - ## Set the repos source depending on the OS - ## Alternatively use https://storage.googleapis.com/bioconductor_docker/packages/ - ## though based on https://bit.ly/bioc2021-package-binaries - ## the Azure link will be the main one going forward. - gha_repos <- if( - .Platform$OS.type == "unix" && Sys.info()["sysname"] != "Darwin" - ) c( - "AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/3.17/bioc", - BiocManager::repositories() - ) else BiocManager::repositories() - ## For running the checks message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) - install.packages(c("rcmdcheck", "BiocCheck"), repos = gha_repos) + install.packages(c("rcmdcheck", "BiocCheck"), repos = BiocManager::repositories()) ## Pass #1 at installing dependencies - ## This pass uses AnVIL-powered fast binaries - ## details at https://github.com/nturaga/bioc2021-bioconductor-binaries - ## The speed gains only apply to the docker builds. message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****')) - remotes::install_local(dependencies = TRUE, repos = gha_repos, build_vignettes = FALSE, upgrade = TRUE) + remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = FALSE, upgrade = TRUE) continue-on-error: true shell: Rscript {0} - name: Install dependencies pass 2 run: | ## Pass #2 at installing dependencies - ## This pass does not use AnVIL and will thus update any packages - ## that have seen been updated in Bioconductor message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****')) remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE, force = TRUE) shell: Rscript {0} @@ -210,15 +194,15 @@ jobs: shell: Rscript {0} - name: Install covr - if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux' + if: github.ref == 'refs/heads/devel' && env.run_covr == 'true' && runner.os == 'Linux' run: | remotes::install_cran("covr") shell: Rscript {0} - name: Install pkgdown - if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' + if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux' run: | - remotes::install_github("r-lib/pkgdown") + remotes::install_cran("pkgdown") shell: Rscript {0} - name: Session info @@ -266,17 +250,17 @@ jobs: shell: Rscript {0} - name: Test coverage - if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux' + if: github.ref == 'refs/heads/devel' && env.run_covr == 'true' && runner.os == 'Linux' run: | covr::codecov() shell: Rscript {0} - name: Install package - if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' + if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux' run: R CMD INSTALL . - name: Build pkgdown site - if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' + if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux' run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} ## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE) @@ -285,12 +269,12 @@ jobs: ## makes the git history recognizable by pkgdown. - name: Install deploy dependencies - if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' + if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux' run: | apt-get update && apt-get -y install rsync - name: Deploy pkgdown site to GitHub pages 🚀 - if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' + if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux' uses: JamesIves/github-pages-deploy-action@releases/v4 with: clean: false @@ -301,21 +285,54 @@ jobs: if: failure() uses: actions/upload-artifact@master with: - name: ${{ runner.os }}-biocversion-devel-r-devel-results + name: ${{ runner.os }}-biocversion-RELEASE_3_17-r-4.3-results path: check - ## Note that DOCKER_PASSWORD is really a token for your dockerhub - ## account, not your actual dockerhub account password. - ## This comes from - ## https://seandavi.github.io/BuildABiocWorkshop/articles/HOWTO_BUILD_WORKSHOP.html#6-add-secrets-to-github-repo - ## Check https://github.com/docker/build-push-action/tree/releases/v1 - ## for more details. - - uses: docker/build-push-action@v1 - if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && runner.os == 'Linux' " + + ## Code adapted from + ## https://github.com/waldronlab/cBioPortalData/blob/e0440a4445f0cc731e426363a76faa22ee5e0f9d/.github/workflows/devel_check_dock.yml#L65-L92 + docker-build-and-push: + runs-on: ubuntu-latest + needs: build-check + steps: + - name: Checkout Repository + if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'" + uses: actions/checkout@v3 + + - name: Register repo name + if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'" + id: reg_repo_name + run: | + echo CONT_IMG_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + + - name: Set up QEMU + if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'" + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'" + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel'" + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + ## Note that DOCKERHUB_TOKEN is really a token for your dockerhub + ## account, not your actual dockerhub account password. You can get it + ## from https://hub.docker.com/settings/security. + ## Check https://github.com/docker/build-push-action/tree/v4.0.0 + ## for more details. + ## Alternatively, try checking + ## https://seandavi.github.io/BuildABiocWorkshop/articles/HOWTO_BUILD_WORKSHOP.html. + + - name: Build and Push Docker + if: "!contains(github.event.head_commit.message, '/nodocker') && env.run_docker == 'true' && github.ref == 'refs/heads/devel' && success()" + uses: docker/build-push-action@v4 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - repository: computational-metabolomics/structtoolbox - tag_with_ref: true - tag_with_sha: true - tags: latest + context: . + push: true + tags: > + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:latest, + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.CONT_IMG_NAME }}:devel diff --git a/DESCRIPTION b/DESCRIPTION index 9ee01c6..d6d4985 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: structToolbox Type: Package Title: Data processing & analysis tools for Metabolomics and other omics -Version: 1.13.5 +Version: 1.13.6 Authors@R: c( person( c("Gavin","Rhys"), diff --git a/NAMESPACE b/NAMESPACE index dbbfe1c..4f60e99 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -126,6 +126,6 @@ import(methods) import(scales) import(stats) import(struct) +import(utils) importFrom(scales,squish) importFrom(sp,point.in.polygon) -importFrom(utils,capture.output) diff --git a/R/PCA_class.R b/R/PCA_class.R index ea98d95..392a57b 100644 --- a/R/PCA_class.R +++ b/R/PCA_class.R @@ -1,8 +1,6 @@ -#' @eval get_description('PCA') +#' @eval struct::get_description('PCA') #' @import struct #' @export PCA -#' @examples -#' M = PCA() PCA = function(number_components=2,...) { out=struct::new_struct('PCA', number_components=number_components, diff --git a/R/forward_selection_by_rank_class.R b/R/forward_selection_by_rank_class.R index c5727f2..08a93ab 100644 --- a/R/forward_selection_by_rank_class.R +++ b/R/forward_selection_by_rank_class.R @@ -21,7 +21,13 @@ #' M = run(M,D,balanced_accuracy()) #' #' @export forward_selection_by_rank -forward_selection_by_rank = function(min_no_vars=1,max_no_vars=100,step_size=1,factor_name,variable_rank,...) { +forward_selection_by_rank = function( + min_no_vars=1, + max_no_vars=100, + step_size=1, + factor_name, + variable_rank, + ...) { out=struct::new_struct('forward_selection_by_rank', min_no_vars=min_no_vars, max_no_vars=max_no_vars, @@ -49,7 +55,7 @@ forward_selection_by_rank = function(min_no_vars=1,max_no_vars=100,step_size=1,f smoothed='entity', searchlist='entity' ), - prototype = list(variable_rank=c(1,2,3), + prototype = list( name = 'Forward selection by rank', description = paste0('A model is trained and performance metric ', 'computed by including increasing numbers of features in the model. ', @@ -57,13 +63,13 @@ forward_selection_by_rank = function(min_no_vars=1,max_no_vars=100,step_size=1,f 'which is computed from another variable e.g. VIP score. An "optimal"', 'subset of features is suggested by minimising the input performance metric.'), result='results', - .params=c('min_no_vars','max_no_vars','step_size','factor_name'), + .params=c('min_no_vars','max_no_vars','step_size','factor_name','variable_rank'), .outputs=c('metric','results','chosen_vars','smoothed','searchlist'), variable_rank=entity( name = 'Variable rank', description = 'The values used to rank the features.', type=c('numeric','integer'), - value=numeric(0) + value=1 ), min_no_vars = entity( name = 'Minimum number of variables', diff --git a/R/structToolbox.R b/R/structToolbox.R index 2619b93..8b40159 100644 --- a/R/structToolbox.R +++ b/R/structToolbox.R @@ -7,5 +7,6 @@ #' @import struct #' @import methods #' @import stats +#' @import utils NULL ## NULL diff --git a/R/zzz.R b/R/zzz.R index ca7f8b6..3181903 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -10,169 +10,6 @@ if(getRversion() >= "2.15.1"){ -#' @importFrom utils capture.output -get_description=function(id) { - - # object template - M=new_struct(id) - - # title - str=paste0('@title ', M$name) - - # get description - str=c(str,paste0('@description ',M$description)) - - # citations - cits=citations(M) - cits[length(cits)]=NULL - for (k in seq_along(cits)) { - cit=format(cits[[k]],style='text') - str=c(str,paste0('@references ',cit)) - } - - # get libraries - if (length(M$libraries)>0) { - str2=paste0('@details ', - 'This object makes use of functionality from the following packages:', - '\\itemize{' - ) - for (k in seq_along(M$libraries)) { - str2=paste0(str2,'\\item{\\code{',M$libraries[k],'}}') - } - str2=paste0(str2,'}') - str=c(str,str2) - } - - # parameters - P=formals(id) - - # for each parameter generate some text - D=list() - for (k in seq_along(P)) { - - # skip if ellipsis - if (names(P)[k]=='...') { - D[[k]]= paste0('@param ',names(P)[k], - ' Additional slots and values passed to \\code{struct_class}.') - next - } - - D[[k]]=stringify_params(M,names(P)[k],type='param',val=P[[k]]) - } - str=c(str,D) - - # add outputs and descriptions to value - O = output_list(M) - - D=list() - for (k in seq_along(O)) { - D[[k]]=stringify_params(M,names(O)[k],type='output',val=O[[k]]) - } - - if (length(D)>0){ - str=c(str, - paste0('@return ','A \\code{', class(M)[1],'} object with the following \\code{output} slots:' ), - '\\tabular{ll}{', - D, - '}') - } else{ - str=c(str,'@return ','A \\code{', class(M)[1],'} object. This object has no \\code{output} slots.') - if (is(M,'chart')) { - str=c(str, 'See \\code{\\link[struct]{chart_plot}} in the \\code{struct} package to plot this chart object.') - } - - } - - return(unlist(str)) -} - - - - -stringify_params = function(M,P,type='param',val=NULL) { - - # get parameter as an object - if (type=='param') { - p = param_obj(M,P) - } else { - p=output_obj(M,P) - } - - # if its an entity object then get its description - if (is(p,'entity')) { - d = p$description - # ensure first character is upper case and last character is a fullstop. - d=unlist(lapply(d,function(x){ - # first is upper - substr(x,1,1) = toupper(substr(x,1,1)) - # last is . - if (substr(x,nchar(x),nchar(x)) != '.') { - x=paste0(x,'.') - } - return(x) - })) - - # if d has more than one entry and is a named vector then... - if (length(d)>1) { - # if it has names then - if (!is.null(names(d))) { - # create a named list - it_list='\\itemize{' - for (j in seq_along(d)) { - it_list=paste0(it_list,'\\item{\\code{"',names(d)[j],'"}: ',d[j],'}') - } - } else { - # no names so use a bulleted list - it_list='\\itemize{' - for (j in seq_along(d)) { - it_list=paste0(it_list,'\\item{',d[j],'}') - } - } - - # add list - it_list=paste0(it_list,'}') - d=paste0(p$name,'. Allowed values are limited to the following: ',it_list) - } - - # add the allowed types - t = p$type - - } else { - # if not an entity then there is no description - d = '' - t=class(val)[[1]] - } - # collapse if more than 1 - t=paste0(t,collapse=', ') - # enclose in brackets - t=paste0('(',t,') ') - # add to description - d=paste0(t,d) - - # if the parameter has a default, then add on the text. - if ( (!is(val,'name')) & type=='param'){ - d=paste0(d, ' The default is ') - if (length(val)>1) { - d=paste0(d,'\\code{',capture.output(val),'}.') - } else { - if (is.null(val)) { - d=paste0(d,'\\code{NULL}.') - } else if (is(val,'character')) { - d=paste0(d,'\\code{"',val,'"}.') - } else { - d=paste0(d,'\\code{',val,'}.') - } - } - } else { - # no default is provided - } - if (type=='param') { - OUT=paste0('@', type, ' ', P, ' ', d) - } else { - OUT=paste0('\\code{',P,'} \\tab ',d,' \\cr') - } -} - #' ontology cache diff --git a/man/ANOVA.Rd b/man/ANOVA.Rd index a592670..4142b53 100644 --- a/man/ANOVA.Rd +++ b/man/ANOVA.Rd @@ -7,13 +7,13 @@ ANOVA(alpha = 0.05, mtc = "fdr", formula, ss_type = "III", ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{formula}{(formula) A symbolic description of the model to be fitted.} -\item{ss_type}{(character) ANOVA sum of squares. Allowed values are limited to the following: \itemize{\item{\code{"I"}: Type I sum of squares.}\item{\code{"II"}: Type II sum of squares.}\item{\code{"III"}: Type III sum of squares.}} The default is \code{"III"}.} +\item{ss_type}{(character) ANOVA sum of squares. Allowed values are limited to the following: \itemize{ \item{\code{"I"}: Type I sum of squares.}\item{\code{"II"}: Type II sum of squares.}\item{\code{"III"}: Type III sum of squares.}} The default is \code{"III"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -29,9 +29,21 @@ A \code{ANOVA} object with the following \code{output} slots: Analysis of Variance (ANOVA) is a univariate method used to analyse the difference among group means. Multiple test corrected p-values are computed to indicate significance for each feature. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{car}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{car}}} } +\section{Inheritance}{ + +A \code{ANOVA} object inherits the following \code{struct} classes: \cr\cr +\code{ANOVA()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = ANOVA( + alpha = 0.05, + mtc = "fdr", + formula = y ~ x, + ss_type = "III") + D = iris_DatasetExperiment() M = ANOVA(formula=y~Species) M = model_apply(M,D) diff --git a/man/AUC.Rd b/man/AUC.Rd index 3b9e421..b3e0e8c 100644 --- a/man/AUC.Rd +++ b/man/AUC.Rd @@ -17,7 +17,15 @@ AUC \description{ The area under the ROC curve of a classifier is estimated using the trapezoid method. } +\section{Inheritance}{ + +A \code{AUC} object inherits the following \code{struct} classes: \cr\cr +\code{AUC()} ⭢ \code{metric()} ⭢ \code{struct_class()} +} + \examples{ +M = AUC() + D = iris_DatasetExperiment() XCV = kfold_xval(folds=5,factor_name='Species') * (mean_centre() + PLSDA(number_components=2,factor_name='Species')) diff --git a/man/DFA.Rd b/man/DFA.Rd index 1897766..282fa15 100644 --- a/man/DFA.Rd +++ b/man/DFA.Rd @@ -9,7 +9,7 @@ DFA(factor_name, number_components = 2, ...) \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{number_components}{(numeric, integer) The number of DFA components calculated. The default is \code{2}.} +\item{number_components}{(numeric, integer) The number of DFA components calculated. The default is \code{2}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -25,7 +25,17 @@ A \code{DFA} object with the following \code{output} slots: \description{ Discriminant Factor Analysis (DFA) is a supervised classification method. Using a linear combination of the input variables, DFA finds new orthogonal axes (canonical values) to minimize the variance within each given class and maximize variance between classes. } +\section{Inheritance}{ + +A \code{DFA} object inherits the following \code{struct} classes: \cr\cr +\code{DFA()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = DFA( + factor_name = "V1", + number_components = 2) + D = iris_DatasetExperiment() M = DFA(factor_name='Species') M = model_apply(M,D) diff --git a/man/DatasetExperiment_boxplot.Rd b/man/DatasetExperiment_boxplot.Rd index 0bd50a2..e366bef 100644 --- a/man/DatasetExperiment_boxplot.Rd +++ b/man/DatasetExperiment_boxplot.Rd @@ -15,11 +15,11 @@ DatasetExperiment_boxplot( \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{by_sample}{(logical) Plot by sample. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The data is plotted across features for a subset of samples.}\item{\code{"FALSE"}: The data is plotted across samples for a subset of features.}} The default is \code{TRUE}.} +\item{by_sample}{(logical) Plot by sample. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The data is plotted across features for a subset of samples.}\item{\code{"FALSE"}: The data is plotted across samples for a subset of features.}} The default is \code{TRUE}.\cr} -\item{per_class}{(logical) Plot per class. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The data is plotted for each class.}\item{\code{"FALSE"}: The data is plotted for all samples.}} The default is \code{TRUE}.} +\item{per_class}{(logical) Plot per class. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The data is plotted for each class.}\item{\code{"FALSE"}: The data is plotted for all samples.}} The default is \code{TRUE}.\cr} -\item{number}{(numeric, integer) The number of features/samples plotted. The default is \code{50}.} +\item{number}{(numeric, integer) The number of features/samples plotted. The default is \code{50}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -34,7 +34,19 @@ struct object \description{ A boxplot to visualise the distribution of values within a subset of features. } +\section{Inheritance}{ + +A \code{DatasetExperiment_boxplot} object inherits the following \code{struct} classes: \cr\cr +\code{DatasetExperiment_boxplot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = DatasetExperiment_boxplot( + factor_name = "V1", + by_sample = FALSE, + per_class = FALSE, + number = 50) + D = MTBLS79_DatasetExperiment() C = DatasetExperiment_boxplot(factor_name='Class',number=10,per_class=FALSE) chart_plot(C,D) diff --git a/man/DatasetExperiment_dist.Rd b/man/DatasetExperiment_dist.Rd index cbe0dfb..a7b9116 100644 --- a/man/DatasetExperiment_dist.Rd +++ b/man/DatasetExperiment_dist.Rd @@ -9,7 +9,7 @@ DatasetExperiment_dist(factor_name, per_class = TRUE, ...) \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{per_class}{(logical) Plot per class. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The distributions are plotted for each class.}\item{\code{"FALSE"}: The distribution is plotted for all samples.}} The default is \code{TRUE}.} +\item{per_class}{(logical) Plot per class. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The distributions are plotted for each class.}\item{\code{"FALSE"}: The distribution is plotted for all samples.}} The default is \code{TRUE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -22,7 +22,17 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram to visualise the distribution of values within features. } +\section{Inheritance}{ + +A \code{DatasetExperiment_dist} object inherits the following \code{struct} classes: \cr\cr +\code{DatasetExperiment_dist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = DatasetExperiment_dist( + factor_name = "V1", + per_class = FALSE) + D = MTBLS79_DatasetExperiment() C = DatasetExperiment_dist(factor_name='Class') chart_plot(C,D) diff --git a/man/DatasetExperiment_factor_boxplot.Rd b/man/DatasetExperiment_factor_boxplot.Rd index c382ba0..663f2f6 100644 --- a/man/DatasetExperiment_factor_boxplot.Rd +++ b/man/DatasetExperiment_factor_boxplot.Rd @@ -22,7 +22,17 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ Boxplot for a feature to visualise the distribution of values within each group } +\section{Inheritance}{ + +A \code{DatasetExperiment_factor_boxplot} object inherits the following \code{struct} classes: \cr\cr +\code{DatasetExperiment_factor_boxplot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = DatasetExperiment_factor_boxplot( + factor_names = "V1", + feature_to_plot = "V1") + D = iris_DatasetExperiment() C = DatasetExperiment_factor_boxplot(factor_names='Species',feature_to_plot='Petal.Width') chart_plot(C,D) diff --git a/man/DatasetExperiment_heatmap.Rd b/man/DatasetExperiment_heatmap.Rd index 90d9c52..5cb8e2b 100644 --- a/man/DatasetExperiment_heatmap.Rd +++ b/man/DatasetExperiment_heatmap.Rd @@ -21,9 +21,18 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A heatmap to visualise the measured values in a data matrix. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{reshape2}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{reshape2}}} } +\section{Inheritance}{ + +A \code{DatasetExperiment_heatmap} object inherits the following \code{struct} classes: \cr\cr +\code{DatasetExperiment_heatmap()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = DatasetExperiment_heatmap( + na_colour = "#FF00E4") + D = iris_DatasetExperiment() C = DatasetExperiment_heatmap() chart_plot(C,D) diff --git a/man/HCA.Rd b/man/HCA.Rd index e141b92..7033bd2 100644 --- a/man/HCA.Rd +++ b/man/HCA.Rd @@ -13,11 +13,11 @@ HCA( ) } \arguments{ -\item{dist_method}{(character) Distance measure. Allowed values are limited to the following: \itemize{\item{\code{"euclidean"}: The euclidean distance (2 norm).}\item{\code{"maximum"}: The maximum distance.}\item{\code{"manhattan"}: The absolute distance (1 norm).}\item{\code{"canberra"}: A weighted version of the mahattan distance.}\item{\code{"minkowski"}: A generalisation of manhattan and euclidean distance to nth norm.}} The default is \code{"euclidean"}.} +\item{dist_method}{(character) Distance measure. Allowed values are limited to the following: \itemize{ \item{\code{"euclidean"}: The euclidean distance (2 norm).}\item{\code{"maximum"}: The maximum distance.}\item{\code{"manhattan"}: The absolute distance (1 norm).}\item{\code{"canberra"}: A weighted version of the mahattan distance.}\item{\code{"minkowski"}: A generalisation of manhattan and euclidean distance to nth norm.}} The default is \code{"euclidean"}.} -\item{cluster_method}{(character) Agglomeration method. Allowed values are limited to the following: \itemize{\item{\code{"ward.D"}: Ward clustering.}\item{\code{"ward.D2"}: Ward clustering using sqaured distances.}\item{\code{"single"}: Single linkage.}\item{\code{"complete"}: Complete linkage.}\item{\code{"average"}: Average linkage (UPGMA).}\item{\code{"mcquitty"}: McQuitty linkage (WPGMA).}\item{\code{"median"}: Median linkage (WPGMC).}\item{\code{"centroid"}: Centroid linkage (UPGMC).}} The default is \code{"complete"}.} +\item{cluster_method}{(character) Agglomeration method. Allowed values are limited to the following: \itemize{ \item{\code{"ward.D"}: Ward clustering.}\item{\code{"ward.D2"}: Ward clustering using sqaured distances.}\item{\code{"single"}: Single linkage.}\item{\code{"complete"}: Complete linkage.}\item{\code{"average"}: Average linkage (UPGMA).}\item{\code{"mcquitty"}: McQuitty linkage (WPGMA).}\item{\code{"median"}: Median linkage (WPGMC).}\item{\code{"centroid"}: Centroid linkage (UPGMC).}} The default is \code{"complete"}.} -\item{minkowski_power}{(numeric) The default is \code{2}.} +\item{minkowski_power}{(numeric) The default is \code{2}.\cr} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -35,9 +35,21 @@ A \code{HCA} object with the following \code{output} slots: Hierarchical Cluster Analysis is a numerical technique that uses agglomerative clustering to identify clusters or groupings of samples. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{stats}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{stats}}} } +\section{Inheritance}{ + +A \code{HCA} object inherits the following \code{struct} classes: \cr\cr +\code{HCA()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = HCA( + dist_method = "euclidean", + cluster_method = "complete", + minkowski_power = numeric(0), + factor_name = "V1") + D = iris_DatasetExperiment() M = HCA(factor_name='Species') M = model_apply(M,D) diff --git a/man/HSD.Rd b/man/HSD.Rd index a89058d..d3bd20f 100644 --- a/man/HSD.Rd +++ b/man/HSD.Rd @@ -7,13 +7,13 @@ HSD(alpha = 0.05, mtc = "fdr", formula, unbalanced = FALSE, ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{formula}{(formula) A symbolic description of the model to be fitted.} -\item{unbalanced}{(logical) Unbalanced model. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: A correction is applied for unbalanced designs.}\item{\code{"FALSE"}: No correction is applied for unbalanced designs.}} The default is \code{FALSE}.} +\item{unbalanced}{(logical) Unbalanced model. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: A correction is applied for unbalanced designs.}\item{\code{"FALSE"}: No correction is applied for unbalanced designs.}} The default is \code{FALSE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -31,15 +31,27 @@ A \code{HSD} object with the following \code{output} slots: Tukey's HSD post hoc test is a modified t-test applied for all features to all pairs of levels in a factor. It is used to determine which groups are different (if any). A multiple test corrected p-value is computed to indicate which groups are significantly different to the others for each feature. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{agricolae}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{agricolae}}} } +\section{Inheritance}{ + +A \code{HSD} object inherits the following \code{struct} classes: \cr\cr +\code{HSD()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = HSD( + alpha = 0.05, + mtc = "fdr", + formula = y ~ x, + unbalanced = FALSE) + D = iris_DatasetExperiment() M = HSD(formula=y~Species) M = model_apply(M,D) } \references{ de Mendiburu F (2023). \emph{agricolae: Statistical Procedures for -Agricultural Research}. R package version 1.3-6, +Agricultural Research}. R package version 1.3-7, \url{https://CRAN.R-project.org/package=agricolae}. } diff --git a/man/HSDEM.Rd b/man/HSDEM.Rd index 794dca5..f7c9b25 100644 --- a/man/HSDEM.Rd +++ b/man/HSDEM.Rd @@ -7,9 +7,9 @@ HSDEM(alpha = 0.05, mtc = "fdr", formula, ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{formula}{(formula) A symbolic description of the model to be fitted.} @@ -26,9 +26,20 @@ A \code{HSDEM} object with the following \code{output} slots: Tukey's HSD post hoc test is a modified t-test applied for all features to all pairs of levels in a factor. It is used to determine which groups are different (if any). A multiple test corrected p-value is computed to indicate which groups are significantly different to the others for each feature. For mixed effects models estimated marginal means are used. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{emmeans}}\item{\code{nlme}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{emmeans}} \item{\code{nlme}}} } +\section{Inheritance}{ + +A \code{HSDEM} object inherits the following \code{struct} classes: \cr\cr +\code{HSDEM()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = HSDEM( + alpha = 0.05, + mtc = "fdr", + formula = y ~ x) + D = iris_DatasetExperiment() D$sample_meta$id=rownames(D) # dummy id column M = HSDEM(formula = y~Species+ Error(id/Species)) @@ -37,11 +48,11 @@ M = model_apply(M,D) } \references{ Lenth R (2023). \emph{emmeans: Estimated Marginal Means, aka Least-Squares -Means}. R package version 1.8.7, +Means}. R package version 1.9.0, \url{https://CRAN.R-project.org/package=emmeans}. Pinheiro J, Bates D, R Core Team (2023). \emph{nlme: Linear and Nonlinear -Mixed Effects Models}. R package version 3.1-162, +Mixed Effects Models}. R package version 3.1-164, \url{https://CRAN.R-project.org/package=nlme}. Pinheiro JC, Bates DM (2000). \emph{Mixed-Effects Models in S and S-PLUS}. diff --git a/man/OPLSDA.Rd b/man/OPLSDA.Rd index dee497f..4426f0c 100644 --- a/man/OPLSDA.Rd +++ b/man/OPLSDA.Rd @@ -7,7 +7,7 @@ OPLSDA(number_components = 1, factor_name, ...) } \arguments{ -\item{number_components}{(numeric, integer) The number of orthgonal components. The default is \code{1}.} +\item{number_components}{(numeric, integer) The number of orthgonal components. The default is \code{1}.\cr} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -25,6 +25,16 @@ A \code{OPLSDA} object with the following \code{output} slots: OPLS splits a data matrix into two parts. One part contains information orthogonal to the input vector, and the other is non-orthogonal. } +\section{Inheritance}{ + +A \code{OPLSDA} object inherits the following \code{struct} classes: \cr\cr +\code{OPLSDA()} ⭢ \code{OPLSR()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = OPLSDA( + number_components = 2, + factor_name = "V1") + M = OPLSR('number_components'=2,factor_name='Species') } diff --git a/man/OPLSR.Rd b/man/OPLSR.Rd index c1a2b11..fac822c 100644 --- a/man/OPLSR.Rd +++ b/man/OPLSR.Rd @@ -7,7 +7,7 @@ OPLSR(number_components = 2, factor_name, ...) } \arguments{ -\item{number_components}{(numeric, integer) The number of orthgonal components. The default is \code{2}.} +\item{number_components}{(numeric, integer) The number of orthgonal components. The default is \code{2}.\cr} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -25,6 +25,16 @@ A \code{OPLSR} object with the following \code{output} slots: OPLS splits a data matrix into two parts. One part contains information orthogonal to the input vector, and the other is non-orthogonal. } +\section{Inheritance}{ + +A \code{OPLSR} object inherits the following \code{struct} classes: \cr\cr +\code{OPLSR()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = OPLSR( + number_components = 2, + factor_name = "V1") + M = OPLSR('number_components'=2,factor_name='Species') } diff --git a/man/PCA.Rd b/man/PCA.Rd index 491e9f6..dc2af19 100644 --- a/man/PCA.Rd +++ b/man/PCA.Rd @@ -7,7 +7,7 @@ PCA(number_components = 2, ...) } \arguments{ -\item{number_components}{(numeric, integer) The number of Principal Components calculated. The default is \code{2}.} +\item{number_components}{(numeric, integer) The number of Principal Components calculated. The default is \code{2}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -25,6 +25,14 @@ A \code{PCA} object with the following \code{output} slots: \description{ PCA is a multivariate data reduction technique. It summarises the data in a smaller number of Principal Components that maximise variance. } +\section{Inheritance}{ + +A \code{PCA} object inherits the following \code{struct} classes: \cr\cr +\code{PCA()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ -M = PCA() +M = PCA( + number_components = 2) + } diff --git a/man/PLSDA.Rd b/man/PLSDA.Rd index 724ae1d..12f5def 100644 --- a/man/PLSDA.Rd +++ b/man/PLSDA.Rd @@ -7,11 +7,11 @@ PLSDA(number_components = 2, factor_name, pred_method = "max_prob", ...) } \arguments{ -\item{number_components}{(numeric, integer) The number of PLS components. The default is \code{2}.} +\item{number_components}{(numeric, integer) The number of PLS components. The default is \code{2}.\cr} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{pred_method}{(character) Prediction method. Allowed values are limited to the following: \itemize{\item{\code{"max_yhat"}: The predicted group is selected based on the largest value of y_hat.}\item{\code{"max_prob"}: The predicted group is selected based on the largest probability of group membership.}} The default is \code{"max_prob"}.} +\item{pred_method}{(character) Prediction method. Allowed values are limited to the following: \itemize{ \item{\code{"max_yhat"}: The predicted group is selected based on the largest value of y_hat.}\item{\code{"max_prob"}: The predicted group is selected based on the largest probability of group membership.}} The default is \code{"max_prob"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -37,14 +37,25 @@ A \code{PLSDA} object with the following \code{output} slots: PLS is a multivariate regression technique that extracts latent variables maximising covariance between the input data and the response. The Discriminant Analysis variant uses group labels in the response variable. For >2 groups a 1-vs-all approach is used. Group membership can be predicted for test samples based on a probability estimate of group membership, or the estimated y-value. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pls}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pls}}} } +\section{Inheritance}{ + +A \code{PLSDA} object inherits the following \code{struct} classes: \cr\cr +\code{PLSDA()} ⭢ \code{PLSR()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = PLSDA( + number_components = 2, + factor_name = "V1", + pred_method = "max_prob") + M = PLSDA('number_components'=2,factor_name='Species') } \references{ Liland K, Mevik B, Wehrens R (2023). \emph{pls: Partial Least Squares and -Principal Component Regression}. R package version 2.8-2, +Principal Component Regression}. R package version 2.8-3, \url{https://CRAN.R-project.org/package=pls}. Perez NF, Ferre J, Boque R (2009). "Calculation of the reliability of diff --git a/man/PLSR.Rd b/man/PLSR.Rd index 0fe560b..d33f469 100644 --- a/man/PLSR.Rd +++ b/man/PLSR.Rd @@ -7,7 +7,7 @@ PLSR(number_components = 2, factor_name, ...) } \arguments{ -\item{number_components}{(numeric, integer) The number of PLS components. The default is \code{2}.} +\item{number_components}{(numeric, integer) The number of PLS components. The default is \code{2}.\cr} \item{factor_name}{(character) The name of sample meta column(s) to use.} @@ -32,13 +32,23 @@ A \code{PLSR} object with the following \code{output} slots: PLS is a multivariate regression technique that extracts latent variables maximising covariance between the input data and the response. For regression the response is a continuous variable. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pls}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pls}}} } +\section{Inheritance}{ + +A \code{PLSR} object inherits the following \code{struct} classes: \cr\cr +\code{PLSR()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = PLSR( + number_components = 2, + factor_name = "V1") + M = PLSR(factor_name='run_order') } \references{ Liland K, Mevik B, Wehrens R (2023). \emph{pls: Partial Least Squares and -Principal Component Regression}. R package version 2.8-2, +Principal Component Regression}. R package version 2.8-3, \url{https://CRAN.R-project.org/package=pls}. } diff --git a/man/SVM.Rd b/man/SVM.Rd index 019174d..ea9a0ab 100644 --- a/man/SVM.Rd +++ b/man/SVM.Rd @@ -18,15 +18,15 @@ SVM( \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{kernel}{(character) Kernel type. Allowed values are limited to the following: \itemize{\item{\code{"linear"}: .}\item{\code{"polynomial"}: .}\item{\code{"radial"}: .}\item{\code{"sigmoid"}: .}} The default is \code{"linear"}.} +\item{kernel}{(character) Kernel type. Allowed values are limited to the following: \itemize{ \item{\code{"linear"}: .}\item{\code{"polynomial"}: .}\item{\code{"radial"}: .}\item{\code{"sigmoid"}: .}} The default is \code{"linear"}.} -\item{degree}{(numeric) The polynomial degree. The default is \code{3}.} +\item{degree}{(numeric) The polynomial degree. The default is \code{3}.\cr} -\item{gamma}{(numeric) The gamma parameter. The default is \code{1}.} +\item{gamma}{(numeric) The gamma parameter. The default is \code{1}.\cr} -\item{coef0}{(numeric) The offset coefficient. The default is \code{0}.} +\item{coef0}{(numeric) The offset coefficient. The default is \code{0}.\cr} -\item{cost}{(numeric) The cost of violating the constraints. The default is \code{1}.} +\item{cost}{(numeric) The cost of violating the constraints. The default is \code{1}.\cr} \item{class_weights}{(numeric, character, NULL) A named vector of weights for the different classes. Specifying "inverse" will choose the weights inversely proportional to the class distribution. The default is \code{NULL}.} @@ -49,15 +49,30 @@ struct object Support Vector Machines (SVM) are a machine learning algorithm for classification. They can make use of kernel functions to generate highly non-linear boundaries between groups. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{e1071}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{e1071}}} } +\section{Inheritance}{ + +A \code{SVM} object inherits the following \code{struct} classes: \cr\cr +\code{SVM()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = SVM( + factor_name = "V1", + kernel = "linear", + degree = 3, + gamma = 1, + coef0 = 0, + cost = 1, + class_weights = 1) + M = SVM(factor_name='Species',gamma=1) } \references{ Meyer D, Dimitriadou E, Hornik K, Weingessel A, Leisch F (2023). \emph{e1071: Misc Functions of the Department of Statistics, Probability -Theory Group (Formerly: E1071), TU Wien}. R package version 1.7-13, +Theory Group (Formerly: E1071), TU Wien}. R package version 1.7-14, \url{https://CRAN.R-project.org/package=e1071}. Brereton RG, Lloyd GR (2010). "Support Vector Machines for diff --git a/man/autoscale.Rd b/man/autoscale.Rd index 2c43612..ef6758a 100644 --- a/man/autoscale.Rd +++ b/man/autoscale.Rd @@ -7,7 +7,7 @@ autoscale(mode = "data", ...) } \arguments{ -\item{mode}{(character) Mode of action. Allowed values are limited to the following: \itemize{\item{\code{"data"}: Autoscaling is applied to the data matrix only.}\item{\code{"sample_meta"}: Autoscaling is applied to the sample_meta data only.}\item{\code{"both"}: Autoscaling is applied to both the data matrix and the meta data.}} The default is \code{"data"}.} +\item{mode}{(character) Mode of action. Allowed values are limited to the following: \itemize{ \item{\code{"data"}: Autoscaling is applied to the data matrix only.}\item{\code{"sample_meta"}: Autoscaling is applied to the sample_meta data only.}\item{\code{"both"}: Autoscaling is applied to both the data matrix and the meta data.}} The default is \code{"data"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -24,7 +24,16 @@ A \code{autoscale} object with the following \code{output} slots: \description{ Each variable/feature is mean centred and scaled by the standard deviation. The transformed variables have zero-mean and unit-variance. } +\section{Inheritance}{ + +A \code{autoscale} object inherits the following \code{struct} classes: \cr\cr +\code{autoscale()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = autoscale( + mode = "data") + D = iris_DatasetExperiment() M = autoscale() M = model_train(M,D) diff --git a/man/balanced_accuracy.Rd b/man/balanced_accuracy.Rd index c1dc7d6..01f676c 100644 --- a/man/balanced_accuracy.Rd +++ b/man/balanced_accuracy.Rd @@ -17,7 +17,15 @@ balanced_accuracy \description{ Balanced Accuracy is the average proportion of correctly classified samples across all groups. } +\section{Inheritance}{ + +A \code{balanced_accuracy} object inherits the following \code{struct} classes: \cr\cr +\code{balanced_accuracy()} ⭢ \code{metric()} ⭢ \code{struct_class()} +} + \examples{ +M = balanced_accuracy() + D = iris_DatasetExperiment() XCV = kfold_xval(folds=5,factor_name='Species') * (mean_centre() + PLSDA(number_components=2,factor_name='Species')) diff --git a/man/blank_filter.Rd b/man/blank_filter.Rd index 2704f0c..6f241e3 100644 --- a/man/blank_filter.Rd +++ b/man/blank_filter.Rd @@ -14,7 +14,7 @@ blank_filter( ) } \arguments{ -\item{fold_change}{(numeric) Features with fold change less than this value are removed. The default is \code{20}.} +\item{fold_change}{(numeric) Features with fold change less than this value are removed. The default is \code{20}.\cr} \item{blank_label}{(character) The label used to identify blank samples. The default is \code{"blank"}.} @@ -22,7 +22,7 @@ blank_filter( \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{fraction_in_blank}{(numeric) Features present in less than this proportion of the blanks are not considered for removal. The default is \code{0}.} +\item{fraction_in_blank}{(numeric) Features present in less than this proportion of the blanks are not considered for removal. The default is \code{0}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -37,9 +37,22 @@ A \code{blank_filter} object with the following \code{output} slots: A blank filter filters features by comparing the median intensity of blank samples to the median intensity of samples. Features where the relative intensity (fold change) is not large when compared to the blank are removed. The number of times a feature is detected across all blank samples may also be considered. If the feature is not detected in a high enough proportion of the blanks then it is not removed. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{blank_filter} object inherits the following \code{struct} classes: \cr\cr +\code{blank_filter()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = blank_filter( + fold_change = 20, + blank_label = "Blank", + qc_label = "QC", + factor_name = "V1", + fraction_in_blank = 0) + D = iris_DatasetExperiment() M = blank_filter(fold_change=2, factor_name='Species', @@ -51,5 +64,5 @@ M = model_apply(M,D) Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. } diff --git a/man/blank_filter_hist.Rd b/man/blank_filter_hist.Rd index 240588e..4232128 100644 --- a/man/blank_filter_hist.Rd +++ b/man/blank_filter_hist.Rd @@ -18,6 +18,14 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram of the calculated fold changes for the blank filter (median samples divided by median blanks) } +\section{Inheritance}{ + +A \code{blank_filter_hist} object inherits the following \code{struct} classes: \cr\cr +\code{blank_filter_hist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = blank_filter_hist() + C = blank_filter_hist() } diff --git a/man/bootstrap.Rd b/man/bootstrap.Rd index 7d860ca..6fb8dc9 100644 --- a/man/bootstrap.Rd +++ b/man/bootstrap.Rd @@ -7,7 +7,7 @@ bootstrap(number_of_repetitions = 100, collect, ...) } \arguments{ -\item{number_of_repetitions}{(numeric, integer) The number of bootstrap repetitions. The default is \code{100}.} +\item{number_of_repetitions}{(numeric, integer) The number of bootstrap repetitions. The default is \code{100}.\cr} \item{collect}{(character) The name of a model output to collect over all bootstrap repetitions, in addition to the input metric.} @@ -24,6 +24,16 @@ A \code{bootstrap} object with the following \code{output} slots: \description{ In bootstrap resampling a subset of samples is selected at random with replacement to form a training set. Any sample not selected for training is included in the test set. This process is repeated many times, and performance metrics are computed for each repetition. } +\section{Inheritance}{ + +A \code{bootstrap} object inherits the following \code{struct} classes: \cr\cr +\code{bootstrap()} ⭢ \code{resampler()} ⭢ \code{iterator()} ⭢ \code{struct_class()} +} + \examples{ +M = bootstrap( + number_of_repetitions = 10, + collect = "vip") + I = bootstrap(number_of_repetitions = 10, collect = 'vip') } diff --git a/man/classical_lsq.Rd b/man/classical_lsq.Rd index 80cc256..2155289 100644 --- a/man/classical_lsq.Rd +++ b/man/classical_lsq.Rd @@ -7,13 +7,13 @@ classical_lsq(alpha = 0.05, mtc = "fdr", factor_names, intercept = TRUE, ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{factor_names}{(character, list) The column names to regress against. If a character vector then the same list is used ofr all features. If a list of character vectors is provided it is assumed there is a different set of columns for each feature.} -\item{intercept}{(logical) Model intercept. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: An intercept term is included in the model.}\item{\code{"FALSE"}: An intercept term is not included in the model.}} The default is \code{TRUE}.} +\item{intercept}{(logical) Model intercept. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: An intercept term is included in the model.}\item{\code{"FALSE"}: An intercept term is not included in the model.}} The default is \code{TRUE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -30,7 +30,19 @@ A \code{classical_lsq} object with the following \code{output} slots: \description{ In univariate classical least squares regression a line is fitted between each feature/variable and a response variable. The fitted line minimises the sum of squared differences between the true response and the predicted response. The coefficients (offset, gradient) of the fit can be tested for significance. } +\section{Inheritance}{ + +A \code{classical_lsq} object inherits the following \code{struct} classes: \cr\cr +\code{classical_lsq()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = classical_lsq( + alpha = 0.05, + mtc = "fdr", + factor_names = "V1", + intercept = FALSE) + D = iris_DatasetExperiment() M = classical_lsq(factor_names = 'Species') M = model_apply(M,D) diff --git a/man/compare_dist.Rd b/man/compare_dist.Rd index fff37e6..3821280 100644 --- a/man/compare_dist.Rd +++ b/man/compare_dist.Rd @@ -20,7 +20,16 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ Histograms and boxplots computed across samples and features are used to visually compare two datasets e.g. before and after filtering and/or normalisation. } +\section{Inheritance}{ + +A \code{compare_dist} object inherits the following \code{struct} classes: \cr\cr +\code{compare_dist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = compare_dist( + factor_name = "V1") + D1=MTBLS79_DatasetExperiment(filtered=FALSE) D2=MTBLS79_DatasetExperiment(filtered=TRUE) C = compare_dist(factor_name='Class') diff --git a/man/confounders_clsq.Rd b/man/confounders_clsq.Rd index 4b3a32a..4fa71d8 100644 --- a/man/confounders_clsq.Rd +++ b/man/confounders_clsq.Rd @@ -14,15 +14,15 @@ confounders_clsq( ) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{factor_name}{(character) The name of the main factor with which other factors may be confounding.} \item{confounding_factors}{(character) The name(s) of factor(s) that are potential confounding factors.} -\item{threshold}{(numeric) Factors with a delta greater than the the threshold are considered to be confounding. The default is \code{0.15}.} +\item{threshold}{(numeric) Factors with a delta greater than the the threshold are considered to be confounding. The default is \code{0.15}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -39,7 +39,20 @@ A \code{confounders_clsq} object with the following \code{output} slots: \description{ Univariate least squares regression models are used to compare models with and without potential confounding factors included. The change in coefficients (delta) is then computed for each potential confounding factor. Factors with a large delta are said to be having a large impact on the model and are therefore confounding. p-values are computed for models with confounders included to reduce potential false positives. Only suitable for main factors with 2 levels. } +\section{Inheritance}{ + +A \code{confounders_clsq} object inherits the following \code{struct} classes: \cr\cr +\code{confounders_clsq()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = confounders_clsq( + alpha = 0.05, + mtc = "fdr", + factor_name = character(0), + confounding_factors = character(0), + threshold = 0.15) + D = MTBLS79_DatasetExperiment() M = filter_by_name(mode='include',dimension='variable', names=colnames(D$data)[1:10]) + # first 10 features diff --git a/man/confounders_lsq_barchart.Rd b/man/confounders_lsq_barchart.Rd index e8ba91b..4bbae81 100644 --- a/man/confounders_lsq_barchart.Rd +++ b/man/confounders_lsq_barchart.Rd @@ -9,7 +9,7 @@ confounders_lsq_barchart(feature_to_plot, threshold = 10, ...) \arguments{ \item{feature_to_plot}{(numeric, character, integer) The column name of the feature to be plotted.} -\item{threshold}{(numeric) A horizontal line is plotted to indicate the threshold. The default is \code{10}.} +\item{threshold}{(numeric) A horizontal line is plotted to indicate the threshold. The default is \code{10}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -22,7 +22,17 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A barchart of the relative change (delta) in regression coefficient when potential confounding factors are included, and excluded, from the model. Factors with a large delta are considered to be confounding factors. } +\section{Inheritance}{ + +A \code{confounders_lsq_barchart} object inherits the following \code{struct} classes: \cr\cr +\code{confounders_lsq_barchart()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = confounders_lsq_barchart( + feature_to_plot = 1, + threshold = 10) + D = MTBLS79_DatasetExperiment() M = filter_by_name(mode='include',dimension='variable', names=colnames(D$data)[1:10]) + # first 10 features diff --git a/man/confounders_lsq_boxplot.Rd b/man/confounders_lsq_boxplot.Rd index 9c71075..e2ba63c 100644 --- a/man/confounders_lsq_boxplot.Rd +++ b/man/confounders_lsq_boxplot.Rd @@ -7,7 +7,7 @@ confounders_lsq_boxplot(threshold = 10, ...) } \arguments{ -\item{threshold}{(numeric) A horizontal line is plotted to indicate the threshold. The default is \code{10}.} +\item{threshold}{(numeric) A horizontal line is plotted to indicate the threshold. The default is \code{10}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -20,7 +20,16 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A boxplot of the relative change (delta) in regression coefficient when potential confounding factors are included, and excluded, from the model. Factors with a large delta are considered to be confounding factors. } +\section{Inheritance}{ + +A \code{confounders_lsq_boxplot} object inherits the following \code{struct} classes: \cr\cr +\code{confounders_lsq_boxplot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = confounders_lsq_boxplot( + threshold = 10) + D = MTBLS79_DatasetExperiment() M = filter_by_name(mode='include',dimension='variable', names=colnames(D$data)[1:10]) + # first 10 features diff --git a/man/constant_sum_norm.Rd b/man/constant_sum_norm.Rd index a14860f..22e1208 100644 --- a/man/constant_sum_norm.Rd +++ b/man/constant_sum_norm.Rd @@ -7,7 +7,7 @@ constant_sum_norm(scaling_factor = 1, ...) } \arguments{ -\item{scaling_factor}{(numeric) The scaling factor applied after normalisation. The default is \code{1}.} +\item{scaling_factor}{(numeric) The scaling factor applied after normalisation. The default is \code{1}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -21,7 +21,16 @@ A \code{constant_sum_norm} object with the following \code{output} slots: \description{ Each sample is normalised such that the total signal is equal to one (or a scaling factor if specified). } +\section{Inheritance}{ + +A \code{constant_sum_norm} object inherits the following \code{struct} classes: \cr\cr +\code{constant_sum_norm()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = constant_sum_norm( + scaling_factor = 1) + M = constant_sum_norm() } diff --git a/man/corr_coef.Rd b/man/corr_coef.Rd index f67d4b9..881565b 100644 --- a/man/corr_coef.Rd +++ b/man/corr_coef.Rd @@ -7,13 +7,13 @@ corr_coef(alpha = 0.05, mtc = "fdr", factor_names, method = "spearman", ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{factor_names}{(character) The name of sample meta column(s) to use.} -\item{method}{(character) Type of correlation. Allowed values are limited to the following: \itemize{\item{\code{"kendall"}: Kendall's tau is computed.}\item{\code{"pearson"}: Pearson product moment correlation is computed.}\item{\code{"spearman"}: Spearman's rho statistic is computed.}} The default is \code{"spearman"}.} +\item{method}{(character) Type of correlation. Allowed values are limited to the following: \itemize{ \item{\code{"kendall"}: Kendall's tau is computed.}\item{\code{"pearson"}: Pearson product moment correlation is computed.}\item{\code{"spearman"}: Spearman's rho statistic is computed.}} The default is \code{"spearman"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -29,9 +29,21 @@ A \code{corr_coef} object with the following \code{output} slots: The correlation between features and a set of continuous factor are calculated. Multiple-test corrected p-values are used to indicate whether the computed coefficients may have occurred by chance. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{stats}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{stats}}} } +\section{Inheritance}{ + +A \code{corr_coef} object inherits the following \code{struct} classes: \cr\cr +\code{corr_coef()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = corr_coef( + alpha = 0.05, + mtc = "fdr", + factor_names = "V1", + method = "spearman") + D = MTBLS79_DatasetExperiment(filtered=TRUE) # subset for this example diff --git a/man/dfa_scores_plot.Rd b/man/dfa_scores_plot.Rd index 86a6523..8fd3d49 100644 --- a/man/dfa_scores_plot.Rd +++ b/man/dfa_scores_plot.Rd @@ -18,17 +18,17 @@ dfa_scores_plot( \arguments{ \item{components}{(numeric) The components selected for plotting. The default is \code{c(1, 2)}.} -\item{points_to_label}{(character) Points to label. Allowed values are limited to the following: \itemize{\item{\code{"none"}: No samples labels are displayed.}\item{\code{"all"}: The labels for all samples are displayed.}\item{\code{"outliers"}: Labels for for potential outlier samples are displayed.}} The default is \code{"none"}.} +\item{points_to_label}{(character) Points to label. Allowed values are limited to the following: \itemize{ \item{\code{"none"}: No samples labels are displayed.}\item{\code{"all"}: The labels for all samples are displayed.}\item{\code{"outliers"}: Labels for for potential outlier samples are displayed.}} The default is \code{"none"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{ellipse}{(character) Plot ellipses. Allowed values are limited to the following: \itemize{\item{\code{"all"}: Hotelling T2 ellipses (p=0.95) are plotted for all groups and all samples.}\item{\code{"group"}: Hotelling T2 ellipses (p=0.95) are plotted for all groups.}\item{\code{"none"}: Ellipses are not included on the plot.}\item{\code{"sample"}: A Hotelling T2 ellipse (p=0.95) is plotted for all samples (ignoring group).}} The default is \code{"all"}.} +\item{ellipse}{(character) Plot ellipses. Allowed values are limited to the following: \itemize{ \item{\code{"all"}: Hotelling T2 ellipses (p=0.95) are plotted for all groups and all samples.}\item{\code{"group"}: Hotelling T2 ellipses (p=0.95) are plotted for all groups.}\item{\code{"none"}: Ellipses are not included on the plot.}\item{\code{"sample"}: A Hotelling T2 ellipse (p=0.95) is plotted for all samples (ignoring group).}} The default is \code{"all"}.} \item{label_filter}{(character) Labels are only plotted for the named groups. If zero-length then all groups are included. The default is \code{character(0)}.} \item{label_factor}{(character) The column name of sample_meta to use for labelling samples on the plot. "rownames" will use the row names from sample_meta. The default is \code{"rownames"}.} -\item{label_size}{(numeric) The text size of labels. Note this is not in Font Units. The default is \code{3.88}.} +\item{label_size}{(numeric) The text size of labels. Note this is not in Font Units. The default is \code{3.88}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -42,9 +42,24 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A scatter plot of the selected DFA components. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{scales}}\item{\code{ggplot2}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{scales}} \item{\code{ggplot2}}} } +\section{Inheritance}{ + +A \code{dfa_scores_plot} object inherits the following \code{struct} classes: \cr\cr +\code{dfa_scores_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = dfa_scores_plot( + components = c(1, 2), + points_to_label = "none", + factor_name = "V1", + ellipse = "all", + label_filter = character(0), + label_factor = "rownames", + label_size = 3.88) + D = iris_DatasetExperiment() M = mean_centre() + DFA(factor_name='Species') M = model_apply(M,D) @@ -53,8 +68,8 @@ chart_plot(C,M[2]) } \references{ -Wickham H, Seidel D (2022). \emph{scales: Scale Functions for -Visualization}. R package version 1.2.1, +Wickham H, Pedersen T, Seidel D (2023). \emph{scales: Scale Functions for +Visualization}. R package version 1.3.0, \url{https://CRAN.R-project.org/package=scales}. Wickham H (2016). \emph{ggplot2: Elegant Graphics for Data Analysis}. diff --git a/man/dratio_filter.Rd b/man/dratio_filter.Rd index c8fd652..12e3be3 100644 --- a/man/dratio_filter.Rd +++ b/man/dratio_filter.Rd @@ -14,15 +14,15 @@ dratio_filter( ) } \arguments{ -\item{threshold}{(numeric) The threshold above which features are removed. The default is \code{20}.} +\item{threshold}{(numeric) The threshold above which features are removed. The default is \code{20}.\cr} \item{qc_label}{(character) The label used to identify QC samples. The default is \code{"QC"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{method}{(character) dratio method. Allowed values are limited to the following: \itemize{\item{\code{"ratio"}: Dispersion of the QCs divided by the dispersion of the samples. Corresponds to Eq 4 in Broadhurst et al (2018).}\item{\code{"euclidean"}: Dispersion of the QCs divided by the euclidean length of the total dispersion. Total dispersion is estimated from the QC and Sample dispersion by assuming that they are orthogonal. Corresponds to Eq 5 in Broadhurst et al (2018).}} The default is \code{"ratio"}.} +\item{method}{(character) dratio method. Allowed values are limited to the following: \itemize{ \item{\code{"ratio"}: Dispersion of the QCs divided by the dispersion of the samples. Corresponds to Eq 4 in Broadhurst et al (2018).}\item{\code{"euclidean"}: Dispersion of the QCs divided by the euclidean length of the total dispersion. Total dispersion is estimated from the QC and Sample dispersion by assuming that they are orthogonal. Corresponds to Eq 5 in Broadhurst et al (2018).}} The default is \code{"ratio"}.} -\item{dispersion}{(character) Dispersion method. Allowed values are limited to the following: \itemize{\item{\code{"sd"}: Dispersion is estimated using the standard deviation.}\item{\code{"mad"}: Dispersion is estimated using the median absolute deviation.}} The default is \code{"sd"}.} +\item{dispersion}{(character) Dispersion method. Allowed values are limited to the following: \itemize{ \item{\code{"sd"}: Dispersion is estimated using the standard deviation.}\item{\code{"mad"}: Dispersion is estimated using the median absolute deviation.}} The default is \code{"sd"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -37,7 +37,20 @@ A \code{dratio_filter} object with the following \code{output} slots: \description{ The dispersion ratio (d-ratio) compares the standard deviation (or non-parametric equivalent) of the Quality Control (QC) samples relative to the standard deviation (or non-parametric equivalent) of the samples for each feature. If the d-ratio is greater than a predefined threshold then the observed sample variance could be due to technical variance and the feature is removed. } +\section{Inheritance}{ + +A \code{dratio_filter} object inherits the following \code{struct} classes: \cr\cr +\code{dratio_filter()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = dratio_filter( + threshold = 20, + qc_label = "QC", + factor_name = "V1", + method = "ratio", + dispersion = "sd") + D = MTBLS79_DatasetExperiment() M = dratio_filter(threshold=20,qc_label='QC',factor_name='Class') M = model_apply(M,D) diff --git a/man/equal_split.Rd b/man/equal_split.Rd index 58fccc5..bad1797 100644 --- a/man/equal_split.Rd +++ b/man/equal_split.Rd @@ -7,7 +7,7 @@ equal_split(p_train = 1, factor_name, ...) } \arguments{ -\item{p_train}{(numeric) The proportion of samples selected for the training set. The default is \code{1}.} +\item{p_train}{(numeric) The proportion of samples selected for the training set. The default is \code{1}.\cr} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -23,7 +23,17 @@ A \code{equal_split} object with the following \code{output} slots: \description{ Samples are randomly chosen from each level such that the training set has equal numbers of samples for all levels. The number of samples is based on the input proportion and the smallest group size. } +\section{Inheritance}{ + +A \code{equal_split} object inherits the following \code{struct} classes: \cr\cr +\code{equal_split()} ⭢ \code{split_data()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = equal_split( + factor_name = "V1", + p_train = 0.75) + D = iris_DatasetExperiment() M = equal_split(factor_name='Species') M = model_apply(M,D) diff --git a/man/feature_boxplot.Rd b/man/feature_boxplot.Rd index 6a0410e..1128a44 100644 --- a/man/feature_boxplot.Rd +++ b/man/feature_boxplot.Rd @@ -16,19 +16,19 @@ feature_boxplot( ) } \arguments{ -\item{label_outliers}{(logical) Label outliers. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The index for outlier samples is included on the plot.}\item{\code{"FALSE"}: No labels are displayed.}} The default is \code{TRUE}.} +\item{label_outliers}{(logical) Label outliers. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The index for outlier samples is included on the plot.}\item{\code{"FALSE"}: No labels are displayed.}} The default is \code{TRUE}.\cr} \item{feature_to_plot}{(character, numeric, integer) The column name of the plotted feature.} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{show_counts}{(logical) Show counts. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The number of samples for each box is displayed.}\item{\code{"FALSE"}: The number of samples for each box is not displayed.}} The default is \code{TRUE}.} +\item{show_counts}{(logical) Show counts. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The number of samples for each box is displayed.}\item{\code{"FALSE"}: The number of samples for each box is not displayed.}} The default is \code{TRUE}.\cr} -\item{style}{(character) Plot style. Allowed values are limited to the following: \itemize{\item{\code{"boxplot"}: Boxplot style.}\item{\code{"violin"}: Violon plot style.}} The default is \code{"boxplot"}.} +\item{style}{(character) Plot style. Allowed values are limited to the following: \itemize{ \item{\code{"boxplot"}: Boxplot style.}\item{\code{"violin"}: Violon plot style.}} The default is \code{"boxplot"}.} -\item{jitter}{(logical) Include points plotted with added jitter. The default is \code{FALSE}.} +\item{jitter}{(logical) Include points plotted with added jitter. The default is \code{FALSE}.\cr} -\item{fill}{(logical) Block fill the boxes or violins with the group colour. The default is \code{FALSE}.} +\item{fill}{(logical) Block fill the boxes or violins with the group colour. The default is \code{FALSE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -41,7 +41,22 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A boxplot to visualise the distribution of values within a feature. } +\section{Inheritance}{ + +A \code{feature_boxplot} object inherits the following \code{struct} classes: \cr\cr +\code{feature_boxplot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = feature_boxplot( + label_outliers = FALSE, + feature_to_plot = "V1", + factor_name = "V1", + show_counts = FALSE, + style = "boxplot", + jitter = FALSE, + fill = FALSE) + D = MTBLS79_DatasetExperiment C = feature_boxplot(factor_name='Species',feature_to_plot='Petal.Width') chart_plot(C,D) diff --git a/man/feature_profile.Rd b/man/feature_profile.Rd index 38e4295..7170952 100644 --- a/man/feature_profile.Rd +++ b/man/feature_profile.Rd @@ -25,7 +25,7 @@ feature_profile( \item{feature_to_plot}{(numeric, character, integer) The name or column id of the plotted feature.} -\item{plot_sd}{(logical) Plot standard deviation. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: Standard deviation of samples and QCs are included on the plot.}\item{\code{"FALSE"}: Standard deviation is not plotted.}} The default is \code{FALSE}.} +\item{plot_sd}{(logical) Plot standard deviation. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: Standard deviation of samples and QCs are included on the plot.}\item{\code{"FALSE"}: Standard deviation is not plotted.}} The default is \code{FALSE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -38,7 +38,21 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A plot visualising the change in intensity of a feature with a continuous variable such as time, dose, or run order. } +\section{Inheritance}{ + +A \code{feature_profile} object inherits the following \code{struct} classes: \cr\cr +\code{feature_profile()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = feature_profile( + run_order = character(0), + qc_label = character(0), + qc_column = character(0), + colour_by = character(0), + feature_to_plot = numeric(0), + plot_sd = FALSE) + D = MTBLS79_DatasetExperiment() C = feature_profile(run_order='run_order', qc_label='QC', diff --git a/man/feature_profile_array.Rd b/man/feature_profile_array.Rd index 3f2359a..829607d 100644 --- a/man/feature_profile_array.Rd +++ b/man/feature_profile_array.Rd @@ -26,9 +26,9 @@ feature_profile_array( \item{feature_to_plot}{(numeric, character, integer) The name or column id of the plotted feature.} -\item{nrow}{(numeric, integer) The number of rows in the plot. The default is \code{5}.} +\item{nrow}{(numeric, integer) The number of rows in the plot. The default is \code{5}.\cr} -\item{log}{(logical) Log transform. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The data is log tranformed before plotting.}\item{\code{"FALSE"}: The data is not transformed before plotting.}} The default is \code{TRUE}.} +\item{log}{(logical) Log transform. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The data is log tranformed before plotting.}\item{\code{"FALSE"}: The data is not transformed before plotting.}} The default is \code{TRUE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -41,7 +41,22 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A plot visualising the change in intensity of a feature with a continuous variable such as time, dose, or run order. } +\section{Inheritance}{ + +A \code{feature_profile_array} object inherits the following \code{struct} classes: \cr\cr +\code{feature_profile_array()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = feature_profile_array( + run_order = character(0), + qc_label = character(0), + qc_column = character(0), + colour_by = character(0), + feature_to_plot = numeric(0), + nrow = 1, + log = FALSE) + D = MTBLS79_DatasetExperiment() C = feature_profile_array( run_order='run_order', diff --git a/man/filter_by_name.Rd b/man/filter_by_name.Rd index a43588a..89cee84 100644 --- a/man/filter_by_name.Rd +++ b/man/filter_by_name.Rd @@ -24,7 +24,18 @@ A \code{filter_by_name} object with the following \code{output} slots: \description{ Filter samples/variables by row/column name, index or logicals. } +\section{Inheritance}{ + +A \code{filter_by_name} object inherits the following \code{struct} classes: \cr\cr +\code{filter_by_name()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = filter_by_name( + mode = "exclude", + dimension = "sample", + names = character(0)) + D = MTBLS79_DatasetExperiment() M = filter_by_name(mode='exclude',dimension='variable',names=c(1,2,3)) M = model_apply(M,D) diff --git a/man/filter_na_count.Rd b/man/filter_na_count.Rd index 2cfcc3b..ee05254 100644 --- a/man/filter_na_count.Rd +++ b/man/filter_na_count.Rd @@ -25,7 +25,17 @@ A \code{filter_na_count} object with the following \code{output} slots: \description{ The number of measured values is counted for each feature, and any feature with less than a predefined minimum number of values in each group is removed. If there are several factors, then the threshold is applied so that the minimum number of samples is present for all combinations (interactions) of groups. } +\section{Inheritance}{ + +A \code{filter_na_count} object inherits the following \code{struct} classes: \cr\cr +\code{filter_na_count()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = filter_na_count( + threshold = 2, + factor_name = "V1") + D = MTBLS79_DatasetExperiment() M = filter_na_count(threshold=3,factor_name='Class') M = model_apply(M,D) diff --git a/man/filter_smeta.Rd b/man/filter_smeta.Rd index bed9d79..3db08bf 100644 --- a/man/filter_smeta.Rd +++ b/man/filter_smeta.Rd @@ -7,7 +7,7 @@ filter_smeta(mode = "include", levels, factor_name, ...) } \arguments{ -\item{mode}{(character) Mode of action. Allowed values are limited to the following: \itemize{\item{\code{"include"}: Samples in the specified levels are retained.}\item{\code{"exclude"}: Samples in the specified levels are excluded.}} The default is \code{"include"}.} +\item{mode}{(character) Mode of action. Allowed values are limited to the following: \itemize{ \item{\code{"include"}: Samples in the specified levels are retained.}\item{\code{"exclude"}: Samples in the specified levels are excluded.}} The default is \code{"include"}.} \item{levels}{(character) The level name(s) for filtering.} @@ -24,7 +24,18 @@ A \code{filter_smeta} object with the following \code{output} slots: \description{ The data is filtered by so that the named levels of a factor are included/excluded from the dataset. } +\section{Inheritance}{ + +A \code{filter_smeta} object inherits the following \code{struct} classes: \cr\cr +\code{filter_smeta()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = filter_smeta( + mode = "include", + levels = character(0), + factor_name = "V1") + D = MTBLS79_DatasetExperiment() M = filter_smeta(mode='exclude',levels='QC',factor_name='QC') M = model_apply(M,D) diff --git a/man/fisher_exact.Rd b/man/fisher_exact.Rd index 8665547..28ce7da 100644 --- a/man/fisher_exact.Rd +++ b/man/fisher_exact.Rd @@ -7,9 +7,9 @@ fisher_exact(alpha = 0.05, mtc = "fdr", factor_name, factor_pred, ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -27,7 +27,19 @@ A \code{fisher_exact} object with the following \code{output} slots: \description{ A fisher exact test is used to analyse contingency tables by comparing the number of correctly/incorrectly predicted group labels. A multiple test corrected p-value indicates whether the number of measured values is significantly different between groups. } +\section{Inheritance}{ + +A \code{fisher_exact} object inherits the following \code{struct} classes: \cr\cr +\code{fisher_exact()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = fisher_exact( + alpha = 0.05, + mtc = "fdr", + factor_name = "V1", + factor_pred = data.frame(id=NA)) + # load some data D=MTBLS79_DatasetExperiment() diff --git a/man/fold_change.Rd b/man/fold_change.Rd index 9338393..a6eb626 100644 --- a/man/fold_change.Rd +++ b/man/fold_change.Rd @@ -18,17 +18,17 @@ fold_change( \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{paired}{(logical) Paired fold change. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: Fold change is calculated taking into account paired sampling.}\item{\code{"FALSE"}: Fold change is calculated assuming there is no paired sampling.}} The default is \code{FALSE}.} +\item{paired}{(logical) Paired fold change. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: Fold change is calculated taking into account paired sampling.}\item{\code{"FALSE"}: Fold change is calculated assuming there is no paired sampling.}} The default is \code{FALSE}.\cr} \item{sample_name}{(character) The name of a sample_meta column containing sample identifiers for paired sampling. The default is \code{character(0)}.} -\item{threshold}{(numeric) The fold change threshold for labelling features as significant. The default is \code{2}.} +\item{threshold}{(numeric) The fold change threshold for labelling features as significant. The default is \code{2}.\cr} \item{control_group}{(character) The level name of the group used in the denominator (where possible) when computing fold change. The default is \code{character(0)}.} -\item{method}{(character) Fold change method. Allowed values are limited to the following: \itemize{\item{\code{"geometric"}: A log transform is applied before using group means to calculate fold change. In the non-tranformedspace this is equivalent to using geometric group means. Confidence intervals for independant and paired sampling are estimated using standard error of the mean in log transformed space before being transformed back to the original space.}\item{\code{"median"}: The group medians and the method described by Price and Bonett is used to estimate confidence intervals. For paired data standard error of the median is used to estimate confidence intervals from the median fold change of all pairs.}\item{\code{"mean"}: The group means and the method described by Price and Bonnet is used to estimate confidence intervals. For paired data standard error of the mean is used to estimate confidence intervals from the mean fold change of all pairs.}} The default is \code{"geometric"}.} +\item{method}{(character) Fold change method. Allowed values are limited to the following: \itemize{ \item{\code{"geometric"}: A log transform is applied before using group means to calculate fold change. In the non-tranformedspace this is equivalent to using geometric group means. Confidence intervals for independant and paired sampling are estimated using standard error of the mean in log transformed space before being transformed back to the original space.}\item{\code{"median"}: The group medians and the method described by Price and Bonett is used to estimate confidence intervals. For paired data standard error of the median is used to estimate confidence intervals from the median fold change of all pairs.}\item{\code{"mean"}: The group means and the method described by Price and Bonnet is used to estimate confidence intervals. For paired data standard error of the mean is used to estimate confidence intervals from the mean fold change of all pairs.}} The default is \code{"geometric"}.} -\item{conf_level}{(numeric) The confidence level of the interval. The default is \code{0.95}.} +\item{conf_level}{(numeric) The confidence level of the interval. The default is \code{0.95}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -44,7 +44,22 @@ A \code{fold_change} object with the following \code{output} slots: \description{ Fold change is the relative change in mean (or non-parametric equivalent) intensities of a feature between all pairs of levels in a factor. } +\section{Inheritance}{ + +A \code{fold_change} object inherits the following \code{struct} classes: \cr\cr +\code{fold_change()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = fold_change( + factor_name = "V1", + sample_name = character(0), + paired = FALSE, + threshold = 2, + control_group = character(0), + method = "geometric", + conf_level = 0.95) + D = MTBLS79_DatasetExperiment() M = fold_change(factor_name='Class') M = model_apply(M,D) diff --git a/man/fold_change_int.Rd b/man/fold_change_int.Rd index 081deaf..6329b7a 100644 --- a/man/fold_change_int.Rd +++ b/man/fold_change_int.Rd @@ -16,13 +16,13 @@ fold_change_int( \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{threshold}{(numeric) The fold change threshold for labelling features as significant. The default is \code{2}.} +\item{threshold}{(numeric) The fold change threshold for labelling features as significant. The default is \code{2}.\cr} \item{control_group}{(character) The level names of the groups used in the denominator (where possible) when computing fold change. One level for each factor, assumed to be in the same order as factor_name. The default is \code{character(0)}.} -\item{method}{(character) Fold change method. Allowed values are limited to the following: \itemize{\item{\code{"geometric"}: A log transform is applied before using group means to calculate fold change. In the non-tranformedspace this is equivalent to using geometric group means. Confidence intervals for independant and paired sampling are estimated using standard error of the mean in log transformed space before being transformed back to the original space.}\item{\code{"median"}: The group medians and the method described by Price and Bonett is used to estimate confidence intervals. For paired data standard error of the median is used to estimate confidence intervals from the median fold change of all pairs.}\item{\code{"mean"}: The group means and the method described by Price and Bonnet is used to estimate confidence intervals. For paired data standard error of the mean is used to estimate confidence intervals from the mean fold change of all pairs.}} The default is \code{"geometric"}.} +\item{method}{(character) Fold change method. Allowed values are limited to the following: \itemize{ \item{\code{"geometric"}: A log transform is applied before using group means to calculate fold change. In the non-tranformedspace this is equivalent to using geometric group means. Confidence intervals for independant and paired sampling are estimated using standard error of the mean in log transformed space before being transformed back to the original space.}\item{\code{"median"}: The group medians and the method described by Price and Bonett is used to estimate confidence intervals. For paired data standard error of the median is used to estimate confidence intervals from the median fold change of all pairs.}\item{\code{"mean"}: The group means and the method described by Price and Bonnet is used to estimate confidence intervals. For paired data standard error of the mean is used to estimate confidence intervals from the mean fold change of all pairs.}} The default is \code{"geometric"}.} -\item{conf_level}{(numeric) The confidence level of the interval. The default is \code{0.95}.} +\item{conf_level}{(numeric) The confidence level of the interval. The default is \code{0.95}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -38,7 +38,22 @@ A \code{fold_change_int} object with the following \code{output} slots: \description{ For more than one factor the fold change calculation is extended to include all combinations of levels (interactions) of all factors. Paired fold changes are not possible for this computation. } +\section{Inheritance}{ + +A \code{fold_change_int} object inherits the following \code{struct} classes: \cr\cr +\code{fold_change_int()} ⭢ \code{fold_change()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = fold_change_int( + factor_name = "V1", + sample_name = character(0), + threshold = 2, + control_group = character(0), + method = "geometric", + paired = FALSE, + conf_level = 0.95) + D = MTBLS79_DatasetExperiment() D=D[,1:10,drop=FALSE] M = filter_smeta(mode='exclude',levels='QC',factor_name='Class') + diff --git a/man/fold_change_plot.Rd b/man/fold_change_plot.Rd index 341d4b3..f8f68c2 100644 --- a/man/fold_change_plot.Rd +++ b/man/fold_change_plot.Rd @@ -8,9 +8,9 @@ fold_change_plot(number_features = 20, orientation = "portrait", ...) } \arguments{ \item{number_features}{(numeric) The number randomly selected features to plot, or -a list of column numbers. The default is \code{20}.} +a list of column numbers. The default is \code{20}.\cr} -\item{orientation}{(character) Plot orientation. Allowed values are limited to the following: \itemize{\item{\code{"landscape"}: Features are plotted on the y-axis.}\item{\code{"portrait"}: Features are plotted on the x-axis.}} The default is \code{"portrait"}.} +\item{orientation}{(character) Plot orientation. Allowed values are limited to the following: \itemize{ \item{\code{"landscape"}: Features are plotted on the y-axis.}\item{\code{"portrait"}: Features are plotted on the x-axis.}} The default is \code{"portrait"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -23,6 +23,16 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A plot of fold changes calculated for a chosen subset of features. A predefined fold change threshold is indicated by shaded regions. } +\section{Inheritance}{ + +A \code{fold_change_plot} object inherits the following \code{struct} classes: \cr\cr +\code{fold_change_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = fold_change_plot( + number_features = 10, + orientation = "portrait") + C = fold_change_plot() } diff --git a/man/forward_selection_by_rank.Rd b/man/forward_selection_by_rank.Rd index 8794ef4..11eb43d 100644 --- a/man/forward_selection_by_rank.Rd +++ b/man/forward_selection_by_rank.Rd @@ -14,11 +14,11 @@ forward_selection_by_rank( ) } \arguments{ -\item{min_no_vars}{(numeric) The minimum number of variables to include in the model. The default is \code{1}.} +\item{min_no_vars}{(numeric) The minimum number of variables to include in the model. The default is \code{1}.\cr} -\item{max_no_vars}{(numeric) The maximum number of variables to include in the model. The default is \code{100}.} +\item{max_no_vars}{(numeric) The maximum number of variables to include in the model. The default is \code{100}.\cr} -\item{step_size}{(numeric) The incremental change in number of features in the model. The default is \code{1}.} +\item{step_size}{(numeric) The incremental change in number of features in the model. The default is \code{1}.\cr} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -39,7 +39,20 @@ A \code{forward_selection_by_rank} object with the following \code{output} slot \description{ A model is trained and performance metric computed by including increasing numbers of features in the model. The features to be included in each step are defined by their rank, which is computed from another variable e.g. VIP score. An "optimal"subset of features is suggested by minimising the input performance metric. } +\section{Inheritance}{ + +A \code{forward_selection_by_rank} object inherits the following \code{struct} classes: \cr\cr +\code{forward_selection_by_rank()} ⭢ \code{resampler()} ⭢ \code{iterator()} ⭢ \code{struct_class()} +} + \examples{ +M = forward_selection_by_rank( + min_no_vars = 1, + max_no_vars = 100, + step_size = 1, + factor_name = "V1", + variable_rank = 1) + # some data D = MTBLS79_DatasetExperiment(filtered=TRUE) diff --git a/man/fs_line.Rd b/man/fs_line.Rd index 6e61114..5cb5595 100644 --- a/man/fs_line.Rd +++ b/man/fs_line.Rd @@ -18,7 +18,15 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A line plot for forward selection. The computed model performance metric is plotted against the number of features included in the model. } +\section{Inheritance}{ + +A \code{fs_line} object inherits the following \code{struct} classes: \cr\cr +\code{fs_line()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = fs_line() + # some data D = MTBLS79_DatasetExperiment(filtered=TRUE) diff --git a/man/glog_opt_plot.Rd b/man/glog_opt_plot.Rd index 2d24dad..ea23562 100644 --- a/man/glog_opt_plot.Rd +++ b/man/glog_opt_plot.Rd @@ -7,7 +7,7 @@ glog_opt_plot(plot_grid = 100, ...) } \arguments{ -\item{plot_grid}{(numeric) The default is \code{100}.} +\item{plot_grid}{(numeric) The default is \code{100}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -21,9 +21,18 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A plot of the sum of squares error (SSE) vs different values of lambda for the glog transform. The indicated optimum value for lambda minimises the SSE. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{glog_opt_plot} object inherits the following \code{struct} classes: \cr\cr +\code{glog_opt_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = glog_opt_plot( + plot_grid = numeric(0)) + D = iris_DatasetExperiment() M = glog_transform(qc_label='versicolor',factor_name='Species') M = model_apply(M,D) @@ -34,5 +43,5 @@ chart_plot(C,M,D) Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. } diff --git a/man/glog_transform.Rd b/man/glog_transform.Rd index 1ff25e2..a98c173 100644 --- a/man/glog_transform.Rd +++ b/man/glog_transform.Rd @@ -26,9 +26,20 @@ A \code{glog_transform} object with the following \code{output} slots: The generalised logarithm (glog) transformation applies a log transformation while applying an offset to account for technical variation. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{glog_transform} object inherits the following \code{struct} classes: \cr\cr +\code{glog_transform()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = glog_transform( + qc_label = "QC", + factor_name = "V1", + lambda = NULL) + D = iris_DatasetExperiment() M = glog_transform(qc_label='versicolor',factor_name='Species') M = model_apply(M,D) @@ -37,7 +48,7 @@ M = model_apply(M,D) Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. Durbin B, Hardin J, Hawkins D, Rocke D (2002). "A variance-stabilizing transformation for gene-expression microarray data." \emph{Bioinformatics}, diff --git a/man/grid_search_1d.Rd b/man/grid_search_1d.Rd index 347e1c8..0a47c94 100644 --- a/man/grid_search_1d.Rd +++ b/man/grid_search_1d.Rd @@ -22,7 +22,7 @@ grid_search_1d( \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{max_min}{(character) Maximise or minimise. Allowed values are limited to the following: \itemize{\item{\code{"max"}: The optimium parameter value is suggested based on maximising the performance metric.}\item{\code{"min"}: The optimium parameter value is suggested based on minimising the performance metric.}} The default is \code{"min"}.} +\item{max_min}{(character) Maximise or minimise. Allowed values are limited to the following: \itemize{ \item{\code{"max"}: The optimium parameter value is suggested based on maximising the performance metric.}\item{\code{"min"}: The optimium parameter value is suggested based on minimising the performance metric.}} The default is \code{"min"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -37,7 +37,20 @@ A \code{grid_search_1d} object with the following \code{output} slots: \description{ A one dimensional grid search calculates a performance metric for a model at evenly spaced values for a model input parameter. The "optimum" value for the parameter is suggested as the one which maximises performance, or minimises error (whichever is appropriate for the chosen metric) } +\section{Inheritance}{ + +A \code{grid_search_1d} object inherits the following \code{struct} classes: \cr\cr +\code{grid_search_1d()} ⭢ \code{resampler()} ⭢ \code{iterator()} ⭢ \code{struct_class()} +} + \examples{ +M = grid_search_1d( + param_to_optimise = character(0), + search_values = numeric(0), + model_index = numeric(0), + factor_name = "V1", + max_min = "min") + D = MTBLS79_DatasetExperiment() # some preprocessing M = pqn_norm(qc_label='QC',factor_name='Class') + diff --git a/man/gs_line.Rd b/man/gs_line.Rd index 25a9e3b..e6160b8 100644 --- a/man/gs_line.Rd +++ b/man/gs_line.Rd @@ -18,6 +18,14 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A plot of the calculated performance metric against the model input parameter values used to train the model. The optimum parameter value is indicated based on minimising (or maximising) the chosen metric. } +\section{Inheritance}{ + +A \code{gs_line} object inherits the following \code{struct} classes: \cr\cr +\code{gs_line()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = gs_line() + C = gs_line() } diff --git a/man/hca_dendrogram.Rd b/man/hca_dendrogram.Rd index 9e9f676..6e0e629 100644 --- a/man/hca_dendrogram.Rd +++ b/man/hca_dendrogram.Rd @@ -19,9 +19,17 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A dendrogram visualising the clustering by HCA. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{ggdendro}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{ggdendro}}} } +\section{Inheritance}{ + +A \code{hca_dendrogram} object inherits the following \code{struct} classes: \cr\cr +\code{hca_dendrogram()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = hca_dendrogram() + C = hca_dendrogram() } \references{ diff --git a/man/kfold_xval.Rd b/man/kfold_xval.Rd index 7d86386..47be915 100644 --- a/man/kfold_xval.Rd +++ b/man/kfold_xval.Rd @@ -7,9 +7,9 @@ kfold_xval(folds = 10, method = "venetian", factor_name, collect = NULL, ...) } \arguments{ -\item{folds}{(numeric, integer) The number of cross-validation folds. The default is \code{10}.} +\item{folds}{(numeric, integer) The number of cross-validation folds. The default is \code{10}.\cr} -\item{method}{(character) Fold selection method. Allowed values are limited to the following: \itemize{\item{\code{"venetian"}: Every nth sample is assigned to the same fold, where n is the number of folds.}\item{\code{"blocks"}: Blocks of adjacent samples are assigned to the same fold.}\item{\code{"random"}: Samples are randomly assigned to a fold.}} The default is \code{"venetian"}.} +\item{method}{(character) Fold selection method. Allowed values are limited to the following: \itemize{ \item{\code{"venetian"}: Every nth sample is assigned to the same fold, where n is the number of folds.}\item{\code{"blocks"}: Blocks of adjacent samples are assigned to the same fold.}\item{\code{"random"}: Samples are randomly assigned to a fold.}} The default is \code{"venetian"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -30,7 +30,19 @@ A \code{kfold_xval} object with the following \code{output} slots: \description{ k-fold cross-validation is an iterative approach applied to validate models. The samples are divided into k "folds", or subsets. Each subset is excluded from model training and used for model validation once, resulting in a single left-out prediction for each sample. Model performance metrics are then computed for the training and test sets across all folds. } +\section{Inheritance}{ + +A \code{kfold_xval} object inherits the following \code{struct} classes: \cr\cr +\code{kfold_xval()} ⭢ \code{resampler()} ⭢ \code{iterator()} ⭢ \code{struct_class()} +} + \examples{ +M = kfold_xval( + folds = 5, + method = "random", + factor_name = "V1", + collect = NULL) + D = iris_DatasetExperiment() I = kfold_xval(factor_name='Species') * (mean_centre() + PLSDA(factor_name='Species')) diff --git a/man/kfoldxcv_grid.Rd b/man/kfoldxcv_grid.Rd index 1fef1de..c68977a 100644 --- a/man/kfoldxcv_grid.Rd +++ b/man/kfoldxcv_grid.Rd @@ -22,7 +22,17 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A graphic for visualising the true class and the predicted class of samples in all groups for all cross-validation folds. } +\section{Inheritance}{ + +A \code{kfoldxcv_grid} object inherits the following \code{struct} classes: \cr\cr +\code{kfoldxcv_grid()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = kfoldxcv_grid( + factor_name = "V1", + level = "level_1") + D = iris_DatasetExperiment() I = kfold_xval(factor_name='Species') * (mean_centre() + PLSDA(factor_name='Species')) diff --git a/man/kfoldxcv_metric.Rd b/man/kfoldxcv_metric.Rd index 0512ba7..e449ab0 100644 --- a/man/kfoldxcv_metric.Rd +++ b/man/kfoldxcv_metric.Rd @@ -18,6 +18,14 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A boxplot of the performance metric computed for each fold of a k-fold cross-validation. } +\section{Inheritance}{ + +A \code{kfoldxcv_metric} object inherits the following \code{struct} classes: \cr\cr +\code{kfoldxcv_metric()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = kfoldxcv_metric() + C = kfoldxcv_metric() } diff --git a/man/knn_impute.Rd b/man/knn_impute.Rd index 98cfd90..7cb8d49 100644 --- a/man/knn_impute.Rd +++ b/man/knn_impute.Rd @@ -13,11 +13,11 @@ knn_impute( ) } \arguments{ -\item{neighbours}{(numeric) The number of neighbours (k) to use for imputation. The default is \code{5}.} +\item{neighbours}{(numeric) The number of neighbours (k) to use for imputation. The default is \code{5}.\cr} -\item{sample_max}{(numeric) The maximum percent missing values per sample. The default is \code{50}.} +\item{sample_max}{(numeric) The maximum percent missing values per sample. The default is \code{50}.\cr} -\item{feature_max}{(numeric) The maximum percent missing values per feature. The default is \code{50}.} +\item{feature_max}{(numeric) The maximum percent missing values per feature. The default is \code{50}.\cr} \item{by}{(character) Impute using similar "samples" or "features". Default features. The default is \code{"features"}.} @@ -33,14 +33,26 @@ A \code{knn_impute} object with the following \code{output} slots: k-nearest neighbour missing value imputation replaces missing values in the data with the average of a predefined number of the most similar neighbours for which the value is present } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{knn_impute} object inherits the following \code{struct} classes: \cr\cr +\code{knn_impute()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = knn_impute( + neighbours = 5, + feature_max = 50, + sample_max = 50, + by = "features") + M = knn_impute() } \references{ Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. } diff --git a/man/kw_p_hist.Rd b/man/kw_p_hist.Rd index cb24c32..904a655 100644 --- a/man/kw_p_hist.Rd +++ b/man/kw_p_hist.Rd @@ -18,6 +18,14 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram of the p-values computed by the kruskal-wallis method } +\section{Inheritance}{ + +A \code{kw_p_hist} object inherits the following \code{struct} classes: \cr\cr +\code{kw_p_hist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = kw_p_hist() + C = kw_p_hist() } diff --git a/man/kw_rank_sum.Rd b/man/kw_rank_sum.Rd index 688a7e2..b8fab49 100644 --- a/man/kw_rank_sum.Rd +++ b/man/kw_rank_sum.Rd @@ -7,9 +7,9 @@ kw_rank_sum(alpha = 0.05, mtc = "fdr", factor_names, ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{factor_names}{(character) The name of sample meta column(s) to use.} @@ -28,7 +28,18 @@ A \code{kw_rank_sum} object with the following \code{output} slots: \description{ The Kruskal-Wallis test is a univariate hypothesis testing method that allows multiple (n>=2) groups to be compared without making the assumption that values are normally distributed. It is the non-parametric equivalent of a 1-way ANOVA. The test is applied to all variables/features individually, and multiple test corrected p-values are computed to indicate the significance of variables/features. } +\section{Inheritance}{ + +A \code{kw_rank_sum} object inherits the following \code{struct} classes: \cr\cr +\code{kw_rank_sum()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = kw_rank_sum( + alpha = 0.05, + mtc = "fdr", + factor_names = "V1") + D = iris_DatasetExperiment() M = kw_rank_sum(factor_names='Species') M = model_apply(M,D) diff --git a/man/linear_model.Rd b/man/linear_model.Rd index f8f907d..74669e5 100644 --- a/man/linear_model.Rd +++ b/man/linear_model.Rd @@ -9,9 +9,9 @@ linear_model(formula, na_action = "na.omit", contrasts = list(), ...) \arguments{ \item{formula}{(formula) A symbolic description of the model to be fitted.} -\item{na_action}{(character) NA action. Allowed values are limited to the following: \itemize{\item{\code{"na.omit"}: Incomplete cases are removed.}\item{\code{"na.fail"}: An error is thrown if NA are present.}\item{\code{"na.exclude"}: Incomplete cases are removed, and the output result is padded to the correct size using NA.}\item{\code{"na.pass"}: Does not apply a linear model if NA are present.}} The default is \code{"na.omit"}.} +\item{na_action}{(character) NA action. Allowed values are limited to the following: \itemize{ \item{\code{"na.omit"}: Incomplete cases are removed.}\item{\code{"na.fail"}: An error is thrown if NA are present.}\item{\code{"na.exclude"}: Incomplete cases are removed, and the output result is padded to the correct size using NA.}\item{\code{"na.pass"}: Does not apply a linear model if NA are present.}} The default is \code{"na.omit"}.} -\item{contrasts}{(list) The contrasts associated with a factor. The default is \code{list}.} +\item{contrasts}{(list) The contrasts associated with a factor. The default is \code{list()}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -31,9 +31,20 @@ A \code{linear_model} object with the following \code{output} slots: Linear models can be used to carry out regression, single stratum analysis of variance and analysis of covariance. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{stats}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{stats}}} } +\section{Inheritance}{ + +A \code{linear_model} object inherits the following \code{struct} classes: \cr\cr +\code{linear_model()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = linear_model( + formula = y ~ x, + na_action = "na.omit", + contrasts = list()) + D = iris_DatasetExperiment() M = linear_model(formula = y~Species) diff --git a/man/log_transform.Rd b/man/log_transform.Rd index f02b25a..35218a8 100644 --- a/man/log_transform.Rd +++ b/man/log_transform.Rd @@ -7,7 +7,7 @@ log_transform(base = 10, ...) } \arguments{ -\item{base}{(numeric) The base of the logarithm used for the transform. The default is \code{10}.} +\item{base}{(numeric) The base of the logarithm used for the transform. The default is \code{10}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -22,6 +22,15 @@ struct object \description{ A logarithmic transform is applied to all values in the data matrix. } +\section{Inheritance}{ + +A \code{log_transform} object inherits the following \code{struct} classes: \cr\cr +\code{log_transform()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = log_transform( + base = 10) + M = log_transform() } diff --git a/man/mean_centre.Rd b/man/mean_centre.Rd index a1e9b58..3994fcf 100644 --- a/man/mean_centre.Rd +++ b/man/mean_centre.Rd @@ -7,7 +7,7 @@ mean_centre(mode = "data", ...) } \arguments{ -\item{mode}{(character) Mode of action. Allowed values are limited to the following: \itemize{\item{\code{"data"}: Centring is applied to the data block.}\item{\code{"sample_meta"}: Centring is applied to the sample_meta block.}\item{\code{"both"}: Centring is applied to both the data and the sample_meta blocks.}} The default is \code{"data"}.} +\item{mode}{(character) Mode of action. Allowed values are limited to the following: \itemize{ \item{\code{"data"}: Centring is applied to the data block.}\item{\code{"sample_meta"}: Centring is applied to the sample_meta block.}\item{\code{"both"}: Centring is applied to both the data and the sample_meta blocks.}} The default is \code{"data"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -22,6 +22,15 @@ A \code{mean_centre} object with the following \code{output} slots: \description{ The mean sample is subtracted from all samples in the data matrix. The features in the centred matrix all have zero mean. } +\section{Inheritance}{ + +A \code{mean_centre} object inherits the following \code{struct} classes: \cr\cr +\code{mean_centre()} ⭢ \code{preprocess()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = mean_centre( + mode = "data") + M = mean_centre() } diff --git a/man/mean_of_medians.Rd b/man/mean_of_medians.Rd index d10e822..50171b2 100644 --- a/man/mean_of_medians.Rd +++ b/man/mean_of_medians.Rd @@ -20,7 +20,16 @@ A \code{mean_of_medians} object with the following \code{output} slots: \description{ The data matrix is normalised by the mean of the median of each factor level. } +\section{Inheritance}{ + +A \code{mean_of_medians} object inherits the following \code{struct} classes: \cr\cr +\code{mean_of_medians()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = mean_of_medians( + factor_name = "V1") + D = iris_DatasetExperiment() M = mean_of_medians(factor_name='Species') M = model_apply(M,D) diff --git a/man/mixed_effect.Rd b/man/mixed_effect.Rd index da458e4..7f2c1c1 100644 --- a/man/mixed_effect.Rd +++ b/man/mixed_effect.Rd @@ -7,13 +7,13 @@ mixed_effect(alpha = 0.05, mtc = "fdr", formula, ss_type = "marginal", ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{formula}{(formula) A symbolic description of the model to be fitted.} -\item{ss_type}{(character) Sum of squares type. Allowed values are limited to the following: \itemize{\item{\code{"marginal"}: Type III sum of squares.}\item{\code{"sequential"}: Type II sum of squares.}} The default is \code{"marginal"}.} +\item{ss_type}{(character) Sum of squares type. Allowed values are limited to the following: \itemize{ \item{\code{"marginal"}: Type III sum of squares.}\item{\code{"sequential"}: Type II sum of squares.}} The default is \code{"marginal"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -29,9 +29,21 @@ A \code{mixed_effect} object with the following \code{output} slots: A mixed effects model is an extension of ANOVA where there are both fixed and random effects. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{nlme}}\item{\code{emmeans}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{nlme}} \item{\code{emmeans}}} } +\section{Inheritance}{ + +A \code{mixed_effect} object inherits the following \code{struct} classes: \cr\cr +\code{mixed_effect()} ⭢ \code{ANOVA()} ⭢ \code{model()} ⭢ \code{stato()} ⭢ \code{struct_class()} +} + \examples{ +M = mixed_effect( + alpha = 0.05, + mtc = "fdr", + formula = y ~ x, + ss_type = "marginal") + D = iris_DatasetExperiment() D$sample_meta$id=rownames(D) # dummy id column M = mixed_effect(formula = y~Species+ Error(id/Species)) @@ -39,7 +51,7 @@ M = model_apply(M,D) } \references{ Pinheiro J, Bates D, R Core Team (2023). \emph{nlme: Linear and Nonlinear -Mixed Effects Models}. R package version 3.1-162, +Mixed Effects Models}. R package version 3.1-164, \url{https://CRAN.R-project.org/package=nlme}. Pinheiro JC, Bates DM (2000). \emph{Mixed-Effects Models in S and S-PLUS}. @@ -47,7 +59,7 @@ Springer, New York. doi:10.1007/b98882 \url{https://doi.org/10.1007/b98882}. Lenth R (2023). \emph{emmeans: Estimated Marginal Means, aka Least-Squares -Means}. R package version 1.8.7, +Means}. R package version 1.9.0, \url{https://CRAN.R-project.org/package=emmeans}. Fox J, Weisberg S (2019). \emph{An R Companion to Applied Regression}, Third diff --git a/man/mv_boxplot.Rd b/man/mv_boxplot.Rd index dbd66ac..4a13be0 100644 --- a/man/mv_boxplot.Rd +++ b/man/mv_boxplot.Rd @@ -13,13 +13,13 @@ mv_boxplot( ) } \arguments{ -\item{label_outliers}{(logical) Label outliers. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: Sample labels for potential outliers are displayed on the plot.}\item{\code{"FALSE"}: Sample labels are not included on the plot.}} The default is \code{TRUE}.} +\item{label_outliers}{(logical) Label outliers. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: Sample labels for potential outliers are displayed on the plot.}\item{\code{"FALSE"}: Sample labels are not included on the plot.}} The default is \code{TRUE}.\cr} -\item{by_sample}{(logical) Plot by sample or by feature. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: Missing values are plotted per sample.}\item{\code{"FALSE"}: Missing values are plotted per feature.}} The default is \code{TRUE}.} +\item{by_sample}{(logical) Plot by sample or by feature. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: Missing values are plotted per sample.}\item{\code{"FALSE"}: Missing values are plotted per feature.}} The default is \code{TRUE}.\cr} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{show_counts}{(logical) Show counts. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The number of samples for each box is displayed.}\item{\code{"FALSE"}: The number of samples for each box is not displayed.}} The default is \code{TRUE}.} +\item{show_counts}{(logical) Show counts. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The number of samples for each box is displayed.}\item{\code{"FALSE"}: The number of samples for each box is not displayed.}} The default is \code{TRUE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -32,7 +32,19 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ Boxplots of the number of missing values per sample/feature. } +\section{Inheritance}{ + +A \code{mv_boxplot} object inherits the following \code{struct} classes: \cr\cr +\code{mv_boxplot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = mv_boxplot( + label_outliers = FALSE, + by_sample = FALSE, + factor_name = "V1", + show_counts = FALSE) + D = MTBLS79_DatasetExperiment() C = mv_boxplot(factor_name='Class') chart_plot(C,D) diff --git a/man/mv_feature_filter.Rd b/man/mv_feature_filter.Rd index e4cabd1..bf42bb2 100644 --- a/man/mv_feature_filter.Rd +++ b/man/mv_feature_filter.Rd @@ -13,11 +13,11 @@ mv_feature_filter( ) } \arguments{ -\item{threshold}{(numeric) The minimum percentage of non-missing values. The default is \code{20}.} +\item{threshold}{(numeric) The minimum percentage of non-missing values. The default is \code{20}.\cr} \item{qc_label}{(character) The label used to identify QC/group samples when using the "QC" (within a named group) filtering method. The default is \code{"QC"}.} -\item{method}{(character) Filtering method. Allowed values are limited to the following: \itemize{\item{\code{"within_all"}: Features are removed if the threshold for non-missing values is not met for all groups.}\item{\code{"within_one"}: Features are removed if the threshold for non-missing values is not met for at least one group.}\item{\code{"QC"}: Features are removed if the threshold for non-missing values is not met for the named group.}\item{\code{"across"}: The filter is applied ignoring sample group.}} The default is \code{"QC"}.} +\item{method}{(character) Filtering method. Allowed values are limited to the following: \itemize{ \item{\code{"within_all"}: Features are removed if the threshold for non-missing values is not met for all groups.}\item{\code{"within_one"}: Features are removed if the threshold for non-missing values is not met for any group.}\item{\code{"QC"}: Features are removed if the threshold for non-missing values is not met for the named group.}\item{\code{"across"}: The filter is applied ignoring sample group.}} The default is \code{"QC"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -34,9 +34,21 @@ A \code{mv_feature_filter} object with the following \code{output} slots: Removes features where the percentage of non-missing values falls below a threshold. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{mv_feature_filter} object inherits the following \code{struct} classes: \cr\cr +\code{mv_feature_filter()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = mv_feature_filter( + threshold = 20, + qc_label = "QC", + method = "QC", + factor_name = "V1") + D = iris_DatasetExperiment() M = mv_feature_filter(factor_name='Species',qc_label='versicolor') M = model_apply(M,D) @@ -45,5 +57,5 @@ M = model_apply(M,D) Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. } diff --git a/man/mv_feature_filter_hist.Rd b/man/mv_feature_filter_hist.Rd index 080ad75..85b20bd 100644 --- a/man/mv_feature_filter_hist.Rd +++ b/man/mv_feature_filter_hist.Rd @@ -18,6 +18,14 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram of the proportion of missing values per feature. } +\section{Inheritance}{ + +A \code{mv_feature_filter_hist} object inherits the following \code{struct} classes: \cr\cr +\code{mv_feature_filter_hist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = mv_feature_filter_hist() + C = mv_feature_filter_hist() } diff --git a/man/mv_histogram.Rd b/man/mv_histogram.Rd index 673a8f4..d0ac36d 100644 --- a/man/mv_histogram.Rd +++ b/man/mv_histogram.Rd @@ -7,9 +7,9 @@ mv_histogram(label_outliers = TRUE, by_sample = TRUE, ...) } \arguments{ -\item{label_outliers}{(logical) Label outliers. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: Sample labels for potential outliers are displayed on the plot.}\item{\code{"FALSE"}: Sample labels are not included on the plot.}} The default is \code{TRUE}.} +\item{label_outliers}{(logical) Label outliers. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: Sample labels for potential outliers are displayed on the plot.}\item{\code{"FALSE"}: Sample labels are not included on the plot.}} The default is \code{TRUE}.\cr} -\item{by_sample}{(logical) Plot by sample or by feature. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: Missing values are plotted per sample.}\item{\code{"FALSE"}: Missing values are plotted per feature.}} The default is \code{TRUE}.} +\item{by_sample}{(logical) Plot by sample or by feature. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: Missing values are plotted per sample.}\item{\code{"FALSE"}: Missing values are plotted per feature.}} The default is \code{TRUE}.\cr} \item{...}{additional slots and values passed to struct_class} } @@ -24,7 +24,17 @@ struct object \description{ A histogram of the numbers of missing values per sample/feature } +\section{Inheritance}{ + +A \code{mv_histogram} object inherits the following \code{struct} classes: \cr\cr +\code{mv_histogram()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = mv_histogram( + label_outliers = FALSE, + by_sample = FALSE) + D = MTBLS79_DatasetExperiment() C = mv_histogram(label_outliers=FALSE,by_sample=FALSE) chart_plot(C,D) diff --git a/man/mv_sample_filter.Rd b/man/mv_sample_filter.Rd index fd4a730..35fe4f4 100644 --- a/man/mv_sample_filter.Rd +++ b/man/mv_sample_filter.Rd @@ -7,7 +7,7 @@ mv_sample_filter(mv_threshold = 20, ...) } \arguments{ -\item{mv_threshold}{(numeric) The maximum percentage of features with missing values in a sample. The default is \code{20}.} +\item{mv_threshold}{(numeric) The maximum percentage of features with missing values in a sample. The default is \code{20}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -23,14 +23,23 @@ A \code{mv_sample_filter} object with the following \code{output} slots: Removes samples where the percent number of missing values exceeds a threshold. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{mv_sample_filter} object inherits the following \code{struct} classes: \cr\cr +\code{mv_sample_filter()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = mv_sample_filter( + mv_threshold = 20) + C = mv_sample_filter() } \references{ Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. } diff --git a/man/mv_sample_filter_hist.Rd b/man/mv_sample_filter_hist.Rd index 1829934..64103b3 100644 --- a/man/mv_sample_filter_hist.Rd +++ b/man/mv_sample_filter_hist.Rd @@ -18,6 +18,14 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram of the the proportion of missing values per sample } +\section{Inheritance}{ + +A \code{mv_sample_filter_hist} object inherits the following \code{struct} classes: \cr\cr +\code{mv_sample_filter_hist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = mv_sample_filter_hist() + C = mv_sample_filter_hist() } diff --git a/man/nroot_transform.Rd b/man/nroot_transform.Rd index 4d790b4..375edd9 100644 --- a/man/nroot_transform.Rd +++ b/man/nroot_transform.Rd @@ -7,7 +7,7 @@ nroot_transform(root = 2, ...) } \arguments{ -\item{root}{(numeric) The nth root used for the transform. The default is \code{2}.} +\item{root}{(numeric) The nth root used for the transform. The default is \code{2}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -20,6 +20,15 @@ A \code{nroot_transform} object with the following \code{output} slots: \description{ All values in the data matrix are transformed by raising them to the power of 1/n. } +\section{Inheritance}{ + +A \code{nroot_transform} object inherits the following \code{struct} classes: \cr\cr +\code{nroot_transform()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = nroot_transform( + root = 2) + M = nroot_transform() } diff --git a/man/pairs_filter.Rd b/man/pairs_filter.Rd index 291322f..885060c 100644 --- a/man/pairs_filter.Rd +++ b/man/pairs_filter.Rd @@ -25,6 +25,16 @@ struct object \description{ This filter is used for study designs with paired sampling to ensure that measurements from the same source (e.g. patient) are represented in all factor levels and interactions. } +\section{Inheritance}{ + +A \code{pairs_filter} object inherits the following \code{struct} classes: \cr\cr +\code{pairs_filter()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = pairs_filter( + factor_name = "V1", + sample_id = "V1") + M=pairs_filter(factor_name='Class',sample_id='ids') } diff --git a/man/pareto_scale.Rd b/man/pareto_scale.Rd index fa77665..6fcc0cd 100644 --- a/man/pareto_scale.Rd +++ b/man/pareto_scale.Rd @@ -20,7 +20,15 @@ A \code{pareto_scale} object with the following \code{output} slots: \description{ The mean sample is subtracted from all samples and then scaled by the square root of the standard deviation. The transformed data has zero mean. } +\section{Inheritance}{ + +A \code{pareto_scale} object inherits the following \code{struct} classes: \cr\cr +\code{pareto_scale()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = pareto_scale() + D = iris_DatasetExperiment() M = pareto_scale() M = model_train(M,D) diff --git a/man/pca_biplot.Rd b/man/pca_biplot.Rd index fac77b5..ac2c9f3 100644 --- a/man/pca_biplot.Rd +++ b/man/pca_biplot.Rd @@ -17,15 +17,15 @@ pca_biplot( \arguments{ \item{components}{(numeric) The principal components used to generate the plot. The default is \code{c(1, 2)}.} -\item{points_to_label}{(character) points_to_label. Allowed values are limited to the following: \itemize{\item{\code{"none"}: No samples are labelled on the plot.}\item{\code{"all"}: All samples are labelled on the plot.}\item{\code{"outliers"}: Potential outliers are labelled on the plot.}} The default is \code{"none"}.} +\item{points_to_label}{(character) points_to_label. Allowed values are limited to the following: \itemize{ \item{\code{"none"}: No samples are labelled on the plot.}\item{\code{"all"}: All samples are labelled on the plot.}\item{\code{"outliers"}: Potential outliers are labelled on the plot.}} The default is \code{"none"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{scale_factor}{(numeric) The scaling factor applied to the loadings. The default is \code{0.95}.} +\item{scale_factor}{(numeric) The scaling factor applied to the loadings. The default is \code{0.95}.\cr} -\item{style}{(character) Plot style. Allowed values are limited to the following: \itemize{\item{\code{"points"}: Loadings and scores are plotted as a scatter plot.}\item{\code{"arrows"}: The loadings are plotted as arrow vectors.}} The default is \code{"points"}.} +\item{style}{(character) Plot style. Allowed values are limited to the following: \itemize{ \item{\code{"points"}: Loadings and scores are plotted as a scatter plot.}\item{\code{"arrows"}: The loadings are plotted as arrow vectors.}} The default is \code{"points"}.} -\item{label_features}{(logical) Add feature labels. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: Features are labelled.}\item{\code{"FALSE"}: Features are not labelled.}} The default is \code{FALSE}.} +\item{label_features}{(logical) Add feature labels. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: Features are labelled.}\item{\code{"FALSE"}: Features are not labelled.}} The default is \code{FALSE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -38,6 +38,20 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A scatter plot of the selected principal component scores overlaid with the corresponding principal component loadings. } +\section{Inheritance}{ + +A \code{pca_biplot} object inherits the following \code{struct} classes: \cr\cr +\code{pca_biplot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pca_biplot( + components = c(1, 2), + points_to_label = "none", + factor_name = "V1", + scale_factor = 0.95, + style = "points", + label_features = FALSE) + C = pca_biplot(factor_name='Species') } diff --git a/man/pca_correlation_plot.Rd b/man/pca_correlation_plot.Rd index 49c738d..1f3768d 100644 --- a/man/pca_correlation_plot.Rd +++ b/man/pca_correlation_plot.Rd @@ -20,6 +20,15 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A plot of the correlation between the variables/features and the selected principal component scores. Features with high correlation are well represented by the selected component(s) } +\section{Inheritance}{ + +A \code{pca_correlation_plot} object inherits the following \code{struct} classes: \cr\cr +\code{pca_correlation_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pca_correlation_plot( + components = c(1, 2)) + C = pca_correlation_plot() } diff --git a/man/pca_dstat_plot.Rd b/man/pca_dstat_plot.Rd index 7413e94..8ad856e 100644 --- a/man/pca_dstat_plot.Rd +++ b/man/pca_dstat_plot.Rd @@ -7,9 +7,9 @@ pca_dstat_plot(number_components = 2, alpha = 0.05, ...) } \arguments{ -\item{number_components}{(numeric) The number of principal components to use. The default is \code{2}.} +\item{number_components}{(numeric) The number of principal components to use. The default is \code{2}.\cr} -\item{alpha}{(numeric) A confidence threshold for rejecting samples based on the d-statistic. The default is \code{0.05}.} +\item{alpha}{(numeric) A confidence threshold for rejecting samples based on the d-statistic. The default is \code{0.05}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -22,6 +22,16 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A bar chart of the d-statistics for samples in the input PCA model. Samples above the indicated threshold are considered to be outlying. } +\section{Inheritance}{ + +A \code{pca_dstat_plot} object inherits the following \code{struct} classes: \cr\cr +\code{pca_dstat_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pca_dstat_plot( + number_components = 2, + alpha = 0.95) + C = pca_dstat_plot() } diff --git a/man/pca_loadings_plot.Rd b/man/pca_loadings_plot.Rd index 863156f..a21b7b3 100644 --- a/man/pca_loadings_plot.Rd +++ b/man/pca_loadings_plot.Rd @@ -14,9 +14,9 @@ pca_loadings_plot( \arguments{ \item{components}{(numeric) The principal components used to generate the plot. The default is \code{c(1, 2)}.} -\item{style}{(character) Plot style. Allowed values are limited to the following: \itemize{\item{\code{"points"}: Loadings and scores are plotted as a scatter plot.}\item{\code{"arrows"}: The loadings are plotted as arrow vectors.}} The default is \code{"points"}.} +\item{style}{(character) Plot style. Allowed values are limited to the following: \itemize{ \item{\code{"points"}: Loadings and scores are plotted as a scatter plot.}\item{\code{"arrows"}: The loadings are plotted as arrow vectors.}} The default is \code{"points"}.} -\item{label_features}{(character, NULL) Feature labels. Allowed values are limited to the following: \itemize{\item{\code{"character()"}: A vector of labels for the features.}\item{\code{"NULL"}: No labels.}\item{\code{"row.names"}: Labels will be extracted from the column names of the data matrix.}} The default is \code{NULL}.} +\item{label_features}{(character, NULL) Feature labels. Allowed values are limited to the following: \itemize{ \item{\code{"character()"}: A vector of labels for the features.}\item{\code{"NULL"}: No labels.}\item{\code{"row.names"}: Labels will be extracted from the column names of the data matrix.}} The default is \code{NULL}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -29,6 +29,17 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A barchart (one component) or scatter plot (two components) of the selected principal component loadings. } +\section{Inheritance}{ + +A \code{pca_loadings_plot} object inherits the following \code{struct} classes: \cr\cr +\code{pca_loadings_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pca_loadings_plot( + components = c(1, 2), + style = "points", + label_features = NULL) + C = pca_loadings_plot() } diff --git a/man/pca_scores_plot.Rd b/man/pca_scores_plot.Rd index ab49674..64cdbee 100644 --- a/man/pca_scores_plot.Rd +++ b/man/pca_scores_plot.Rd @@ -24,21 +24,21 @@ pca_scores_plot( \item{ycol}{(numeric, integer, character) The column name, or index, of data to plot on the y-axis. The default is \code{"PC2"}.} -\item{points_to_label}{(character) Points to label. Allowed values are limited to the following: \itemize{\item{\code{"none"}: No samples labels are displayed.}\item{\code{"all"}: The labels for all samples are displayed.}\item{\code{"outliers"}: Labels for for potential outlier samples are displayed.}} The default is \code{"none"}.} +\item{points_to_label}{(character) Points to label. Allowed values are limited to the following: \itemize{ \item{\code{"none"}: No samples labels are displayed.}\item{\code{"all"}: The labels for all samples are displayed.}\item{\code{"outliers"}: Labels for for potential outlier samples are displayed.}} The default is \code{"none"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{ellipse}{(character) Plot ellipses. Allowed values are limited to the following: \itemize{\item{\code{"all"}: Ellipses are plotted for all groups and all samples.}\item{\code{"group"}: Ellipses are plotted for all groups.}\item{\code{"none"}: Ellipses are not included on the plot.}\item{\code{"sample"}: An ellipse is plotted for all samples (ignoring group).}} The default is \code{"all"}.} +\item{ellipse}{(character) Plot ellipses. Allowed values are limited to the following: \itemize{ \item{\code{"all"}: Ellipses are plotted for all groups and all samples.}\item{\code{"group"}: Ellipses are plotted for all groups.}\item{\code{"none"}: Ellipses are not included on the plot.}\item{\code{"sample"}: An ellipse is plotted for all samples (ignoring group).}} The default is \code{"all"}.} -\item{ellipse_type}{(character) Type of ellipse. Allowed values are limited to the following: \itemize{\item{\code{"norm"}: Multivariate normal (p = 0.95).}\item{\code{"t"}: Multivariate t (p = 0.95).}} The default is \code{"norm"}.} +\item{ellipse_type}{(character) Type of ellipse. Allowed values are limited to the following: \itemize{ \item{\code{"norm"}: Multivariate normal (p = 0.95).}\item{\code{"t"}: Multivariate t (p = 0.95).}} The default is \code{"norm"}.} -\item{ellipse_confidence}{(numeric) The confidence level for plotting ellipses. The default is \code{0.95}.} +\item{ellipse_confidence}{(numeric) The confidence level for plotting ellipses. The default is \code{0.95}.\cr} \item{label_filter}{(character) Labels are only plotted for the named groups. If zero-length then all groups are included. The default is \code{character(0)}.} \item{label_factor}{(character) The column name of sample_meta to use for labelling samples on the plot. "rownames" will use the row names from sample_meta. The default is \code{"rownames"}.} -\item{label_size}{(numeric) The text size of labels. Note this is not in Font Units. The default is \code{3.88}.} +\item{label_size}{(numeric) The text size of labels. Note this is not in Font Units. The default is \code{3.88}.\cr} \item{components}{(numeric, integer, NULL) The principal components used to generate the plot. If provided this parameter overrides xcol and ycol params. The default is \code{NULL}.} @@ -53,7 +53,26 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ Plots a 2d scatter plot of the selected components } +\section{Inheritance}{ + +A \code{pca_scores_plot} object inherits the following \code{struct} classes: \cr\cr +\code{pca_scores_plot()} ⭢ \code{scatter_chart()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pca_scores_plot( + components = NULL, + xcol = 1, + ycol = 2, + points_to_label = "none", + factor_name = "V1", + ellipse = "all", + label_filter = character(0), + label_factor = "rownames", + label_size = 3.88, + ellipse_type = "norm", + ellipse_confidence = 0.95) + D = iris_DatasetExperiment() M = mean_centre() + PCA() M = model_apply(M,D) diff --git a/man/pca_scree_plot.Rd b/man/pca_scree_plot.Rd index 9303c27..6b1555a 100644 --- a/man/pca_scree_plot.Rd +++ b/man/pca_scree_plot.Rd @@ -7,7 +7,7 @@ pca_scree_plot(max_pc = 15, ...) } \arguments{ -\item{max_pc}{(numeric, integer) The maximum number of components to include in the plot. The default is \code{15}.} +\item{max_pc}{(numeric, integer) The maximum number of components to include in the plot. The default is \code{15}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -22,6 +22,15 @@ struct object \description{ A plot of the percent variance and cumulative percent variance for the components of a PCA model. } +\section{Inheritance}{ + +A \code{pca_scree_plot} object inherits the following \code{struct} classes: \cr\cr +\code{pca_scree_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pca_scree_plot( + max_pc = 15) + C = pca_scree_plot() } diff --git a/man/permutation_test.Rd b/man/permutation_test.Rd index a75c007..ffd86d2 100644 --- a/man/permutation_test.Rd +++ b/man/permutation_test.Rd @@ -7,7 +7,7 @@ permutation_test(number_of_permutations = 50, factor_name, ...) } \arguments{ -\item{number_of_permutations}{(numeric, integer) The number of permutations. The default is \code{50}.} +\item{number_of_permutations}{(numeric, integer) The number of permutations. The default is \code{50}.\cr} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -24,6 +24,16 @@ A \code{permutation_test} object with the following \code{output} slots: \description{ A permutation test generates a "null" model by randomising the response (for regression models) or group labels (for classification models). This is repeated many times to generate a distribution of performance metrics for the null model. This distribution can then be compared to the performance of the true model. If there is overlap between the true and null model performances then the model is overfitted. } +\section{Inheritance}{ + +A \code{permutation_test} object inherits the following \code{struct} classes: \cr\cr +\code{permutation_test()} ⭢ \code{resampler()} ⭢ \code{iterator()} ⭢ \code{struct_class()} +} + \examples{ +M = permutation_test( + number_of_permutations = 100, + factor_name = "V1") + I=permutation_test(factor_name='Species') } diff --git a/man/permute_sample_order.Rd b/man/permute_sample_order.Rd index 6db80c5..b0d48b7 100644 --- a/man/permute_sample_order.Rd +++ b/man/permute_sample_order.Rd @@ -7,7 +7,7 @@ permute_sample_order(number_of_permutations = 10, ...) } \arguments{ -\item{number_of_permutations}{(numeric, integer) The number of times the sample order is permuted. The default is \code{10}.} +\item{number_of_permutations}{(numeric, integer) The number of times the sample order is permuted. The default is \code{10}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -22,6 +22,15 @@ A \code{permute_sample_order} object with the following \code{output} slots: \description{ The order of samples in the data matrix is randomly permuted. The relationship between the samples and the sample meta data is maintained. } +\section{Inheritance}{ + +A \code{permute_sample_order} object inherits the following \code{struct} classes: \cr\cr +\code{permute_sample_order()} ⭢ \code{resampler()} ⭢ \code{iterator()} ⭢ \code{struct_class()} +} + \examples{ +M = permute_sample_order( + number_of_permutations = 100) + C = permute_sample_order() } diff --git a/man/pls_regcoeff_plot.Rd b/man/pls_regcoeff_plot.Rd index 8e30874..973ca9a 100644 --- a/man/pls_regcoeff_plot.Rd +++ b/man/pls_regcoeff_plot.Rd @@ -7,7 +7,7 @@ pls_regcoeff_plot(ycol = 1, ...) } \arguments{ -\item{ycol}{(character, numeric, integer) The Y column to plot. The default is \code{1}.} +\item{ycol}{(character, numeric, integer) The Y column to plot. The default is \code{1}.\cr} \item{...}{additional slots and values passed to struct_class} } @@ -25,9 +25,18 @@ Plots the regression coefficients of a PLSDA model. Plots the regression coefficient scores of a PLSDA model } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pls}}\item{\code{ggplot2}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pls}} \item{\code{ggplot2}}} } +\section{Inheritance}{ + +A \code{pls_regcoeff_plot} object inherits the following \code{struct} classes: \cr\cr +\code{pls_regcoeff_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pls_regcoeff_plot( + ycol = 1) + D = iris_DatasetExperiment() M = mean_centre()+PLSDA(factor_name='Species') M = model_apply(M,D) @@ -37,7 +46,7 @@ chart_plot(C,M[2]) } \references{ Liland K, Mevik B, Wehrens R (2023). \emph{pls: Partial Least Squares and -Principal Component Regression}. R package version 2.8-2, +Principal Component Regression}. R package version 2.8-3, \url{https://CRAN.R-project.org/package=pls}. Wickham H (2016). \emph{ggplot2: Elegant Graphics for Data Analysis}. diff --git a/man/pls_scores_plot.Rd b/man/pls_scores_plot.Rd index dde46c9..99c22a1 100644 --- a/man/pls_scores_plot.Rd +++ b/man/pls_scores_plot.Rd @@ -41,21 +41,21 @@ plsda_scores_plot( \item{ycol}{(numeric, integer, character) The column name, or index, of data to plot on the y-axis. The default is \code{"LV2"}.} -\item{points_to_label}{(character) Points to label. Allowed values are limited to the following: \itemize{\item{\code{"none"}: No samples labels are displayed.}\item{\code{"all"}: The labels for all samples are displayed.}\item{\code{"outliers"}: Labels for for potential outlier samples are displayed.}} The default is \code{"none"}.} +\item{points_to_label}{(character) Points to label. Allowed values are limited to the following: \itemize{ \item{\code{"none"}: No samples labels are displayed.}\item{\code{"all"}: The labels for all samples are displayed.}\item{\code{"outliers"}: Labels for for potential outlier samples are displayed.}} The default is \code{"none"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{ellipse}{(character) Plot ellipses. Allowed values are limited to the following: \itemize{\item{\code{"all"}: Ellipses are plotted for all groups and all samples.}\item{\code{"group"}: Ellipses are plotted for all groups.}\item{\code{"none"}: Ellipses are not included on the plot.}\item{\code{"sample"}: An ellipse is plotted for all samples (ignoring group).}} The default is \code{"all"}.} +\item{ellipse}{(character) Plot ellipses. Allowed values are limited to the following: \itemize{ \item{\code{"all"}: Ellipses are plotted for all groups and all samples.}\item{\code{"group"}: Ellipses are plotted for all groups.}\item{\code{"none"}: Ellipses are not included on the plot.}\item{\code{"sample"}: An ellipse is plotted for all samples (ignoring group).}} The default is \code{"all"}.} -\item{ellipse_type}{(character) Type of ellipse. Allowed values are limited to the following: \itemize{\item{\code{"norm"}: Multivariate normal (p = 0.95).}\item{\code{"t"}: Multivariate t (p = 0.95).}} The default is \code{"norm"}.} +\item{ellipse_type}{(character) Type of ellipse. Allowed values are limited to the following: \itemize{ \item{\code{"norm"}: Multivariate normal (p = 0.95).}\item{\code{"t"}: Multivariate t (p = 0.95).}} The default is \code{"norm"}.} -\item{ellipse_confidence}{(numeric) The confidence level for plotting ellipses. The default is \code{0.95}.} +\item{ellipse_confidence}{(numeric) The confidence level for plotting ellipses. The default is \code{0.95}.\cr} \item{label_filter}{(character) Labels are only plotted for the named groups. If zero-length then all groups are included. The default is \code{character(0)}.} \item{label_factor}{(character) The column name of sample_meta to use for labelling samples on the plot. "rownames" will use the row names from sample_meta. The default is \code{"rownames"}.} -\item{label_size}{(numeric) The text size of labels. Note this is not in Font Units. The default is \code{3.88}.} +\item{label_size}{(numeric) The text size of labels. Note this is not in Font Units. The default is \code{3.88}.\cr} \item{components}{(numeric, integer, NULL) The principal components used to generate the plot. If provided this parameter overrides xcol and ycol params. The default is \code{NULL}.} @@ -70,7 +70,26 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A scatter plot of the selected PLSDA scores. } +\section{Inheritance}{ + +A \code{pls_scores_plot} object inherits the following \code{struct} classes: \cr\cr +\code{pls_scores_plot()} ⭢ \code{scatter_chart()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pls_scores_plot( + components = NULL, + xcol = 1, + ycol = 2, + points_to_label = "none", + factor_name = "V1", + ellipse = "all", + label_filter = character(0), + label_factor = "rownames", + label_size = 3.88, + ellipse_type = "norm", + ellipse_confidence = 0.95) + D = iris_DatasetExperiment() M = mean_centre()+PLSDA(factor_name='Species') M = model_apply(M,D) diff --git a/man/pls_vip_plot.Rd b/man/pls_vip_plot.Rd index 439c781..5a4e7d4 100644 --- a/man/pls_vip_plot.Rd +++ b/man/pls_vip_plot.Rd @@ -7,9 +7,9 @@ pls_vip_plot(threshold = 1, ycol = 1, ...) } \arguments{ -\item{threshold}{(numeric, integer) The threshold for indicating significant features. The default is \code{1}.} +\item{threshold}{(numeric, integer) The threshold for indicating significant features. The default is \code{1}.\cr} -\item{ycol}{(character, numeric, integer) The column of the Y block to be plotted. The default is \code{1}.} +\item{ycol}{(character, numeric, integer) The column of the Y block to be plotted. The default is \code{1}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -23,9 +23,19 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A plot of the Variable Importance for Projection (VIP) scores for a PLSDA model. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pls}}\item{\code{ggplot2}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pls}} \item{\code{ggplot2}}} } +\section{Inheritance}{ + +A \code{pls_vip_plot} object inherits the following \code{struct} classes: \cr\cr +\code{pls_vip_plot()} ⭢ \code{chart()} ⭢ \code{stato()} ⭢ \code{struct_class()} +} + \examples{ +M = pls_vip_plot( + threshold = 1, + ycol = 1) + D = iris_DatasetExperiment() M = mean_centre()+PLSDA(factor_name='Species') M = model_apply(M,D) @@ -35,7 +45,7 @@ chart_plot(C,M[2]) } \references{ Liland K, Mevik B, Wehrens R (2023). \emph{pls: Partial Least Squares and -Principal Component Regression}. R package version 2.8-2, +Principal Component Regression}. R package version 2.8-3, \url{https://CRAN.R-project.org/package=pls}. Wickham H (2016). \emph{ggplot2: Elegant Graphics for Data Analysis}. diff --git a/man/plsda_feature_importance_plot.Rd b/man/plsda_feature_importance_plot.Rd index 97777a2..2b53782 100644 --- a/man/plsda_feature_importance_plot.Rd +++ b/man/plsda_feature_importance_plot.Rd @@ -7,9 +7,9 @@ plsda_feature_importance_plot(n_features = 30, metric = "vip", ...) } \arguments{ -\item{n_features}{(numeric, integer) The number of features to include in the summary. The default is \code{30}.} +\item{n_features}{(numeric, integer) The number of features to include in the summary. The default is \code{30}.\cr} -\item{metric}{(character) Metric to plot. Allowed values are limited to the following: \itemize{\item{\code{"sr"}: Plot Selectivity Ratio.}\item{\code{"sr_pvalue"}: Plot SR p-values.}\item{\code{"vip"}: Plot Variable Importance in Projection scores.}} The default is \code{"vip"}.} +\item{metric}{(character) Metric to plot. Allowed values are limited to the following: \itemize{ \item{\code{"sr"}: Plot Selectivity Ratio.}\item{\code{"sr_pvalue"}: Plot SR p-values.}\item{\code{"vip"}: Plot Variable Importance in Projection scores.}} The default is \code{"vip"}.} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -23,9 +23,19 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A plot of the selected feature significance metric for a PLSDA model for the top selected features. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pls}}\item{\code{ggplot2}}\item{\code{reshape2}}\item{\code{cowplot}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pls}} \item{\code{ggplot2}} \item{\code{reshape2}} \item{\code{cowplot}}} } +\section{Inheritance}{ + +A \code{plsda_feature_importance_plot} object inherits the following \code{struct} classes: \cr\cr +\code{plsda_feature_importance_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = plsda_feature_importance_plot( + n_features = 50, + metric = "vip") + D = iris_DatasetExperiment() M = mean_centre()+PLSDA(factor_name='Species') M = model_apply(M,D) @@ -35,7 +45,7 @@ chart_plot(C,M[2]) } \references{ Liland K, Mevik B, Wehrens R (2023). \emph{pls: Partial Least Squares and -Principal Component Regression}. R package version 2.8-2, +Principal Component Regression}. R package version 2.8-3, \url{https://CRAN.R-project.org/package=pls}. Wickham H (2016). \emph{ggplot2: Elegant Graphics for Data Analysis}. @@ -46,7 +56,7 @@ Wickham H (2007). "Reshaping Data with the reshape Package." \emph{Journal of Statistical Software}, \emph{21}(12), 1-20. \url{http://www.jstatsoft.org/v21/i12/}. -Wilke C (2020). \emph{cowplot: Streamlined Plot Theme and Plot Annotations -for 'ggplot2'}. R package version 1.1.1, +Wilke C (2023). \emph{cowplot: Streamlined Plot Theme and Plot Annotations +for 'ggplot2'}. R package version 1.1.2, \url{https://CRAN.R-project.org/package=cowplot}. } diff --git a/man/plsda_predicted_plot.Rd b/man/plsda_predicted_plot.Rd index b3a5deb..c8d58ce 100644 --- a/man/plsda_predicted_plot.Rd +++ b/man/plsda_predicted_plot.Rd @@ -9,9 +9,9 @@ plsda_predicted_plot(factor_name, style = "boxplot", ycol = 1, ...) \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{style}{(character) Plot style. Allowed values are limited to the following: \itemize{\item{\code{"boxplot"}: A boxplot.}\item{\code{"violin"}: A violin plot.}\item{\code{"density"}: A density plot.}} The default is \code{"boxplot"}.} +\item{style}{(character) Plot style. Allowed values are limited to the following: \itemize{ \item{\code{"boxplot"}: A boxplot.}\item{\code{"violin"}: A violin plot.}\item{\code{"density"}: A density plot.}} The default is \code{"boxplot"}.} -\item{ycol}{(character, numeric, integer) The column of the Y block to be plotted. The default is \code{1}.} +\item{ycol}{(character, numeric, integer) The column of the Y block to be plotted. The default is \code{1}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -25,9 +25,20 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A plot of the regression coefficients from a PLSDA model. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pls}}\item{\code{ggplot2}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pls}} \item{\code{ggplot2}}} } +\section{Inheritance}{ + +A \code{plsda_predicted_plot} object inherits the following \code{struct} classes: \cr\cr +\code{plsda_predicted_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = plsda_predicted_plot( + factor_name = "V1", + style = "boxplot", + ycol = 1) + D = iris_DatasetExperiment() M = mean_centre()+PLSDA(factor_name='Species') M = model_apply(M,D) @@ -37,7 +48,7 @@ chart_plot(C,M[2]) } \references{ Liland K, Mevik B, Wehrens R (2023). \emph{pls: Partial Least Squares and -Principal Component Regression}. R package version 2.8-2, +Principal Component Regression}. R package version 2.8-3, \url{https://CRAN.R-project.org/package=pls}. Wickham H (2016). \emph{ggplot2: Elegant Graphics for Data Analysis}. diff --git a/man/plsda_roc_plot.Rd b/man/plsda_roc_plot.Rd index 89fc56f..dba9ad2 100644 --- a/man/plsda_roc_plot.Rd +++ b/man/plsda_roc_plot.Rd @@ -9,7 +9,7 @@ plsda_roc_plot(factor_name, ycol = 1, ...) \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{ycol}{(character, numeric, integer) The column of the Y block to be plotted. The default is \code{1}.} +\item{ycol}{(character, numeric, integer) The column of the Y block to be plotted. The default is \code{1}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -23,9 +23,19 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A Receiver Operator Characteristic (ROC) plot for PLSDA models computed by adjusting the threshold for assigning group labels from PLS predictions. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pls}}\item{\code{ggplot2}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pls}} \item{\code{ggplot2}}} } +\section{Inheritance}{ + +A \code{plsda_roc_plot} object inherits the following \code{struct} classes: \cr\cr +\code{plsda_roc_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = plsda_roc_plot( + factor_name = "V1", + ycol = 1) + D = iris_DatasetExperiment() M = mean_centre()+PLSDA(factor_name='Species') M = model_apply(M,D) @@ -35,7 +45,7 @@ chart_plot(C,M[2]) } \references{ Liland K, Mevik B, Wehrens R (2023). \emph{pls: Partial Least Squares and -Principal Component Regression}. R package version 2.8-2, +Principal Component Regression}. R package version 2.8-3, \url{https://CRAN.R-project.org/package=pls}. Wickham H (2016). \emph{ggplot2: Elegant Graphics for Data Analysis}. diff --git a/man/plsr_cook_dist.Rd b/man/plsr_cook_dist.Rd index 22f72fa..16b9d7c 100644 --- a/man/plsr_cook_dist.Rd +++ b/man/plsr_cook_dist.Rd @@ -7,7 +7,7 @@ plsr_cook_dist(ycol = 1, ...) } \arguments{ -\item{ycol}{(numeric, integer, character) The y-block column to plot. The default is \code{1}.} +\item{ycol}{(numeric, integer, character) The y-block column to plot. The default is \code{1}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -20,6 +20,15 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A barchart of Cook's distance for each sample used to train a PLSR model. Cook's distance is used to estimate the influence of a sample on the model and can be used to identify potential outliers. } +\section{Inheritance}{ + +A \code{plsr_cook_dist} object inherits the following \code{struct} classes: \cr\cr +\code{plsr_cook_dist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = plsr_cook_dist( + ycol = 1) + C = plsr_cook_dist() } diff --git a/man/plsr_prediction_plot.Rd b/man/plsr_prediction_plot.Rd index fc32abe..0c3adbc 100644 --- a/man/plsr_prediction_plot.Rd +++ b/man/plsr_prediction_plot.Rd @@ -7,7 +7,7 @@ plsr_prediction_plot(ycol = 1, ...) } \arguments{ -\item{ycol}{(numeric, integer, character) The y-block column to plot. The default is \code{1}.} +\item{ycol}{(numeric, integer, character) The y-block column to plot. The default is \code{1}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -20,6 +20,15 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A scatter plot of the true response values against the predicted values for a PLSR model. } +\section{Inheritance}{ + +A \code{plsr_prediction_plot} object inherits the following \code{struct} classes: \cr\cr +\code{plsr_prediction_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = plsr_prediction_plot( + ycol = 1) + C = plsr_prediction_plot() } diff --git a/man/plsr_qq_plot.Rd b/man/plsr_qq_plot.Rd index 3e5f639..596b102 100644 --- a/man/plsr_qq_plot.Rd +++ b/man/plsr_qq_plot.Rd @@ -7,7 +7,7 @@ plsr_qq_plot(ycol = 1, ...) } \arguments{ -\item{ycol}{(numeric, integer, character) The y-block column to plot. The default is \code{1}.} +\item{ycol}{(numeric, integer, character) The y-block column to plot. The default is \code{1}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -20,6 +20,15 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A plot of the quantiles of the residuals from a PLSR model against the quantiles of a normal distribution. } +\section{Inheritance}{ + +A \code{plsr_qq_plot} object inherits the following \code{struct} classes: \cr\cr +\code{plsr_qq_plot()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = plsr_qq_plot( + ycol = 1) + C = plsr_qq_plot() } diff --git a/man/plsr_residual_hist.Rd b/man/plsr_residual_hist.Rd index 67c8d00..e1e0359 100644 --- a/man/plsr_residual_hist.Rd +++ b/man/plsr_residual_hist.Rd @@ -7,7 +7,7 @@ plsr_residual_hist(ycol = 1, ...) } \arguments{ -\item{ycol}{(numeric, integer, character) The y-block column to plot. The default is \code{1}.} +\item{ycol}{(numeric, integer, character) The y-block column to plot. The default is \code{1}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -20,6 +20,15 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram of the residuals for a PLSR model. } +\section{Inheritance}{ + +A \code{plsr_residual_hist} object inherits the following \code{struct} classes: \cr\cr +\code{plsr_residual_hist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = plsr_residual_hist( + ycol = 1) + C = plsr_residual_hist() } diff --git a/man/pqn_norm.Rd b/man/pqn_norm.Rd index 9c0adeb..6e7f6ed 100644 --- a/man/pqn_norm.Rd +++ b/man/pqn_norm.Rd @@ -19,11 +19,11 @@ pqn_norm( \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{qc_frac}{(numeric) A value between 0 and 1 to indicate the minimum proportion of QC samples a feature must be present in for it to be included when computing the reference. Default qc_frac = 0. . The default is \code{0}.} +\item{qc_frac}{(numeric) A value between 0 and 1 to indicate the minimum proportion of QC samples a feature must be present in for it to be included when computing the reference. Default qc_frac = 0. . The default is \code{0}.\cr} -\item{sample_frac}{(numeric) A value between 0 and 1 to indicate the minimum proportion of samples a feature must be present in for it to be considered when computing the normalisation coefficients. . The default is \code{0}.} +\item{sample_frac}{(numeric) A value between 0 and 1 to indicate the minimum proportion of samples a feature must be present in for it to be considered when computing the normalisation coefficients. . The default is \code{0}.\cr} -\item{ref_method}{(character) Reference computation method. Allowed values are limited to the following: \itemize{\item{\code{"mean"}: The reference is computed as the mean of the samples matching the qc_label input.}\item{\code{"median"}: The reference is computed as the median of the samples matching the qc_label_input.}} The default is \code{"mean"}.} +\item{ref_method}{(character) Reference computation method. Allowed values are limited to the following: \itemize{ \item{\code{"mean"}: The reference is computed as the mean of the samples matching the qc_label input.}\item{\code{"median"}: The reference is computed as the median of the samples matching the qc_label_input.}} The default is \code{"mean"}.} \item{ref_mean}{(numeric, NULL) A single sample to use as the reference for normalisation. If set to NULL then the reference will be computed based on the other input parameters (ref_mean, qc_label etc). . The default is \code{NULL}.} @@ -40,9 +40,23 @@ A \code{pqn_norm} object with the following \code{output} slots: PQN is used to normalise for differences in concentration between samples. It makes use of Quality Control (QC) samples as a reference. PQN scales by the median change relative to the reference in order to be more robust against changes caused by response to perturbation. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{pqn_norm} object inherits the following \code{struct} classes: \cr\cr +\code{pqn_norm()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = pqn_norm( + qc_label = "QC", + factor_name = "V1", + qc_frac = 0, + sample_frac = 0, + ref_mean = NULL, + ref_method = "mean") + D = iris_DatasetExperiment() M = pqn_norm(factor_name='Species',qc_label='all') M = model_apply(M,D) @@ -52,5 +66,5 @@ M = model_apply(M,D) Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. } diff --git a/man/pqn_norm_hist.Rd b/man/pqn_norm_hist.Rd index afe6d3c..d9b7b43 100644 --- a/man/pqn_norm_hist.Rd +++ b/man/pqn_norm_hist.Rd @@ -18,6 +18,14 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram of the PQN coefficients for all features } +\section{Inheritance}{ + +A \code{pqn_norm_hist} object inherits the following \code{struct} classes: \cr\cr +\code{pqn_norm_hist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = pqn_norm_hist() + C = pqn_norm_hist() } diff --git a/man/prop_na.Rd b/man/prop_na.Rd index 135ef72..873b5da 100644 --- a/man/prop_na.Rd +++ b/man/prop_na.Rd @@ -7,9 +7,9 @@ prop_na(alpha = 0.05, mtc = "fdr", factor_name, ...) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} @@ -28,7 +28,18 @@ struct object \description{ A Fisher's exact test is used to compare the number of missing values in each group. Multiple test corrected p-values are computed to indicate whether there is a significant difference in the number of missing values across groups for each feature. } +\section{Inheritance}{ + +A \code{prop_na} object inherits the following \code{struct} classes: \cr\cr +\code{prop_na()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = prop_na( + alpha = 0.05, + mtc = "fdr", + factor_name = "V1") + M = prop_na(factor_name='Species') } diff --git a/man/r_squared.Rd b/man/r_squared.Rd index bb419ab..8795d27 100644 --- a/man/r_squared.Rd +++ b/man/r_squared.Rd @@ -17,7 +17,15 @@ r_squared \description{ R-squared is a metric used to assess the goodness of fit for regression models. It measures how much variance of one variable can be explained by another variable. } +\section{Inheritance}{ + +A \code{r_squared} object inherits the following \code{struct} classes: \cr\cr +\code{r_squared()} ⭢ \code{metric()} ⭢ \code{struct_class()} +} + \examples{ +M = r_squared() + MET = r_squared() } diff --git a/man/resample.Rd b/man/resample.Rd index 7f7e186..744af35 100644 --- a/man/resample.Rd +++ b/man/resample.Rd @@ -14,13 +14,13 @@ resample( ) } \arguments{ -\item{number_of_iterations}{(numeric, integer) The number of training sets to generate. The default is \code{10}.} +\item{number_of_iterations}{(numeric, integer) The number of training sets to generate. The default is \code{10}.\cr} -\item{method}{(character) Resampling method. Allowed values are limited to the following: \itemize{\item{\code{"split_data"}: Samples for the training set are selected at random from the full dataset.}\item{\code{"stratified_split"}: Samples for the training set are randomly selected from each level of the chosen factor.}\item{\code{"equal_split"}: Samples for the training set are selected at random from each level of the main factor such that all group sizes are equal.}} The default is \code{"split_data"}.} +\item{method}{(character) Resampling method. Allowed values are limited to the following: \itemize{ \item{\code{"split_data"}: Samples for the training set are selected at random from the full dataset.}\item{\code{"stratified_split"}: Samples for the training set are randomly selected from each level of the chosen factor.}\item{\code{"equal_split"}: Samples for the training set are selected at random from each level of the main factor such that all group sizes are equal.}} The default is \code{"split_data"}.} \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{p_train}{(numeric) The proportion of samples selected for the training set. The default is \code{0.8}.} +\item{p_train}{(numeric) The proportion of samples selected for the training set. The default is \code{0.8}.\cr} \item{collect}{(NULL, character) The name of a model output to collect over all bootstrap repetitions, in addition to the input metric. The default is \code{NULL}.} @@ -40,7 +40,20 @@ A \code{resample} object with the following \code{output} slots: \description{ New training sets are generated from the original data by selecting samples at random. This can be based on levels in a factor or on the whole dataset. } +\section{Inheritance}{ + +A \code{resample} object inherits the following \code{struct} classes: \cr\cr +\code{resample()} ⭢ \code{resampler()} ⭢ \code{iterator()} ⭢ \code{struct_class()} +} + \examples{ +M = resample( + number_of_iterations = 100, + method = "split_data", + factor_name = "V1", + p_train = 0.75, + collect = NULL) + I = resample( number_of_iterations = 10, factor_name = 'Species', diff --git a/man/rsd_filter.Rd b/man/rsd_filter.Rd index 1750be4..49033ee 100644 --- a/man/rsd_filter.Rd +++ b/man/rsd_filter.Rd @@ -7,7 +7,7 @@ rsd_filter(rsd_threshold = 20, qc_label = "QC", factor_name, ...) } \arguments{ -\item{rsd_threshold}{(numeric) The RSD threshold above which features are removed. The default is \code{20}.} +\item{rsd_threshold}{(numeric) The RSD threshold above which features are removed. The default is \code{20}.\cr} \item{qc_label}{(character) The label used to identify QC samples. The default is \code{"QC"}.} @@ -27,9 +27,20 @@ A \code{rsd_filter} object with the following \code{output} slots: An RSD filter calculates the relative standard deviation (the ratio of the standard deviation to the mean) for all features. Any feature with an RSD greater than a predefined threshold is excluded. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{rsd_filter} object inherits the following \code{struct} classes: \cr\cr +\code{rsd_filter()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = rsd_filter( + rsd_threshold = 20, + qc_label = "QC", + factor_name = "V1") + M = rsd_filter(factor_name='Class') } @@ -37,5 +48,5 @@ M = rsd_filter(factor_name='Class') Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. } diff --git a/man/rsd_filter_hist.Rd b/man/rsd_filter_hist.Rd index 8245106..4529f7b 100644 --- a/man/rsd_filter_hist.Rd +++ b/man/rsd_filter_hist.Rd @@ -18,7 +18,15 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram of the calculated RSD values. } +\section{Inheritance}{ + +A \code{rsd_filter_hist} object inherits the following \code{struct} classes: \cr\cr +\code{rsd_filter_hist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = rsd_filter_hist() + C = rsd_filter_hist() } diff --git a/man/sb_corr.Rd b/man/sb_corr.Rd index 3db0dac..1e62ef0 100644 --- a/man/sb_corr.Rd +++ b/man/sb_corr.Rd @@ -24,11 +24,11 @@ sb_corr( \item{qc_col}{(character) The column name of sample_meta indicating the group each sample is a member of.} \item{smooth}{(numeric) The amount of smoothing applied (0 to 1). If set to 0 the smoothing parameter will be estimated using -leave-one-out cross-validation. The default is \code{0}.} +leave-one-out cross-validation. The default is \code{0}.\cr} -\item{use_log}{(logical) Log tranformation. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The data is log transformed prior to performing signal correction.}\item{\code{"FALSE"}: Signal correction is applied to the input data.}} The default is \code{TRUE}.} +\item{use_log}{(logical) Log tranformation. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The data is log transformed prior to performing signal correction.}\item{\code{"FALSE"}: Signal correction is applied to the input data.}} The default is \code{TRUE}.\cr} -\item{min_qc}{(numeric) The minimum number of QC samples required for signal correction. The default is \code{4}.} +\item{min_qc}{(numeric) The minimum number of QC samples required for signal correction. The default is \code{4}.\cr} \item{qc_label}{(character) The label used to identify QC samples. The default is \code{"QC"}.} @@ -49,16 +49,32 @@ struct object Applies Quality Control Robust Spline (QC-RSC) method to correct for signal drift and batch differences in mass spectrometry data. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{pmp}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{pmp}}} } +\section{Inheritance}{ + +A \code{sb_corr} object inherits the following \code{struct} classes: \cr\cr +\code{sb_corr()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = sb_corr( + order_col = character(0), + batch_col = character(0), + qc_col = character(0), + smooth = 0, + use_log = FALSE, + min_qc = 4, + qc_label = "QC", + spar_lim = c(-1.5, 1.5)) + M = sb_corr(order_col='run_order',batch_col='batch_no',qc_col='class') } \references{ Jankevics A, Lloyd GR, Weber RJM (2023). \emph{pmp: Peak Matrix Processing and signal batch correction for metabolomics datasets}. doi:10.18129/B9.bioc.pmp \url{https://doi.org/10.18129/B9.bioc.pmp}, R -package version 1.12.0, \url{https://bioconductor.org/packages/pmp}. +package version 1.14.0, \url{https://bioconductor.org/packages/pmp}. Kirwan JA, Broadhurst DI, Davidson RL, Viant MR (2013). "Characterising and correcting batch variation in an automated direct infusion mass diff --git a/man/scatter_chart.Rd b/man/scatter_chart.Rd index 48ee831..bf5f309 100644 --- a/man/scatter_chart.Rd +++ b/man/scatter_chart.Rd @@ -19,25 +19,25 @@ scatter_chart( ) } \arguments{ -\item{xcol}{(numeric, integer, character) The column name, or index, of data to plot on the x-axis. The default is \code{1}.} +\item{xcol}{(numeric, integer, character) The column name, or index, of data to plot on the x-axis. The default is \code{1}.\cr} -\item{ycol}{(numeric, integer, character) The column name, or index, of data to plot on the y-axis. The default is \code{2}.} +\item{ycol}{(numeric, integer, character) The column name, or index, of data to plot on the y-axis. The default is \code{2}.\cr} -\item{points_to_label}{(character) Points to label. Allowed values are limited to the following: \itemize{\item{\code{"none"}: No samples labels are displayed.}\item{\code{"all"}: The labels for all samples are displayed.}\item{\code{"outliers"}: Labels for for potential outlier samples are displayed.}} The default is \code{"none"}.} +\item{points_to_label}{(character) Points to label. Allowed values are limited to the following: \itemize{ \item{\code{"none"}: No samples labels are displayed.}\item{\code{"all"}: The labels for all samples are displayed.}\item{\code{"outliers"}: Labels for for potential outlier samples are displayed.}} The default is \code{"none"}.} \item{factor_name}{(character) The name of a sample-meta column to use. The default is \code{"none"}.} -\item{ellipse}{(character) Plot ellipses. Allowed values are limited to the following: \itemize{\item{\code{"all"}: Ellipses are plotted for all groups and all samples.}\item{\code{"group"}: Ellipses are plotted for all groups.}\item{\code{"none"}: Ellipses are not included on the plot.}\item{\code{"sample"}: An ellipse is plotted for all samples (ignoring group).}} The default is \code{"all"}.} +\item{ellipse}{(character) Plot ellipses. Allowed values are limited to the following: \itemize{ \item{\code{"all"}: Ellipses are plotted for all groups and all samples.}\item{\code{"group"}: Ellipses are plotted for all groups.}\item{\code{"none"}: Ellipses are not included on the plot.}\item{\code{"sample"}: An ellipse is plotted for all samples (ignoring group).}} The default is \code{"all"}.} -\item{ellipse_type}{(character) Type of ellipse. Allowed values are limited to the following: \itemize{\item{\code{"norm"}: Multivariate normal (p = 0.95).}\item{\code{"t"}: Multivariate t (p = 0.95).}} The default is \code{"norm"}.} +\item{ellipse_type}{(character) Type of ellipse. Allowed values are limited to the following: \itemize{ \item{\code{"norm"}: Multivariate normal (p = 0.95).}\item{\code{"t"}: Multivariate t (p = 0.95).}} The default is \code{"norm"}.} -\item{ellipse_confidence}{(numeric) The confidence level for plotting ellipses. The default is \code{0.95}.} +\item{ellipse_confidence}{(numeric) The confidence level for plotting ellipses. The default is \code{0.95}.\cr} \item{label_filter}{(character) Labels are only plotted for the named groups. If zero-length then all groups are included. The default is \code{character(0)}.} \item{label_factor}{(character) The column name of sample_meta to use for labelling samples on the plot. "rownames" will use the row names from sample_meta. The default is \code{"rownames"}.} -\item{label_size}{(numeric) The text size of labels. Note this is not in Font Units. The default is \code{3.88}.} +\item{label_size}{(numeric) The text size of labels. Note this is not in Font Units. The default is \code{3.88}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -50,7 +50,25 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ Plots a 2d scatter plot of the input data. } +\section{Inheritance}{ + +A \code{scatter_chart} object inherits the following \code{struct} classes: \cr\cr +\code{scatter_chart()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = scatter_chart( + xcol = 1, + ycol = 2, + points_to_label = "none", + factor_name = "V1", + ellipse = "all", + label_filter = character(0), + label_factor = "rownames", + label_size = 3.88, + ellipse_type = "norm", + ellipse_confidence = 0.95) + D = iris_DatasetExperiment() C = scatter_chart( xcol = 'Petal.Width', diff --git a/man/split_data.Rd b/man/split_data.Rd index 1c2f801..7b6941c 100644 --- a/man/split_data.Rd +++ b/man/split_data.Rd @@ -21,7 +21,16 @@ A \code{split_data} object with the following \code{output} slots: \description{ The data matrix is divided into two subsets.A predefined proportion of the samples are randomly selected for a training set, and the remaining samples are used for the test set. } +\section{Inheritance}{ + +A \code{split_data} object inherits the following \code{struct} classes: \cr\cr +\code{split_data()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = split_data( + p_train = 0.75) + M = split_data(p_train=0.75) } diff --git a/man/stratified_split.Rd b/man/stratified_split.Rd index bd8a263..d1fb64d 100644 --- a/man/stratified_split.Rd +++ b/man/stratified_split.Rd @@ -23,7 +23,17 @@ A \code{stratified_split} object with the following \code{output} slots: \description{ The dataset is divided into two subsets. A predefined proportion of samples from each level of a factor is selected for the training set, and the remaining samples are used for the test set. The stratification by factor level means that the relative number of samples per level is approximately equal to the original dataset. } +\section{Inheritance}{ + +A \code{stratified_split} object inherits the following \code{struct} classes: \cr\cr +\code{stratified_split()} ⭢ \code{split_data()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = stratified_split( + factor_name = "V1", + p_train = 0.75) + D = iris_DatasetExperiment() M = stratified_split(p_train=0.75,factor_name='Species') M = model_apply(M,D) diff --git a/man/svm_plot_2d.Rd b/man/svm_plot_2d.Rd index 07193b3..f9a2d84 100644 --- a/man/svm_plot_2d.Rd +++ b/man/svm_plot_2d.Rd @@ -9,7 +9,7 @@ svm_plot_2d(factor_name, npoints = 100, ...) \arguments{ \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{npoints}{(numeric) The number of grid points used to plot the boundary. The default is \code{100}.} +\item{npoints}{(numeric) The number of grid points used to plot the boundary. The default is \code{100}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -23,9 +23,19 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c A scatter plot of the input data by group and the calculated boundary of a SVM model. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{e1071}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{e1071}}} } +\section{Inheritance}{ + +A \code{svm_plot_2d} object inherits the following \code{struct} classes: \cr\cr +\code{svm_plot_2d()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = svm_plot_2d( + factor_name = "V1", + npoints = 100) + D = iris_DatasetExperiment() M = filter_smeta(mode='exclude',levels='setosa',factor_name='Species') + mean_centre()+PCA(number_components=2)+ @@ -39,6 +49,6 @@ chart_plot(C,M[4],predicted(M[3])) \references{ Meyer D, Dimitriadou E, Hornik K, Weingessel A, Leisch F (2023). \emph{e1071: Misc Functions of the Department of Statistics, Probability -Theory Group (Formerly: E1071), TU Wien}. R package version 1.7-13, +Theory Group (Formerly: E1071), TU Wien}. R package version 1.7-14, \url{https://CRAN.R-project.org/package=e1071}. } diff --git a/man/tSNE.Rd b/man/tSNE.Rd index 72eea79..01d45fe 100644 --- a/man/tSNE.Rd +++ b/man/tSNE.Rd @@ -16,19 +16,19 @@ tSNE( ) } \arguments{ -\item{dims}{(numeric) The number of tSNE dimensions computed. The default is \code{2}.} +\item{dims}{(numeric) The number of tSNE dimensions computed. The default is \code{2}.\cr} -\item{perplexity}{(numeric) Perplexity parameter. The default is \code{30}.} +\item{perplexity}{(numeric) Perplexity parameter. The default is \code{30}.\cr} -\item{max_iter}{(numeric) The maximum number of tSNE iterations. The default is \code{100}.} +\item{max_iter}{(numeric) The maximum number of tSNE iterations. The default is \code{100}.\cr} -\item{theta}{(numeric) Speed/accuracy trade-off. A value of 0 gives an exact tSNE. The default is \code{0.5}.} +\item{theta}{(numeric) Speed/accuracy trade-off. A value of 0 gives an exact tSNE. The default is \code{0.5}.\cr} -\item{check_duplicates}{(logical) Check for duplicates. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: Checks for the presence of exact duplicate samples.}\item{\code{"FALSE"}: Does not check for exact duplicate samples.}} The default is \code{FALSE}.} +\item{check_duplicates}{(logical) Check for duplicates. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: Checks for the presence of exact duplicate samples.}\item{\code{"FALSE"}: Does not check for exact duplicate samples.}} The default is \code{FALSE}.\cr} \item{init}{(NULL, data.frame, DatasetExperiment) A set of coordinates for initialising the tSNE algorithm. NULL uses random initialisation. The default is \code{NULL}.} -\item{eta}{(numeric) The learning rate parameter. The default is \code{200}.} +\item{eta}{(numeric) The learning rate parameter. The default is \code{200}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -42,20 +42,35 @@ A \code{tSNE} object with the following \code{output} slots: t-Distributed Stochastic Neighbor Embedding. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{Rtsne}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{Rtsne}}} } +\section{Inheritance}{ + +A \code{tSNE} object inherits the following \code{struct} classes: \cr\cr +\code{tSNE()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = tSNE( + dims = 2, + perplexity = 30, + max_iter = 1000, + theta = 0.5, + check_duplicates = FALSE, + init = NULL, + eta = 200) + M = tSNE() } \references{ +Krijthe JH (2015). \emph{Rtsne: T-Distributed Stochastic Neighbor Embedding +using Barnes-Hut Implementation}. R package version 0.17, +\url{https://github.com/jkrijthe/Rtsne}. + van der Maaten L, Hinton G (2008). "Visualizing High-Dimensional Data Using t-SNE." \emph{Journal of Machine Learning Research}, \emph{9}, 2579-2605. van der Maaten L (2014). "Accelerating t-SNE using Tree-Based Algorithms." \emph{Journal of Machine Learning Research}, \emph{15}, 3221-3245. - -Krijthe JH (2015). \emph{Rtsne: T-Distributed Stochastic Neighbor Embedding -using Barnes-Hut Implementation}. R package version 0.16, -\url{https://github.com/jkrijthe/Rtsne}. } diff --git a/man/tSNE_scatter.Rd b/man/tSNE_scatter.Rd index e76eec7..0032686 100644 --- a/man/tSNE_scatter.Rd +++ b/man/tSNE_scatter.Rd @@ -21,20 +21,29 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c plots the new representation of data after applying tSNE. } \details{ -This object makes use of functionality from the following packages:\itemize{\item{\code{Rtsne}}} +This object makes use of functionality from the following packages:\itemize{ \item{\code{Rtsne}}} } +\section{Inheritance}{ + +A \code{tSNE_scatter} object inherits the following \code{struct} classes: \cr\cr +\code{tSNE_scatter()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = tSNE_scatter( + factor_name = "V1") + M = tSNE_scatter(factor_name='Species') } \references{ +Krijthe JH (2015). \emph{Rtsne: T-Distributed Stochastic Neighbor Embedding +using Barnes-Hut Implementation}. R package version 0.17, +\url{https://github.com/jkrijthe/Rtsne}. + van der Maaten L, Hinton G (2008). "Visualizing High-Dimensional Data Using t-SNE." \emph{Journal of Machine Learning Research}, \emph{9}, 2579-2605. van der Maaten L (2014). "Accelerating t-SNE using Tree-Based Algorithms." \emph{Journal of Machine Learning Research}, \emph{15}, 3221-3245. - -Krijthe JH (2015). \emph{Rtsne: T-Distributed Stochastic Neighbor Embedding -using Barnes-Hut Implementation}. R package version 0.16, -\url{https://github.com/jkrijthe/Rtsne}. } diff --git a/man/tic_chart.Rd b/man/tic_chart.Rd index e0a79eb..d119fcb 100644 --- a/man/tic_chart.Rd +++ b/man/tic_chart.Rd @@ -11,7 +11,7 @@ tic_chart(run_order, factor_name, connected = FALSE, ...) \item{factor_name}{(character) The name of a sample-meta column to use.} -\item{connected}{(logical) Plot samples connected by a grey line. The default is \code{FALSE}.} +\item{connected}{(logical) Plot samples connected by a grey line. The default is \code{FALSE}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -24,7 +24,18 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A scatter plot of Total Ion Count (sum of each sample) versus run order. } +\section{Inheritance}{ + +A \code{tic_chart} object inherits the following \code{struct} classes: \cr\cr +\code{tic_chart()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ +M = tic_chart( + factor_name = "V1", + run_order = character(0), + connected = FALSE) + D = iris_DatasetExperiment() D$sample_meta$run_order=1:nrow(D) C = tic_chart(factor_name='Species',run_order='run_order') diff --git a/man/ttest.Rd b/man/ttest.Rd index b78f758..52432a2 100644 --- a/man/ttest.Rd +++ b/man/ttest.Rd @@ -16,19 +16,19 @@ ttest( ) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{factor_names}{(character) The name of sample meta column(s) to use.} -\item{paired}{(logical) Apply a paired t-test. The default is \code{FALSE}.} +\item{paired}{(logical) Apply a paired t-test. The default is \code{FALSE}.\cr} \item{paired_factor}{(character) The factor name that encodes the sample id for pairing. The default is \code{character(0)}.} -\item{equal_variance}{(logical) Equal variance. Allowed values are limited to the following: \itemize{\item{\code{"TRUE"}: The variance of each group is treated as being equal using the pooled variance to estimate the variance.}\item{\code{"FALSE"}: The variance of each group is not assumed to be equal and the Welch (or Satterthwaite) approximation is used.}} The default is \code{FALSE}.} +\item{equal_variance}{(logical) Equal variance. Allowed values are limited to the following: \itemize{ \item{\code{"TRUE"}: The variance of each group is treated as being equal using the pooled variance to estimate the variance.}\item{\code{"FALSE"}: The variance of each group is not assumed to be equal and the Welch (or Satterthwaite) approximation is used.}} The default is \code{FALSE}.\cr} -\item{conf_level}{(numeric) The confidence level of the interval. The default is \code{0.95}.} +\item{conf_level}{(numeric) The confidence level of the interval. The default is \code{0.95}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -46,7 +46,22 @@ A \code{ttest} object with the following \code{output} slots: \description{ A t-test compares the means of two factor levels. Multiple-test corrected p-values are used to indicate the significance of the computed difference for all features. } +\section{Inheritance}{ + +A \code{ttest} object inherits the following \code{struct} classes: \cr\cr +\code{ttest()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = ttest( + alpha = 0.05, + mtc = "fdr", + factor_names = "V1", + paired = FALSE, + paired_factor = "NA", + equal_variance = FALSE, + conf_level = 0.95) + M = ttest(factor_name='Class') } diff --git a/man/vec_norm.Rd b/man/vec_norm.Rd index 10c5f63..901f433 100644 --- a/man/vec_norm.Rd +++ b/man/vec_norm.Rd @@ -21,7 +21,15 @@ struct object \description{ The samples in the data matrix are normalised to account for differences in concentration by scaling each sample such that the sum of squares is equal to 1. } +\section{Inheritance}{ + +A \code{vec_norm} object inherits the following \code{struct} classes: \cr\cr +\code{vec_norm()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ M = vec_norm() +M = vec_norm() + } diff --git a/man/wilcox_p_hist.Rd b/man/wilcox_p_hist.Rd index cb597fc..a93b951 100644 --- a/man/wilcox_p_hist.Rd +++ b/man/wilcox_p_hist.Rd @@ -18,7 +18,15 @@ See \code{\link[struct]{chart_plot}} in the \code{struct} package to plot this c \description{ A histogram of p values for the wilcoxon signed rank test } +\section{Inheritance}{ + +A \code{wilcox_p_hist} object inherits the following \code{struct} classes: \cr\cr +\code{wilcox_p_hist()} ⭢ \code{chart()} ⭢ \code{struct_class()} +} + \examples{ M = wilcox_p_hist() +M = wilcox_p_hist() + } diff --git a/man/wilcox_test.Rd b/man/wilcox_test.Rd index f54805e..f7f182e 100644 --- a/man/wilcox_test.Rd +++ b/man/wilcox_test.Rd @@ -15,17 +15,17 @@ wilcox_test( ) } \arguments{ -\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.} +\item{alpha}{(numeric) The p-value cutoff for determining significance. The default is \code{0.05}.\cr} -\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{\item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} +\item{mtc}{(character) Multiple test correction method. Allowed values are limited to the following: \itemize{ \item{\code{"bonferroni"}: Bonferroni correction in which the p-values are multiplied by the number of comparisons.}\item{\code{"fdr"}: Benjamini and Hochberg False Discovery Rate correction.}\item{\code{"none"}: No correction.}} The default is \code{"fdr"}.} \item{factor_names}{(character) The name of a sample-meta column to use.} -\item{paired}{(logical) Apply a paired test. The default is \code{FALSE}.} +\item{paired}{(logical) Apply a paired test. The default is \code{FALSE}.\cr} \item{paired_factor}{(character) The factor name containing sample ids for paired data. The default is \code{character(0)}.} -\item{conf_level}{(numeric) The confidence level of the interval. The default is \code{0.95}.} +\item{conf_level}{(numeric) The confidence level of the interval. The default is \code{0.95}.\cr} \item{...}{Additional slots and values passed to \code{struct_class}.} } @@ -45,7 +45,21 @@ struct object \description{ A Mann-Whitney-Wilcoxon signed rank test compares ,the ranks of values in two groups. It is the non-parametric equivalent of a t-test. Multiple test corrected p-values are computed as indicators of significance for each variable/feature. } +\section{Inheritance}{ + +A \code{wilcox_test} object inherits the following \code{struct} classes: \cr\cr +\code{wilcox_test()} ⭢ \code{model()} ⭢ \code{struct_class()} +} + \examples{ +M = wilcox_test( + alpha = 0.05, + mtc = "fdr", + factor_names = "V1", + paired = FALSE, + paired_factor = character(0), + conf_level = 0.95) + M = wilcox_test(factor_name='Class') }