create_triple_omic | R Documentation |
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"
)
measurement_df |
A data.frame (or tibble) of measurements - one row for each combination of feature and sample |
feature_df |
A data.frame (or tibble) of features - one row per feature |
sample_df |
A data.frame (or tibble) of samples - one row per sample |
feature_pk |
A unique identifier for features |
sample_pk |
A unique identifier for samples |
omic_type_tag |
an optional subtype of omic data: metabolomics, lipidomics, proteomics, genomics, general |
for now primary keys are unique (rather than allowing for a multi-index)
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
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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.