Package 'Paralogs'

Title: Visualizing Differential Expression of Paralogs in KEGG Gene Pathways
Description: This package provides functions to visualize the differential expression of paralogs in KEGG gene pathways. The package includes functions to download KEGG gene pathways, extract paralogs from the pathways, and visualize the differential expression of the paralogs. The package also includes functions to visualize the expression of paralogs in the context of the KEGG gene pathways.
Authors: Carson Stacy [aut, cre]
Maintainer: Carson Stacy <[email protected]>
License: MIT + file LICENSE
Version: 0.2.1
Built: 2026-05-29 09:25:35 UTC
Source: https://github.com/clstacy/Paralogs

Help Index


Create ggkegg Object for KEGG Pathway Visualization

Description

Creates a ggkegg object from KEGG results using specified parameters.

Usage

create_ggkegg(kegg_results, pathway_id, pathway_number, organism_code = "sce")

Arguments

kegg_results

An enrichKEGG output from clusterProfiler (provided by user).

pathway_id

A string specifying the pathway ID (provided by user).

pathway_number

The number representing the pathway in KEGG.

organism_code

A string representing the organism code in KEGG (e.g., "sce").

Value

A ggkegg object.


Create KEGG Pathway Graphs

Description

Creates comparative graphs for gene expression data on KEGG pathways.

Usage

createParalogPlots(graph_data, pathway_id, fc_column, juke = 20, title)

Arguments

graph_data

A dataframe with KEGG pathway data processed for visualization.

pathway_id

A string indicating the pathway ID for overlay.

fc_column

A string naming the first fold change column.

juke

A number for amount of space to separate names. Default is 20.

title

A title for the plot.

Value

A ggplot object displaying the pathway graphs side by side.


An example output of enrichKEGG is provided in the 'example_enrich_results' dataset. The results are the top enrichments for the genes in the lrt_yeast example. This data is used in vignette examples.

Description

An example output of enrichKEGG is provided in the 'example_enrich_results' dataset. The results are the top enrichments for the genes in the lrt_yeast example. This data is used in vignette examples.

Usage

example_enrich_results

Format

An object of class enrichResult with 37 rows and 11 columns.


Fetch KEGG Reactions

Description

Retrieves KEGG reaction mappings and formats them for use.

Usage

fetchKeggReactions()

Value

A dataframe containing KEGG reactions with their descriptions.


Get Pathway Number to match row of enrichKEGG to KEGG pathway of interest

Description

Retrieves the pathway number based on a pathway ID from KEGG data.

Usage

getPathwayNumber(kegg_results, pathway_id)

Arguments

kegg_results

An enrichKEGG output from clusterProfiler (provided by user).

pathway_id

A string specifying the pathway ID (provided by user).

Value

An integer representing the pathway number.


load Input data (enrichKEGG object)

Description

Processes outputs from enrichKEGG.

Usage

loadEnrichResults(enrich_results)

Arguments

enrich_results

enrichResult Object from enrichKEGG.

Value

A dataframe with results for subsequent analysis.


load Input data (enrichKEGG object)

Description

Processes outputs from enrichKEGG.

Usage

loadGeneData(DE_results, FC_col_name)

Arguments

DE_results

gene results object, either edgeR, DESeq2, limma, or data frame.

FC_col_name

A string specifying the column name for log fold change.

Value

A dataframe with results for subsequent analysis.


An example DGELRT object is provided in the 'lrt_yeast' dataset. This object contains the results of a differential gene expression analysis using the edgeR package. logFC values correspond to the effect of a gene knockout on response to ethanol stress in yeast.

Description

An example DGELRT object is provided in the 'lrt_yeast' dataset. This object contains the results of a differential gene expression analysis using the edgeR package. logFC values correspond to the effect of a gene knockout on response to ethanol stress in yeast.

Usage

lrt_yeast

Format

An object of class DGELRT with 5615 rows and 4 columns.


Full Workflow for KEGG Pathway Visualization

Description

Executes a complete workflow from raw DE results to visualizing them on a KEGG pathway.

Usage

plotParalogs(
  enrich_results,
  DE_results,
  organism_code = "sce",
  annotation_package = org.Sc.sgd.db,
  keytype = "ORF",
  pathway_code,
  fc_column = "logFC",
  juke = 20,
  title = NULL
)

Arguments

enrich_results

The enrichKEGG results (from clusterProfiler).

DE_results

The DE results (e.g. from edgeR).

organism_code

The organism code for KEGG pathways (e.g., 'sce').

annotation_package

The Bioconductor package for annotations relevant to the organism.

keytype

The type of key used in the gene IDs (e.g., "SYMBOL", "ENTREZID", "ENSEMBL").

pathway_code

The KEGG pathway code to visualize (e.g. 'sce00020')

fc_column

The first fold change column name for visualization.

juke

A number for amount of space to separate names. Default is 20.

title

A title for the plot.

Value

A ggplot object displaying the pathway graphs.


Process ggkegg Data for Visualization

Description

Processes ggkegg object data to prepare it for visualization, enhancing gene data with KEGG reactions and annotations.

Usage

process_ggkegg(
  KEGG_data,
  topTags_results,
  KEGG_reactions_df,
  annotation_db,
  organism_code = "sce"
)

Arguments

KEGG_data

A ggkegg object containing KEGG pathway data.

topTags_results

A dataframe containing gene results.

KEGG_reactions_df

A dataframe containing KEGG reaction descriptions.

annotation_db

An AnnotationDbi object for gene annotations.

organism_code

A string representing the organism code in KEGG (e.g., "sce").

Value

A dataframe ready for plotting.