How to retrieve the strength and direction of association of a group of genetic variants to > 700+ immunophenotypes
The very powerful ieugwasr library allows you to query tens of thousands of GWAS summary statistics in R (available in the IEU GWAS collection) very quickly.
Below I show you a nice example of the potential of this library.
Suppose we want to retrieve the strength and direction of association of a group of variants to the 700+ immunophenotypes published by Orrù et al in 2020.
First, we need to authenticate with ieugwasr:
Next, we need to extract the identification codes of the summary statistics of the article by Orrù et al "Complex genetic signatures in immune cells underlie autoimmunity and inform therapy":
At this point, with a few lines of code, we can retrieve the association data for a group of variants (in this case two) and save the results in a file for each variant:
The execution speed is really fast.
ieugwasr::get_access_token()
ieugwasr::get_access_token()
gwi <- gwasinfo()
immune <- subset(gwi, gwi$pmid=='32929287')
i <- associations(variants = c('rs11651270', 'rs12150220'), id=immune$id)
Commenti
Posta un commento