Created
August 14, 2017 19:18
-
-
Save aaronwolen/7166011e8704b8f5ba355753cecb1517 to your computer and use it in GitHub Desktop.
Joining GWAS data tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alspac <- alspac %>% | |
mutate(allele_key = if_else( | |
A1 < A2, | |
paste0(A1, A2), | |
paste0(A2, A1) | |
)) | |
s4s <- s4s %>% | |
mutate(allele_key = if_else( | |
alleleA < alleleB, | |
paste0(alleleA, alleleB), | |
paste0(alleleB, alleleA) | |
)) | |
s4s.only <- | |
anti_join(s4s, | |
alspac, | |
by = c( | |
chromosome = "chr", | |
position = "position", | |
allele_key = "allele_key" | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment