create_model_df: Create design matrix.

View source: R/utils.R

create_model_dfR Documentation

Create design matrix.

Description

Store term membership for each gene.

Usage

create_model_df(df_genes, df_terms, pvalue_threshold = 0.05)

Arguments

df_genes

Dataframe storing gene names and DE p-values.

df_terms

Dataframe storing pathway database.

pvalue_threshold

P-value threshold to create binary columns 'pvalue_sig' and 'pvalue_notsig'.

Value

Dataframe.

Examples

df_genes <- data.frame(
  gene = c("g1", "g2"),
  pvalue = c(0.1, 0.2)
)
df_terms <- data.frame(
  term = c("A", "A", "B", "B", "C"),
  gene = c("g1", "g2", "g1", "g2", "g2")
)
create_model_df(df_genes, df_terms)

cbg-ethz/pareg documentation built on July 20, 2023, 7:30 p.m.