OmicsLonDA (Omics Longitudinal Differential Analysis) is a statistical framework that provides robust identification of time intervals where omics features are significantly different between groups. OmicsLonDA is based on 5 main steps:
Download the latest development code of OmicsLonDA from GitHub using devtools
library(devtools)
install_github("aametwally/OmicsLonDA", ref = "master")
library(OmicsLonDA)
library(SummarizedExperiment)
## Load 10 simulated features and metadata
data("omicslonda_data_example")
The measurment matrix represents count/intensity of features from an omic experiment. Columns represent various samples from different subjects longitudinally. Rows represent various features. Here is an example:
omicslonda_data_example$ome_matrix[1:5, 1:5]
The metadata dataframe contains annotations for each sample. Most impotantly it should have at least: (a) "Subject": which denote from which subject this sample is coming from, (b) "Group": which represents which group this sample is from (eg., healthy, disease, etc), (c) "Time": which represents the collection time of the corresponding sample. Here is an example:
head(omicslonda_data_example$metadata)
se_ome_matrix = as.matrix(omicslonda_data_example$ome_matrix)
se_metadata = DataFrame(omicslonda_data_example$metadata)
omicslonda_se_object = SummarizedExperiment(assays=list(se_ome_matrix),
colData = se_metadata)
omicslonda_se_object_adjusted = adjustBaseline(se_object = omicslonda_se_object)
assay(omicslonda_se_object_adjusted)[1:5, 1:5]
omicslonda_test_object = omicslonda_se_object_adjusted[1,]
visualizeFeature(se_object = omicslonda_test_object, text = "Feature_1",
unit = "days", ylabel = "Normalized Count",
col = c("blue", "firebrick"), prefix = "OmicsLonDA_example")
{width=400px}
points = seq(1, 500, length.out = 500)
res = omicslonda(se_object = omicslonda_test_object, n.perm = 100,
fit.method = "ssgaussian", points = points, text = "Feature_1",
parall = FALSE, pvalue.threshold = 0.05,
adjust.method = "BH", time.unit = "days",
ylabel = "Normalized Count",
col = c("blue", "firebrick"), prefix = "OmicsLonDA_example")
visualizeFeatureSpline(se_object = omicslonda_test_object, omicslonda_object = res, fit.method = "ssgaussian",
text = "Feature_1", unit = "days",
ylabel = "Normalized Count",
col = c("blue", "firebrick"),
prefix = "OmicsLonDA_example")
{width=400px}
visualizeTestStatHistogram(omicslonda_object = res, text = "Feature_1",
fit.method = "ssgaussian", prefix = "OmicsLonDA_example")
{width=400px}
visualizeArea(omicslonda_object = res, fit.method = "ssgaussian",
text = "Feature_1", unit = "days",
ylabel = "Normalized Count", col =
c("blue", "firebrick"), prefix = "OmicsLonDA_example")
{width=400px}
save(res, file = sprintf("%s/Feature_%s_results_%s.RData",
prefix = "OmicsLonDA_example", text = "Feature_1",
fit.method = "ssgaussian"))
feature.summary = as.data.frame(do.call(cbind, res$details),
stringsAsFactors = FALSE)
write.csv(feature.summary, file = sprintf("%s/Feature_%s_Summary_%s.csv",
prefix = "OmicsLonDA_example", text = "Feature_1",
fit.method = "ssgaussian"), row.names = FALSE)
OmicsLonDA is under active research development. Please report any bugs/suggestions to Ahmed Metwally (ametwall@stanford.edu).
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.