add_Genes: Add gene information

View source: R/main.R

add_GenesR Documentation

Add gene information

Description

This function adds a column with a list of genes included in each locus to the ModuleSummary data frame of the hic2community function.

Usage

add_Genes(df, speciesObj)

Arguments

df

The ModuleSummary data frame obtained by running hic2community function

speciesObj

Any Txdb package name corresponding

Details

Adding gene list to ModuleSummary data frame obtained from hic2community function.

Value

A data.frame identical to the input, with an additional "Genes" column. Each entry in this column lists the gene(s) that overlap with the corresponding genomic region. If multiple genes are present, they are concatenated with commas.

Author(s)

Sora Yoon, PhD

Examples

modulefile = system.file('extdata','mouse_naiveCD4T_Vahedi_short.rds',
package = 'HiCocietyExample')
mycom = readRDS(modulefile)
mycom$ModuleSummary = add_Genes(mycom$ModuleSummary,
'TxDb.Mmusculus.UCSC.mm10.knownGene')

HiCociety documentation built on Feb. 16, 2026, 5:10 p.m.