knitr::opts_chunk$set(echo = TRUE) options(rmarkdown.html_vignette.check_title = FALSE)
Certain functions have been included in pmartR
to simplify the user's experience by allowing them to retrieve information stored in attributes of the omicsData object. We'll demonstrate these functions with some of the example omicsData objects from the pmartRdata
package.
library(pmartR) library(pmartRdata) mypro <- pro_object mymetab <- metab_object mynmr <- nmr_identified_object
get_data_class()
- Returns data_class attribute from statRes or trellData object, inherited from the omicsData used in imd_anova()
or format_data()
# get a statRes object using the proData object mypro <- group_designation(omicsData = mypro, main_effects = "Phenotype") myfilter <- imdanova_filter(omicsData = mypro) mypro <- applyFilt(filter_object = myfilter, omicsData = mypro, min_nonmiss_anova = 2, min_nonmiss_gtest = 3) mystats <- imd_anova(omicsData = mypro, test_method = "combined") get_data_class(mystats)
get_data_info()
- Returns a list containing the data scale, normalization information, number of unique entries in e_data, number of missing observations in e_data, proportion of missing observations in e_data, number of samples, and data typeget_data_info(omicsData = mypro)
get_data_scale()
- Returns current data scale which may be different from the original data scale (if edata_transform()
was used)get_data_scale(omicsObject = mypro) get_data_scale(omicsObject = mymetab) get_data_scale(omicsObject = mynmr)
get_data_scale_orig()
- Retrieves the character string indicating the scale the data was originally on when the omicsData object was createdget_data_scale_orig(omicsObject = mypro) get_data_scale_orig(omicsObject = mymetab) get_data_scale_orig(omicsObject = mynmr)
get_edata_cname()
- Returns the name of the column in e_data that contains the biomolecule IDsget_edata_cname(omicsObject = mypro) get_edata_cname(omicsObject = mymetab) get_edata_cname(omicsObject = mynmr)
get_emeta_cname()
- Returns the name of the column in e_meta that contains the mapping to biomolecules in e_dataget_emeta_cname(omicsObject = mypro) get_emeta_cname(omicsObject = mymetab) get_emeta_cname(omicsObject = mynmr)
get_fdata_cname()
- Returns the name of the column in f_data that contains the names of the samplesget_fdata_cname(omicsObject = mypro) get_fdata_cname(omicsObject = mymetab) get_fdata_cname(omicsObject = mynmr)
get_group_DF()
- A data.frame with columns for sample ID and group. If two main effects are provided, the original main effect levels for each sample are returned as the third and fourth columns of the data frame. Additionally, the covariates provided will be listed as attributes of this data frame. For both mymetab
and mynmr
, we have not designated groups yet so the results are NULL.get_group_DF(omicsData = mypro) get_group_DF(omicsData = mymetab) get_group_DF(omicsData = mynmr)
get_group_table()
- This function returns a table with number of samples per groupget_group_table(omicsObject = mypro)
get_isobaric_info()
- A list containing the following six elements: exp_cname, channel_cname, refpool_channel, refpool_cname, refpool_notation, and norm_info (list containing a single logical element that indicates whether the data have been normalized to a reference poolmyiso <- edata_transform(omicsData = isobaric_object, data_scale = "log2") myiso_normalized <- normalize_isobaric( omicsData = myiso, exp_cname = "Plex", apply_norm = TRUE, refpool_cname = "Virus", refpool_notation = "Pool" ) get_isobaric_info(omicsData = myiso_normalized)
get_meta_info()
- Retrieves the values in the meta_info attribute from an omicsData objectget_meta_info(omicsData = mynmr)
get_nmr_info()
- A list containing the following three elements: metabolite_name, sample_property_cname, and norm_info (list containing two logical elements that indicate i) whether the data have been normalized to a spiked in metabolite or to a property taking sample-specific values and ii) whether the data have been back transformed so the values are on a similar scale to the raw values before normalization.get_nmr_info(omicsData = mynmr) mynmr <- edata_transform( omicsData = nmr_identified_object, data_scale = "log2" )
# Normalization using a "spiked in" metabolite nmr_norm <- normalize_nmr( omicsData = mynmr, apply_norm = TRUE, metabolite_name = "unkm1.53", backtransform = TRUE ) get_nmr_info(omicsData = nmr_norm)
# Normalization using a sample property nmr_norm <- normalize_nmr( omicsData = mynmr, apply_norm = TRUE, sample_property_cname = "Concentration", backtransform = TRUE ) get_nmr_info(omicsData = nmr_norm)
get_filters()
- A list containing filter class objects. Each element in this list corresponds to a filter applied to the data, and filters are listed in the order they were applied.get_filters(omicsData = mypro)
get_data_norm()
- Returns the norm_info element of the data_info attribute indicating whether the data have been normalizedget_data_norm(omicsObject = mypro) get_data_norm(omicsObject = mymetab) get_data_norm(omicsObject = mynmr)
get_isobaric_norm()
- A logical value indicating whether the data have been isobaric normalizedget_isobaric_norm(myiso) get_isobaric_norm(myiso_normalized)
get_nmr_norm()
- A logical value indicating whether the data have been NMR normalizedget_nmr_norm(omicsData = mynmr) get_nmr_norm(omicsData = nmr_norm)
get_comparisons()
- Returns a data frame with comparisons and their indicesimd_anova_res <- imd_anova( omicsData = mypro, test_method = "comb", pval_adjust_a_multcomp = "bon", pval_adjust_g_multcomp = "bon" ) get_comparisons(compObj = imd_anova_res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.