-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLDproxy.Rmd
executable file
·46 lines (39 loc) · 1.19 KB
/
LDproxy.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
title: "LDproxy"
author: "Keren Xu"
date: "7/18/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(ggpubr)
theme_set(theme_light())
```
```{r}
library(haploR)
library(tidyverse)
library(data.table)
library(ggplot2)
rs78396808 <- fread("proxy34387_rs78396808.txt")
rs6421315 <- fread("proxy75653_rs6421315.txt")
df_rs78396808 <- rs78396808 %>% select(RS_Number, R2) %>% rename("R2_rs78396808" = "R2")
df_rs6421315 <- rs6421315 %>% select(RS_Number, R2) %>% rename("R2_rs6421315" = "R2")
df_total <- df_rs78396808 %>% filter(RS_Number != ".") %>% inner_join(df_rs6421315, by = "RS_Number")
rs78396808 %>% filter(RS_Number == ".")%>% filter(!is.na(Correlated_Alleles))
rs6421315 %>% filter(RS_Number == ".")%>% filter(!is.na(Correlated_Alleles))
```
```{r, fig.width= 6, fig.height = 5}
df_total %>% ggplot(aes(x = R2_rs78396808, y = R2_rs6421315)) +
geom_point(
color="black",
fill="grey",
shape=21,
alpha=0.5,
size=2
) +
labs(
x = bquote('AMR'~R^2~'with rs78396808'),
y = bquote('EUR'~R^2~'with rs6421315')) +
scale_x_continuous(limits = c(0, 1)) +
scale_y_continuous(limits = c(0,1))
```