formatForAnalysis: Format data for analysis

Description Usage Arguments Value Examples

View source: R/analysis_on_quantification.R

Description

Create an object of class SummarizedExperiment to use in functions pca, oplsda or kruskalWallis.

Usage

1
2
3
4
5
6
7
8
formatForAnalysis(
  data,
  design = NULL,
  feature_info = NULL,
  zero.threshold = 100,
  zero.group = NULL,
  outliers = NULL
)

Arguments

data

A data frame containing omics dataset with samples in columns and features of interest in rows (metabolites/buckets...).

design

A data frame describing the colums of data with at least two columns, the first one corresponding to the column names of data. Default to NULL (in which case, the column names of data are used for study design).

feature_info

A data frame describing the rows of data with at least two columns, the first one corresponding to the row names of data. Default to NULL (in which case, the row names of data are used for feature information).

zero.threshold

Remove features having a proportion of zeros larger than or equal to zero.threshold. Default to 100.

zero.group

Variable name of design data frame specifying the group variable used to remove features with a proportion of zeros larger than or equal to zero.threshold within the group. Default to NULL, no group.

outliers

Names of the outliers (samples) to remove.

Value

An object of type SummarizedExperiment with metabolite data given as buckets or quantified metabolites.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Import quantification results
if (require("ASICSdata", quietly = TRUE)) {
  quantif_path <- system.file("extdata", "results_ASICS.txt",
                              package = "ASICSdata")
  quantification <- read.table(quantif_path, header = TRUE, row.names = 1)

  # Import design
  design <- read.table(system.file("extdata", "design_diabete_example.txt",
                                   package = "ASICSdata"), header = TRUE)

  # Create object for analysis and remove features with more than 25% of
  # zeros
  analysis_obj <- formatForAnalysis(quantification,
                                    design = design,
                                    zero.threshold = 25,
                                    zero.group = "condition")
}

ASICS documentation built on Nov. 8, 2020, 8:19 p.m.