Skip to contents

This function leverages the `KSEAapp` package to perform KSEA, either to generate a kinase-substrate interaction table or a table of kinase activity scores. Optionally, it can produce various plots to visualize the results, including chord diagrams, sankey diagrams, bar plots, or scatter plots.

Usage

get_KSEA(
  data,
  table_type = c("kinase_substrate", "kinase_score"),
  plot = c("no", "chord_diagram", "sankey_diagram", "bar_plot", "scatter_plot"),
  NetworKIN = TRUE,
  NetworKIN.cutoff = 1
)

Arguments

data

A data frame containing phosphoproteomics data. This typically includes columns for protein identifiers, phosphorylation sites, and quantitative values (e.g., log2 fold changes or intensities). The exact format should conform to the requirements of `KSEAapp::KSEA.KS_table` or `KSEAapp::KSEA.Scores`.

table_type

A character string specifying the type of table to generate. Must be one of "kinase_substrate" (to get a table of kinase-substrate interactions) or "kinase_score" (to get a table of inferred kinase activity scores).

plot

A character string specifying the type of plot to generate. Options include:

  • "no": No plot is generated, only the table is returned.

  • "chord_diagram": Generates a chord diagram for kinase-substrate interactions (only applicable when `table_type = "kinase_substrate"`).

  • "sankey_diagram": Generates a Sankey diagram for kinase-substrate interactions (only applicable when `table_type = "kinase_substrate"`).

  • "bar_plot": Generates a bar plot of kinase Z-scores (only applicable when `table_type = "kinase_score"`).

  • "scatter_plot": Generates a scatter plot (volcano plot-like) of kinase Z-scores vs. -log10(p-value) (only applicable when `table_type = "kinase_score"`).

NetworKIN

A logical value indicating whether to use NetworKIN scores for kinase-substrate prediction. Default is `TRUE`.

NetworKIN.cutoff

A numeric value specifying the NetworKIN cutoff score. Only applicable if `NetworKIN = TRUE`. Default is `1`.

Value

A list containing:

  • `table`: The generated data frame (either kinase-substrate table or kinase score table).

  • `plot`: A `ggplot` object or `circlize` plot if a plot type other than "no" is specified. If `plot = "no"`, only the `table` is returned.

Examples

if (FALSE) { # \dontrun{
# Assuming 'data_example' is your phosphoproteomics data and 'KSData' is loaded
# from KSEAapp.
# Example 1: Get kinase-substrate table without a plot
ks_table <- get_KSEA(data = data_example, table_type = "kinase_substrate",
plot = "no")
print(ks_table)

# Example 2: Get kinase scores and a bar plot
kinase_results <- get_KSEA(data = data_example, table_type = "kinase_score",
plot = "bar_plot")
print(kinase_results$table)
print(kinase_results$plot)

# Example 3: Get kinase-substrate table and a chord diagram
ks_chord_results <- get_KSEA(data = data_example, table_type = "kinase_substrate",
plot = "chord_diagram")
# The chord diagram is plotted directly.

# Example 4: Get kinase scores and a scatter plot
kinase_scatter_results <- get_KSEA(data = data_example, table_type = "kinase_score",
plot = "scatter_plot")
print(kinase_scatter_results$table)
print(kinase_scatter_results$plot)
} # }