StatMetCage performs statistical analysis of data produced by metabolic cages.
StatMetCage is installed from Github:
install.packages("devtools")
devtools::install_github("https://github.com/gautierstoll/StatMetCage")
Some dependent packages may not be available directly. They have to be installed first:
install.packages("lubridate")
lme:
install.packages("nlme")
install.packages("shiny")
install.packages("shinyFiles")
fs:
install.packages("fs")
install.packages("readxl")
Useful helps:
? `RawMetaboData-class`
? `initialize,RawMetaboData-method`
? `AnalysisMetaboData-class`
? `initialize,AnalysisMetaboData-method`
? `ResStatMetabo-class`
? `initialize,ResStatMetabo-method`
? `metaboPlot,ResStatMetabo-method`
Activate the package:
library(StatMetCage)
Download your data stored in a .csv file (eg myData.csv
):
RawMetaData = new("RawMetaboData",fileName = "myData.csv")
Create an analysis object that contains the observation of interests(eg "VO2" and "VCO2""). An annotation data frame can be included (eg myAnnotation
) that must contains "Animal", "Date" and "Time" column, with qualitative annotation (eg "Treatment", "Mutation"), the other columns will be treated as numeric data, with a time dependence evaluated by spline:
AnalysisMeta = new("AnalysisMetaboData",rawData = RawMetaData,obs = c("VO2","VCO2"),annotation = myAnnotation,annotGroups = c("Treatment","Mutation"))
Create a statistical result object:
ResStatMeta = new("ResStatMetabo",anMetData = AnalysisMeta,observation = "VO2",model = "quadratic",group = "Treatment")
The results can be plotted:
metaboPlot(ResStatMeta,type = "data.model")
and statistical results can be extracted:
ResStatMeta@lmeRes$tTable
There s a shiny application for handling StatMetPackage.
After activating the package
library(StatMetCage)
Launch the shiny application:
StatShiny()
Click on "Raw Data File" to download the raw data (a .csv
file)
Click on "Annotation File" to download the annotation file. It needs to be a .xlsx
file that must contain the columns "Date","Time","Animal","Group". Each line describes an animal. The "Group" column must have some lines with the name "control".
Click on "Run Analysis". Every animal in the Raw Data File must have at least one corresponding line in the Annotation File
The application produces a table of p-values, regarding the effect of each group compared to control. The application also produces a .pdf
for each analyzed values.