r - 如何从 Ensembl 检索染色体上基因的起始值和终止值

标签 r

假设我有一个名为“Tlr6”的基因(见下图),我想知道如何在 R 中检索染色体上该基因的起始值和终止值?例如图中,起始值为64952031,结束值为64960097。

图片网址为here 。 这里的基因名称是 Tlr6,Ensembl ID 是 ENSMUSG00000051498。我可以使用这些信息将开始值和结束值读入 R 吗?

enter image description here

最佳答案

您可以使用 Bioconductor 中的 biomaRt 包来执行此操作:

#skip this if the package is already installed
source("http://bioconductor.org/biocLite.R")
biocLite("biomaRt")

library(biomaRt)
#select the ensembl mouse dataset
ensembl <- useMart("ensembl", dataset="mmusculus_gene_ensembl")


getBM(attributes=c("ensembl_gene_id","start_position","end_position"),
  filters="ensembl_gene_id",values = "ENSMUSG00000051498",mart=ensembl)

有关该包的更多信息 here

关于r - 如何从 Ensembl 检索染色体上基因的起始值和终止值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31680148/

相关文章:

r - 基于数据类型按顺序选择列的 R tidyverse 方法

r - 了解 R 中 Makevars 文件的内容(宏、变量、~/.R/Makevars 和 pkg/src/Makevars)

r - roxygen2 6.0.0 现在在最后一行需要 "@export"吗?

regex - R:从字符串中删除最后三个点

r - 有没有办法计算 R dplyr 中的唯一日期

r - 在日期序列中查找月份的最后一天

用不等于 0 的样本替换值

r - OAuth(从 “httr” )到 Shiny 服务器上的 LinkedIn

r - 如何使用dplyr查找R数据框中两行中的值之间的差异

r - 如何让 Sweave 将图形放在单独的文件夹中并以 Rnw 文件命名它们