Function to annotate the involved affected (input) genes in each term.

annotate_term_genes(
  result_df,
  input_processed,
  genes_by_term = pathfindR.data::kegg_genes
)

Arguments

result_df

data frame of enrichment results. The only must-have column is "ID".

input_processed

input data processed via input_processing

genes_by_term

List that contains genes for each gene set. Names of this list are gene set IDs (default = kegg_genes)

Value

The original data frame with two additional columns:

Up_regulated

the up-regulated genes in the input involved in the given term's gene set, comma-separated

Down_regulated

the down-regulated genes in the input involved in the given term's gene set, comma-separated

Examples

example_gene_data <- RA_input
colnames(example_gene_data) <- c("GENE", "CHANGE", "P_VALUE")

annotated_result <- annotate_term_genes(result_df = RA_output,
                                        input_processed = example_gene_data)