| get_matching_genes | R Documentation |
get_matching_genes() aligns rows from multiple association result tables
using a shared key column (e.g. gene or feature identifier). Effect estimates
and confidence intervals are standardized across datasets, while row labels
are taken exclusively from the reference dataset (the first element of dfs).
This function is typically used internally by foresttopr,
but may be useful on its own when preparing matched effect tables for
visualization or downstream analysis.
get_matching_genes(
dfs,
labels,
gene_col = NULL,
label_col = NULL,
effect_type = c("OR", "beta")
)
dfs |
A list of data frames containing association results. Each data frame must contain a key column and effect size information. |
labels |
A character vector of dataset labels of the same length as
|
gene_col |
Character scalar specifying the column name used to match
rows across datasets (e.g. gene identifier). If |
label_col |
Optional character scalar specifying the column name in the
reference dataset (the first element of |
effect_type |
Character scalar specifying the effect scale to use.
Either |
Rows are matched across datasets using the key column specified by
gene_col. The set of keys present in the reference dataset defines the
universe of rows retained. For each dataset, confidence intervals are
derived preferentially from explicit bounds, standard errors, or p-values,
depending on availability.
The returned table contains one row per matched key per dataset.
A data frame containing matched effect estimates with the following columns:
Matching key used to align rows across datasets.
Row label used for display purposes.
Dataset identifier corresponding to labels.
Effect estimate on the requested scale.
P-value associated with the effect estimate.
Lower confidence interval bound.
Upper confidence interval bound.
foresttopr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.