create_triple_omic.Rd
A triple omics class contains three data.frames, one for features, one for samples, and one for abundances. This is a good format when there is a large amount of meta data associated with features or samples.
create_triple_omic(
measurement_df,
feature_df = NULL,
sample_df = NULL,
feature_pk,
sample_pk,
omic_type_tag = "general"
)
A data.frame (or tibble) of measurements - one row for each combination of feature and sample
A data.frame (or tibble) of features - one row per feature
A data.frame (or tibble) of samples - one row per sample
A unique identifier for features
A unique identifier for samples
an optional subtype of omic data: metabolomics, lipidomics, proteomics, genomics, general
An S3 triple_omic
/tomic
object built on a list
:
A tibble of feature meta-data (one row per feature)
A tibble of sample meta-data (one row per sample)
A tibble with one row per measurement (i.e., features x samples)
A list which organized the dataset's meta-data:
variable specifying a unique feature
variable specifying a unique sample
tibble of feature attributes
tibble of sample attributes
tibble of measurement attributes
for now primary keys are unique (rather than allowing for a multi-index)
library(dplyr)
measurement_df <- tidyr::expand_grid(
feature_id = 1:10,
sample_id = LETTERS[1:5]
) %>%
dplyr::mutate(value = rnorm(n()))
feature_df <- tibble(
feature_id = 1:10,
feature_group = rep(c("a", "b"), each = 5)
)
sample_df <- tibble(
sample_id = LETTERS[1:5],
sample_group = c("a", "a", "b", "b", "b")
)
triple_omic <- create_triple_omic(
measurement_df, feature_df, sample_df,
"feature_id", "sample_id"
)