Title: | Meta-Analysis for Non-Integral Data |
---|---|
Description: | Combination of results for meta-analysis using significance and effect size only. P-values and fold-change are combined to obtain a global significance on each metabolite. Produces a volcano plot summarising the relevant results from meta-analysis. Vote-counting reports for metabolites. And explore plot to detect discrepancies between studies at a first glance. Methodology is described in the Llambrich et al. (2021) <doi:10.1093/bioinformatics/btab591>. |
Authors: | Maria Llambrich [aut, cre] , Eudald Correig [aut], Raquel Cumeras [aut] |
Maintainer: | Maria Llambrich <[email protected]> |
License: | GPL-3 |
Version: | 0.3.0 |
Built: | 2024-11-21 04:22:16 UTC |
Source: | https://github.com/mariallr/amanida |
amanida: A package for Meta-Analysis with non-integral data
Maria Llambrich, Eudald Correig and Raquel Cumeras
Results combination for meta-analysis using only significance and effect size.
P-values and fold-change are combined to obtain a global significance on each metabolite.
Produces a volcano plot summarizing the relevant results from meta-analysis.
Qualitative meta-analysis for metabolites
Graphical representation of qualitative analysis by bar plot
Trend explore plot to detect discrepancies between studies at a first glance
Useful links:
Get nice colour-blind colours
amanida_palette()
amanida_palette()
vector of colours
amanida_read
imports the data and formats for compute_amanida
or amanida_vote
functions
amanida_read(file, mode, coln, separator = NULL)
amanida_read(file, mode, coln, separator = NULL)
file |
path to file |
mode |
indicate if data will be quantitative or qualitative. Options are:
|
coln |
columns names to use. It has to be in order identification, p-values, fold-changes, sample size and reference. |
separator |
the separator used on file |
Note that amanida_read
skips rows with missing values or NA. Negatives values for fold-change are transformed to positive (1/value).
Formats compatible are csv, xlsx, xls or txt.
tibble table with data imported
coln <- c("Compound Name", "P-value", "Fold-change", "N total", "References") input_file <- getsampleDB() datafile <- amanida_read(input_file, mode = "quan", coln, separator=";")
coln <- c("Compound Name", "P-value", "Fold-change", "N total", "References") input_file <- getsampleDB() datafile <- amanida_read(input_file, mode = "quan", coln, separator=";")
amanida_report
creates a report from the data using amanida functions
amanida_report( input_file, separator = NULL, analysis_type = NULL, column_id, pvalue_cutoff = NULL, fc_cutoff = NULL, votecount_lim, path = NULL, comp_inf = NULL )
amanida_report( input_file, separator = NULL, analysis_type = NULL, column_id, pvalue_cutoff = NULL, fc_cutoff = NULL, votecount_lim, path = NULL, comp_inf = NULL )
input_file |
path to the original dataset in xlsx, xls, csv or txt format |
separator |
indicate the separator used in the input_file parameter |
analysis_type |
indicate if data will be quantitative, qualitative or both. Options are:
|
column_id |
vector containing columns names to use. It has to be in order identification, p-values, fold-changes, sample size and reference. |
pvalue_cutoff |
numeric value to consider statistical significance |
fc_cutoff |
numeric value to consider significance for effect size |
votecount_lim |
minimum numeric value for vote-counting visualization |
path |
path to the directory where html file is created, otherwise the file will be saved in a temporal folder |
comp_inf |
name checking using information from public databases |
This function uses directly the dataset to create a report with the meta-analysis results. In case of quantitative analysis amanida_report
uses the functions amanida_read
and compute_amanida
for analyse the input data. Then the results are showed using volcano_plot
, explore_plot
and vote_plot
.
an html document saved in the working directory
## Not run: column_id = c("Compound Name", "P-value", "Fold-change", "N total", "References") input_file <- getsampleDB() amanida_report(input_file, separator = ";", column_id, analysis_type = "quan", pvalue_cutoff = 0.05, fc_cutoff = 4, votecount_lim = 2, comp_inf = F) ## End(Not run)
## Not run: column_id = c("Compound Name", "P-value", "Fold-change", "N total", "References") input_file <- getsampleDB() amanida_report(input_file, separator = ";", column_id, analysis_type = "quan", pvalue_cutoff = 0.05, fc_cutoff = 4, votecount_lim = 2, comp_inf = F) ## End(Not run)
amanida_vote
performs vote-counting on qualitative data.
amanida_vote(data)
amanida_vote(data)
data |
data imported using |
Vote-counting is computed without trend division. Punctuation of entries is based on trend, up-regulation gives 1, down-regulation give -1 and equal behavior gives 0. Total sum is divided then by the total number of entries on each compound. Compound combination is made with PubChem CID when is available.
Note that amanida_vote
skips rows with missing values or NA.
Formats compatible are csv, xlsx, xls or txt.
METAtable S4 object with vote-counting for each compound on @slot vote
## Not run: coln = c("Compound Name", "Behaviour", "References") input_file <- system.file("extdata", "dataset2.csv", package = "amanida") data_votes <- amanida_read(input_file, mode = "qual", coln, separator = ";") vote_result <- amanida_vote(data_votes) ## End(Not run)
## Not run: coln = c("Compound Name", "Behaviour", "References") input_file <- system.file("extdata", "dataset2.csv", package = "amanida") data_votes <- amanida_read(input_file, mode = "qual", coln, separator = ";") vote_result <- amanida_vote(data_votes) ## End(Not run)
check_names
check the names to harmonize them to a common nomenclature. Valid names are:
chemical name, InChI, InChIKey and SMILES.
check_names(data)
check_names(data)
data |
data imported using |
Note that check_names
depends on webchem
package and it slows down the process.
Formats compatible are amanida_read
output
tibble table with data imported with PubChem ID retrieved
## Not run: coln <- c("Compound Name", "P-value", "Fold-change", "N total", "References") input_file <- getsampleDB() datafile <- amanida_read(input_file, mode = "quan", coln, separator=";") data_checked <- check_names(datafile) ## End(Not run)
## Not run: coln <- c("Compound Name", "P-value", "Fold-change", "N total", "References") input_file <- getsampleDB() datafile <- amanida_read(input_file, mode = "quan", coln, separator=";") data_checked <- check_names(datafile) ## End(Not run)
compute_amanida
Combines for the same entry or metabolite the statistical values of p-value and fold-change. Also is computed a vote-counting for each compound. Compound combination is made with PubChem CID when is available.
compute_amanida(datafile, comp.inf = F)
compute_amanida(datafile, comp.inf = F)
datafile |
data imported using |
comp.inf |
include compounds IDs from PubChem, InChIKey, SMILES, KEGG, ChEBI, HMDB, Drugbank, Molecular Mass and Molecular Formula |
Entries corresponding to metabolites are combined as follows:
P-values are combined using Fisher method weighted by N and gamma distribution
Fold-change are combined by weighted mean. Transformation works with fold-change transformed to log scale with base 2.
Vote-counting is computed based on votes. Punctuation of entries is based on trend, up-regulation gives 1, down-regulation give -1 and equal behavior gives 0. Total sum is divided then by the total number of entries on each compound.
METAtable S4 object with p-value combined, fold-change combined and vote-counting for each compound
## Not run: data("sample_data") compute_amanida(sample_data) ## End(Not run)
## Not run: data("sample_data") compute_amanida(sample_data) ## End(Not run)
explore_plot
creates a bar-plot showing the votes divided in up-regulated and down-regulated and the global result for each compound.
explore_plot(data, type = "all", counts = NULL)
explore_plot(data, type = "all", counts = NULL)
data |
an tibble obtained by |
type |
select the subset of data to plot. Options are:
|
counts |
value of vote-counting cut-off. Will be only displayed data over the cut-off. |
Sum of votes divided by trend are plotted, then is obtained the total result by compound summing both trends.
a ggplot bar-plot showing the sum of votes for each compound divided by the trend
data("sample_data") explore_plot(sample_data, type = "mix", counts = 1)
data("sample_data") explore_plot(sample_data, type = "mix", counts = 1)
Function to sample data path
getsampleDB()
getsampleDB()
compute_amanida
or amanida_vote
functionAn S4 class to return results from compute_amanida
or amanida_vote
function
stat
results for statistics combining p-values and fold-changes
vote
vote-counting for metabolites
A dataset containing results from meta-analysis of metabolomic studies
sample_data
sample_data
A data frame with 143 rows and 6 variables:
Name of the compound under study
P-value
Fold-change
Number of samples of the compound
References
Trend: 1 (up), -1 (down) or 0 (none)
volcano_plot
returns a volcano plot of the combined results on each metabolite obtained by compute_amanida
function
volcano_plot(mets, cutoff = NULL)
volcano_plot(mets, cutoff = NULL)
mets |
an S4 METAtables object |
cutoff |
values for p-value and fold-change significance |
Results are presented as -log10 for p-value and log2 for fold-change. Values over the cut off are labeled. If not cutoff is provided will be used alpha 0.05 for p-value and 1.5 for logarithmic fold-change.
plot of results
## Not run: data("sample_data") amanida_result <- compute_amanida(sample_data) volcano_plot(amanida_result) ## End(Not run)
## Not run: data("sample_data") amanida_result <- compute_amanida(sample_data) volcano_plot(amanida_result) ## End(Not run)
vote_plot
creates a bar-plot showing the vote-count for each compound.
vote_plot(mets, counts = NULL)
vote_plot(mets, counts = NULL)
mets |
an S4 METAtables object obtained by |
counts |
value of vote-counting cut-off. Will be only displayed data over the cut-off. |
Vote-couting is the sum of number of reports up-regulated and the substraction of reports down-regulated.
a ggplot bar-plot showing the vote-count per compound
## Not run: data("sample_data") result <- compute_amanida(sample_data) vote_plot(result) ## End(Not run)
## Not run: data("sample_data") result <- compute_amanida(sample_data) vote_plot(result) ## End(Not run)