有多少个转录本?
还记得视频中我们如何求出关注基因某个转录本的外显子长度吗?现在轮到您来找出基因 ABCD1 有多少个转录本。您可以使用:
transcriptsBy(x, by = "gene")
得到按基因分组的所有转录本后,您可以通过基因 id 选择任意基因。ABCD1 的基因 id 是 215。一个小提示:要选取某个特定基因的信息,请在基因 id 外使用反引号,例如 transcripts$`215`。
本练习是课程的一部分
R 中的 Bioconductor 入门
练习说明
- 将人类转录本数据库加载到
hg。 - 使用
seqlevels()预先筛选第 X 染色体。 - 按
"gene"获取hg中的所有转录本,将结果存入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
___$___