enrich_mods {CEMiTool}R Documentation

Enriches communities

Description

Returns enrichment of communities from edgelist created by cemoverlap function.

Usage

enrich_mods(community_list, analyses, comp_group = "none",
  subject_col = NULL, run_fgsea = FALSE)

Arguments

community_list

Community list obtained from overlap community function

analyses

List of CEMiTool objects

comp_group

Which group will be used as base for comparison. If 'none', then all combinations of comparisons will be made

subject_col

Column containing subject information in sample annotation slot of CEMiTool objects

run_fgsea

Logical. Should fgsea be run?

Details

This function assumes that relevant modules for a comparison in a study will have a high proportion of differentially regulated genes in a certain direction. Base assumption is that NON-relevant modules will be centered at zero.

Value

A data.frame containing information of how much each comparison is enriched in each community in each CEMiTool object.

Examples

## Not run: 
# Run the cemitool function twice on expr dataset. Each time, one sample will be removed
data(expr0)
data(sample_annot)
set.seed(10)
dset1 <- expr0[,-sample(1:ncol(expr0), 1)]
dset2 <- expr0[,-sample(1:ncol(expr0), 1)]
cem1 <- cemitool(dset1, plot=FALSE)
cem2 <- cemitool(dset2, plot=FALSE)
cem_overlap_df <- cem_overlap(list(cem1, cem2))

comm_overlap <- overlap_community(cem_overlap_df)

samples1 <- names(expr_data(cem1, filter=TRUE, apply_vst=TRUE))
samples2 <- names(expr_data(cem2, filter=TRUE, apply_vst=TRUE))

sample_annotation(cem1) <- sample_annot[sample_annot$SampleName %in% samples1, ]
sample_annotation(cem2) <- sample_annot[sample_annot$SampleName %in% samples2, ]

mod_enrich <- enrich_mods(comm_overlap, list(cem1, cem2), comp_group='g0')

## End(Not run)

[Package CEMiTool version 1.8.2 Index]