Skip to contents

This function performs a PCA analysis on the input data and combines it with the sample metadata to perform an ANOVA test to identify significant differences between the groups.

Usage

MetaAnalysis(
  InputData,
  SettingsFile_Sample,
  Scaling = TRUE,
  Percentage = 0.1,
  StatCutoff = 0.05,
  SaveAs_Table = "csv",
  SaveAs_Plot = "svg",
  PrintPlot = TRUE,
  FolderPath = NULL
)

Arguments

InputData

DF with unique sample identifiers as row names and metabolite numerical values in columns with metabolite identifiers as column names. Use NA for metabolites that were not detected. includes experimental design and outlier column.

SettingsFile_Sample

Optional: DF which contains information about the samples, which will be combined with your input data based on the unique sample identifiers used as rownames. Column "Conditions" with information about the sample conditions (e.g. "N" and "T" or "Normal" and "Tumor"), can be used for feature filtering and colour coding in the PCA. Column "AnalyticalReplicate" including numerical values, defines technical repetitions of measurements, which will be summarised. Column "BiologicalReplicates" including numerical values. Please use the following names: "Conditions", "Biological_Replicates", "Analytical_Replicates".Default = NULL

Scaling

Optional: TRUE or FALSE for whether a data scaling is used Default = TRUE

Percentage

Optional: Percentage of top and bottom features to be displayed in the results. Default = 0.1

StatCutoff

Optional: Cutoff for the adjusted p-value of the ANOVA test. Default = 0.05

SaveAs_Table

Optional: File types for the analysis results are: "csv", "xlsx", "txt". Default = "csv"

SaveAs_Plot

Optional: Select the file type of output plots. Options are svg, png, pdf. Default = svg

PrintPlot

Optional: TRUE or FALSE, if TRUE Volcano plot is saved as an overview of the results. Default = TRUE

FolderPath

Optional: Path to the folder the results should be saved at. default: NULL

Value

List of DFs: prcomp results, loadings, Top-Bottom features, annova results, results summary

Examples

Tissue_Norm <- MetaProViz::ToyData("Tissue_Norm")
Res <- MetaProViz::MetaAnalysis(InputData=Tissue_Norm[,-c(1:13)],
                                SettingsFile_Sample= Tissue_Norm[,c(2,4:5,12:13)])
#> The column names of the 'SettingsFile_Sample' contain special character that where removed.