CommencerCommencer gratuitement

Using Annotations

In this exercise, you will use gene coordinates obtained from the TxDb.Hsapiens.UCSC.hg19.knownGene package. This package provides the coordinates of all known human genes. A GRanges object with coordinates and a unique ID for genes on chromosome 20 has been loaded for you as human_genes.

While these IDs are useful in identifying genes, they are not easy to make sense of. It may be beneficial to add the more human readable gene symbols as well. This can be achieved with the help of the org.Hs.eg.db package, which provides mappings between different sets of gene identifiers. The select() function allows you to obtain a gene symbol, stored in the SYMBOL column, for each ID. Once you have extracted this information, you can add it to the table of gene locations.

Cet exercice fait partie du cours

ChIP-seq with Bioconductor in R

Afficher le cours

Instructions

  • Obtain gene symbols from the SYMBOL column of org.Hs.eg.db.
  • Examine the structure of the returned annotations.
  • Add gene symbols to human_genes.
  • Examine the result.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Obtain gene symbols
gene_symbol <- ___(org.Hs.eg.db, keys=human_genes$gene_id, columns="SYMBOL", keytype="ENTREZID")

# Examine the structure of the returned annotations
str(___)

# Add gene symbols to gene coordinates
human_genes$symbol <- ___

# Examine output
print(human_genes)
Modifier et exécuter le code