Understanding the impact on pathways
Pathways are another useful way to group genes. In this exercise, you will examine the results of a pathway enrichment analysis that looks at peaks that are more pronounced in the primary tumor samples. The object enrich_primary
contains the results. This is a list with four entries. Your main interest at this point is in results, a data frame of enrichment results, ordered by significance. It includes the ID and name of the gene sets and the genes associated with peaks that are part of the gene set. Here, genes are reported as Entrez IDs. You can use the database provided by the org.Hs.eg.db package to convert between Entrez IDs and gene symbols. The select()
function provides a convenient interface to select entries from the SYMBOL column using the ENTREZID key type.
This exercise is part of the course
ChIP-seq with Bioconductor in R
Exercise instructions
- Examine the top gene sets.
- Extract the gene IDs for the top ranking set.
- Split gene IDs into a vector.
- Convert gene IDs to gene symbols.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Examine the top gene sets
head(___$results)
# Extract the gene IDs for the top ranking set
genes <- ___$___$Geneset.Peak.Genes[1]
# Split gene IDs into a vector
gene_ids <- strsplit(___, ', ')[[1]]
# Convert gene IDs to gene symbols
gene_symbol <- select(org.Hs.eg.db, keys=___, columns="___", keytype="___")
# Print the result
___(gene_symbol)