metabolyse: Perform an analysis

View source: R/metabolyse.R

metabolyseR Documentation

Perform an analysis

Description

Perform analyses containing multiple analysis element steps.

Usage

metabolyse(data, info, parameters = analysisParameters(), verbose = TRUE)

reAnalyse(analysis, parameters = analysisParameters(), verbose = TRUE)

## S4 method for signature 'Analysis'
reAnalyse(analysis, parameters = analysisParameters(), verbose = TRUE)

Arguments

data

tibble or data.frame containing data to analyse

info

tibble or data.frame containing data info or meta data

parameters

an object of AnalysisParameters class containing parameters for analysis. Default calls analysisParameters()

verbose

should output be printed to the console

analysis

an object of class Analysis containing previous analysis results

Details

Routine analyses are those that are often made up of numerous steps where parameters have likely already been previously established. The emphasis here is on convenience with as little code as possible required. In these analyses, the necessary analysis elements, order and parameters are first prepared and then the analysis routine subsequently performed in a single step. The metabolyse function provides this utility, where the metabolome data, sample meta information and analysis parameters are provided. The reAnalyse method can be used to perform further analyses on the results.

Value

An S4 object of class Analysis.

Examples

library(metaboData)

## Generate analysis parameters
p <- analysisParameters(c('pre-treatment','modelling'))

## Alter pre-treatment and modelling parameters to use different methods
parameters(p,'pre-treatment') <- preTreatmentParameters(
  list(occupancyFilter = 'maximum',
       transform = 'TICnorm')
)
parameters(p,'modelling') <- modellingParameters('anova')

## Change "cls" parameters 
changeParameter(p,'cls') <- 'day'

## Run analysis using a subset of the abr1 negative mode data set
analysis <- metabolyse(abr1$neg[,1:200],
                       abr1$fact,
                       p)
                       
## Re-analyse to include correlation analysis
analysis <- reAnalyse(analysis,
                      parameters = analysisParameters('correlations'))

print(analysis)


jasenfinch/metabolyseR documentation built on Sept. 18, 2023, 1:25 a.m.