使用註釋資料
在這個練習中,你會使用從套件 TxDb.Hsapiens.UCSC.hg19.knownGene 取得的基因座標。這個套件提供所有已知人類基因的座標。已經為你載入一個 GRanges 物件 human_genes,其中包含第 20 號染色體上基因的座標與唯一 ID。
雖然這些 ID 有助於辨識基因,但不易理解。加入更直覺可讀的基因符號會更好。你可以使用 org.Hs.eg.db 套件來達成,這個套件提供不同基因識別碼之間的對應關係。透過 select() 函式,你可以為每個 ID 取得基因符號(存於 SYMBOL 欄位)。擷取到這些資訊後,你就能把它加入到基因位置的表格中。
本練習屬於課程
在 R 中使用 Bioconductor 進行 ChIP-seq
練習說明
- 從 org.Hs.eg.db 的
SYMBOL欄位取得基因符號。 - 檢視回傳之註釋資料的結構。
- 將基因符號加入
human_genes。 - 檢視結果。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# 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)