-
Notifications
You must be signed in to change notification settings - Fork 0
/
sharp-match-exposome-proteome.Rmd
86 lines (67 loc) · 1.3 KB
/
sharp-match-exposome-proteome.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
title: "SHARP data"
author: "ks"
date: "5/10/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
```
## Exposome
```{r load-data}
load("data/exposome.RData")
ls()
```
```{r data-sizes}
dim(codebook)
dim(covariates)
dim(phenotype)
dim(exposome)
```
```{r covar}
names(covariates)
```
```{r phenotype}
names(phenotype)
```
```{r outcome}
hist(phenotype$hs_zbmi_who)
```
```{r proteome}
load("data/proteome.Rdata")
dim(proteome)
```
Find subset of individuals with both proteome ane exposome.
```{r common-ids}
isctids <- intersect(covariates$ID,sampleNames(proteome))
length(isctids)
```
Filter data to those with proteomic variables.
```{r filter-data}
covars <- covariates %>%
filter(is.element(ID,isctids))
phenos <- phenotype %>%
filter(is.element(ID,isctids))
expsms <- exposome %>%
filter(is.element(ID,isctids))
```
Check order of proteome samples, and match column
order to that in covariate files.
```{r order-proteome-measures}
identical(covars$ID,sampleNames(proteome))
prtm <- exprs(proteome)
prtm <- prtm[,as.character(covars$ID)]
identical(as.character(covars$ID),
colnames(prtm))
```
```{r cleanup}
rm(proteome)
rm(covariates)
rm(exposome)
rm(phenotype)
rm(isctids)
```
```{r sI}
sessionInfo()
```