有多少個轉錄本?
還記得影片中我們如何找出目標基因其中一個轉錄本的外顯子長度嗎?現在換你來找出基因 ABCD1 有多少個轉錄本。你可以使用:
transcriptsBy(x, by = "gene")
當你依「gene」取得所有轉錄本後,就可以用基因的 id 來選取任一基因。ABCD1 的基因 id 是 215。一個小技巧:要選取特定基因的資訊時,請在基因 id 外圍加上反引號,例如 transcripts$`215`。
本練習屬於課程
R 中的 Bioconductor 入門
練習說明
- 載入人類 transcripts 資料庫到
hg。 - 使用
seqlevels()預先篩選第 X 染色體。 - 在
hg中依"gene"取得所有 transcripts,將結果存為hg_chrXt,並列印。 - 使用
$從hg_chrXt選取基因`215`。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Load the human transcripts DB to hg
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
hg <- ___
# Prefilter chromosome X "chrX" using seqlevels()
___(___) <- c(___)
# Get all transcripts by gene and print it
hg_chrXt <- transcriptsBy(___, by = ___)
hg_chrXt
# Select gene `215` from the hg_chrXt
___$___