一个生物信息学编程问题。在 R 中,我有一个经典的从物种 A 到物种 B 的基因符号转换,在这个例子中是从小鼠到人类,我使用 biomaRt 执行,特别是 getLDS 函数。
x<-c("Lbp","Ndufv3","Ggt1")
require(biomaRt)
convert<-function(x){
human=useMart("ensembl",dataset="hsapiens_gene_ensembl")
mouse=useMart("ensembl",dataset="mmusculus_gene_ensembl")
newgenes=getLDS(
attributes="mgi_symbol",
filters="mgi_symbol",
values=x,
mart=mouse,
attributesL="hgnc_symbol",
martL=human,
uniqueRows=TRUE
)
humanx<-unique(newgenes)
return(humanx)
}
conversion<-convert(x)
但是,我想获取链接数据库中存在的所有 id:换句话说,所有鼠标/人类对(在此示例中)。告诉getLDS函数中的参数值检索所有id 的东西,而不仅仅是 x 变量中指定的那些。我说的是一张完整的地图,数万行长,指定两个数据库的符号之间的所有直系同源关系。
有什么想法或解决方法吗?非常感谢!