目前GWAS方向發了很多文獻,但是並沒有一個很完善的R包對這些文獻的數據進行匯總。
接下來推薦的這個是最新發表的GWAS數據匯總R包。看了一下功能齊全,但是數據不是收錄的很齊全。
下面具體講一下。
在R上安裝
install.packages("remotes")
remotes::install_github("ramiromagno/gwasrapidd")
查詢是否有發表關於自身免疫性疾病的文章
library(gwasrapidd)
my_studies <- get_studies(efo_trait = 'autoimmune disease')
查詢發表自身免疫性疾病文章的數量
n(my_studies)
獲取發表自身免疫性疾病的文章ID
my_studies@studies$study_id
查詢發表自身免疫性疾病的文章標題
my_studies@publications$title
查看發表自身免疫性疾病文章在pubmed的界面信息
open_in_pubmed(my_studies@publications$pubmed_id)
獲取發表身高文獻的SNP關聯信息
my_associations <- get_associations(study_id = my_studies@studies$study_id)
查詢P值小於1e-6的位點
dplyr::filter(my_associations@associations, pvalue < 1e-6) %>% # Filter by p-value
tidyr::drop_na(pvalue) %>%
dplyr::pull(association_id) -> association_ids # Extract column association_id
提取顯著信號位點信息
my_associations2 <- my_associations[association_ids]
顯示顯著信號位點的個數
n(my_associations2)
顯示顯著信號位點的RS ID, risk allele, 頻率
my_associations2@risk_alleles[c('variant_id', 'risk_allele', 'risk_frequency')] %>%
print(n = Inf)
獲取含有rs12752552位點的文獻
s2 <- get_studies(variant_id = 'rs12752552')
測試了一下,優點是減去了很多信息檢索的工作,缺點是這個包剛開發不久,信息還不夠齊全
更多詳細信息請看gwasrapidd
參考文獻:Magno R, Maia A T. gwasrapidd: an R package to query, download and wrangle GWAS Catalog data[J]. bioRxiv, 2019: 643940.