简体   繁体   English

R中的Biomart将rssnp转换为基因名称

[英]Biomart in R to convert rssnp to gene name

I have the following code in R. 我在R中有以下代码。

library(biomaRt)

snp_mart = useMart("ENSEMBL_MART_SNP", dataset="hsapiens_snp")
snp_attributes = c("refsnp_id", "chr_name", "chrom_start", 
"associated_gene", "ensembl_gene_stable_id", "minor_allele_freq")

getENSG <- function(rs, mart = snp_mart) {
results <- getBM(attributes = snp_attributes,
               filters    = "snp_filter", values = rs, mart = mart)
return(results)
}

getENSG("rs144864312")

    refsnp_id chr_name chrom_start associated_gene ensembl_gene_stable_id
1 rs144864312        8    20254959              NA        ENSG00000061337
    minor_allele_freq
1       0.000399361

I have no background in biology so please forgive me if this is an obvious question. 我没有生物学背景,因此,如果这是一个明显的问题,请原谅我。 I was told that rs144864312 should match to the gene name "LZTS1". 有人告诉我rs144864312应该与基因名称“ LZTS1”匹配。 The code above I largely got from off the internet. 上面的代码主要来自互联网。 My question is where do I extract that gene name from? 我的问题是我从哪里提取该基因名称? I get that the listAttributes(snp_mart) gives a list of all possible outputs but I don't see any that give me the above "gene name". 我知道listAttributes(snp_mart)给出了所有可能输出的列表,但是我看不到任何给我上述“基因名称”的东西。 Where do I extract this gene name from using biomart (and given the rs number)? 我该从哪里使用biomart提取此基因名称(并给定rs号)? Thank you in advance. 先感谢您。

PS: I need to do this for something like 500 entries (not just 1). PS:我需要对500个条目(而不只是1个)执行此操作。 Hence why I created a simple function as above to extract the gene name. 因此,为什么我如上所述创建了一个简单的函数来提取基因名称。

First I think your question will draw more professional attention on https://www.biostars.org/ 首先,我认为您的问题将在https://www.biostars.org/上引起更多专业关注

That said, to my knowledge, now you have the ensembl ID (ENSG00000061337), you are just one step away from getting the gene name. 就是说,据我所知,现在您有了集成ID(ENSG00000061337),离获取基因名称仅一步之遥。 If you google "how to convert ensembl ID to gene name" you will find many approaches. 如果您用谷歌“如何将集成体ID转换为基因名称”,您会发现很多方法。 Here I list a few options: 在这里,我列出了一些选项:

  1. use: https://david.ncifcrf.gov/conversion.jsp 使用: https : //david.ncifcrf.gov/conversion.jsp
  2. use biomart under ensemble: http://www.ensembl.org/biomart/martview/1cb4c119ae91cb34b2cd5280be0a1aac 在集成环境下使用biomart: http ://www.ensembl.org/biomart/martview/1cb4c119ae91cb34b2cd5280be0a1aac
  3. download a table with both gene name and ensembl ID, and customize your query. 下载具有基因名称和整合ID的表格,然后自定义查询。 You might want to download it from UCSC Genome Browser, and here are some instructions: https://www.biostars.org/p/92939/ 您可能要从UCSC Genome Browser下载它,以下是一些说明: https : //www.biostars.org/p/92939/

Good luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM