# \donttest{
# Creating a mock AnnotatedGeneLists object
gene_symbols <- c("GENE1", "GENE2", "GENE3")
ensembl_ids <- c("ENSG000001", "ENSG000002", "ENSG000003")
entrez_ids <- c("1001", "1002", "1003")
create_mock_gene_list <- function() {
new("GeneList",
SYMBOL = gene_symbols,
ENSEMBL = ensembl_ids,
ENTREZID = entrez_ids)
}
mock_gene_list1 <- create_mock_gene_list()
mock_gene_list2 <- create_mock_gene_list()
annotated_gene_lists <- new("AnnotatedGeneLists",
inbuilt = list(Lasso = mock_gene_list1,
Univariate = mock_gene_list2),
permutation = list(Lasso = mock_gene_list1,
Univariate = mock_gene_list2))
# Define a background gene set
background <- c("GENE1", "GENE2", "GENE3")
# Perform GO enrichment analysis
results <- GO_enrichment_analysis(annotated_gene_lists,
background = background,
organism = "org.Hs.eg.db",
keyType = "SYMBOL")
print(results)
# }
Run the code above in your browser using DataLab