Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get all published associations from the GWAS catalog #10

Open
privefl opened this issue Dec 17, 2019 · 0 comments
Open

Get all published associations from the GWAS catalog #10

privefl opened this issue Dec 17, 2019 · 0 comments
Labels
wiki page Wiki page = how to do this

Comments

@privefl
Copy link
Member

privefl commented Dec 17, 2019

There are some weird columns.
For now, what I have been able to do:

# 88 MB to download
all_assoc <- bigreadr::fread2(
  "https://www.ebi.ac.uk/gwas/api/search/downloads/full", sep = "\t", na.strings = "")

(table(chr <- sub("^([0-9XYM]+).*$", "\\1", all_assoc$CHR_ID), exclude = NULL))

(pos <- as.numeric(sub("^([0-9XYM]+).*$", "\\1", all_assoc$CHR_POS)))

# Verif
library(dplyr)
data.frame(chr, pos) %>%
  group_by(chr) %>%
  summarise(min(pos), max(pos)) %>%
  arrange(desc(`max(pos)`)) %>%
  print(n = Inf)
@privefl privefl added the wiki page Wiki page = how to do this label Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wiki page Wiki page = how to do this
Projects
None yet
Development

No branches or pull requests

1 participant