if (FALSE) { # requireNamespace("pmartRdata", quietly = TRUE)
# \donttest{
if (interactive()) {
library(pmartRdata)
trelliData1 <- as.trelliData.edata(e_data = pep_edata,
edata_cname = "Peptide",
omics_type = "pepData")
# Transform the data
omicsData <- edata_transform(omicsData = pep_object, data_scale = "log2")
# Group the data by condition
omicsData <- group_designation(omicsData = omicsData, main_effects = c("Phenotype"))
# Apply the IMD ANOVA filter
imdanova_Filt <- imdanova_filter(omicsData = omicsData)
omicsData <- applyFilt(filter_object = imdanova_Filt, omicsData = omicsData,
min_nonmiss_anova = 2)
# Normalize my pepData
omicsData <- normalize_global(omicsData, "subset_fn" = "all", "norm_fn" = "median",
"apply_norm" = TRUE, "backtransform" = TRUE)
# Implement the IMD ANOVA method and compute all pairwise comparisons
# (i.e. leave the `comparisons` argument NULL)
statRes <- imd_anova(omicsData = omicsData, test_method = 'combined')
# Generate the trelliData object
trelliData2 <- as.trelliData(omicsData = omicsData)
trelliData4 <- as.trelliData(omicsData = omicsData, statRes = statRes)
# Build the abundance histogram with an edata file.
# Generate trelliData in as.trelliData.edata
trelli_panel_by(trelliData = trelliData1, panel = "Peptide") %>%
trelli_abundance_histogram(test_mode = TRUE, test_example = 1:10, path = tempdir())
# Build the abundance histogram with an omicsData object.
# Generate trelliData in as.trelliData
trelli_panel_by(trelliData = trelliData2, panel = "Peptide") %>%
trelli_abundance_histogram(test_mode = TRUE, test_example = 1:10, path = tempdir())
# Build the abundance histogram with an omicsData and statRes object.
# Generate trelliData in as.trelliData.
trelli_panel_by(trelliData = trelliData4, panel = "Peptide") %>%
trelli_abundance_histogram(
test_mode = TRUE, test_example = 1:10, cognostics = "sample count", path = tempdir())
# Users can modify the plotting function with ggplot parameters and interactivity,
# and can also select certain cognostics.
trelli_panel_by(trelliData = trelliData1, panel = "Peptide") %>%
trelli_abundance_histogram(test_mode = TRUE, test_example = 1:10,
ggplot_params = c("ylab('')", "xlab('Abundance')"), interactive = TRUE,
cognostics = c("mean abundance", "median abundance"), path = tempdir())
closeAllConnections()
}
# }
}
Run the code above in your browser using DataLab