condenseGsea: add redundancy information to a GSEA table

View source: R/condenseGsea.R

condenseGseaR Documentation

add redundancy information to a GSEA table

Description

add redundancy information to a GSEA table

Usage

condenseGsea(
  gsea,
  colname = "genes",
  sep = ",",
  similarity = 0.9,
  n_finalParents = NULL,
  finalParents = NULL,
  idcol = NULL
)

Arguments

gsea

data.frame, where each row is a gene set and there is at least one column with a string for each row. This string contains all genes for that set

colname

string, naming the column in which the genes are listed

sep

character. What genes in the column string? E.g. if a cell of the column would look like "HOXA9,HOXA3", you need to set sep=","

similarity

number, what has to be the minimum gene overlap between two terms in order for one to be regarded as redundant?

n_finalParents

integer, how many parents should there be among all pathways?

finalParents

string vector, name the pathways that should be parents; works only if idcol is defined

idcol

string, name of the column that contains the pathway names; necessary for finalParents; if provided adds an additional column for the parent name

Value

data.frame similar to the input, but with 3 added columns: cID has a simple numeric ID for each row. cKids lists the IDs of all sets that are condensed under this set. cParents lists the possible parents for this set. cMotherID lists the sets that is the best possible parent among the parents. cMother is optionally added if idcol is provided. cEve states if the set has no parents. cShared gives the ratio of the overlap size (how many genes are shared between mother and child) versus the number of genes in the child term.

Examples

library(gseaCondenser)

gsea <- gseaCondenser::gseaTest
gsea <- condenseGsea(gsea, similarity=0.1, idcol="pathway")
head(gsea)

NicolasH2/gseaCondenser documentation built on Jan. 28, 2024, 7:25 p.m.