-
Notifications
You must be signed in to change notification settings - Fork 2
/
aging-biomarkers.Rmd
66 lines (49 loc) · 1.68 KB
/
aging-biomarkers.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
---
title: "Aging Biomarkers"
author: "Petr Simecek"
output: html_document
---
```{r read-chunk, include=FALSE, cache=FALSE}
knitr::read_chunk("chunks.R")
```
```{r knitr-opts-chunk, include=FALSE}
```
**Last updated:** `r Sys.Date()`
**Code version:** `r workflowr::extract_commit(".", 1)$sha1`
## Cdkn2a
```{r}
kidney = new.env()
heart = new.env()
load("../../kidney2/R/DO188b_kidney_noprobs.RData", env=kidney)
load("../../heart2/DO189_heart_v2_noprobs.RData", env=heart)
suppressPackageStartupMessages(library(ggplot2))
suppressPackageStartupMessages(library(ggsci))
theme_set(theme_bw())
pval.output <- function(p) {
if (p<0.001)
return("< 0.001")
else
paste("=",round(p,3))
}
# for some reasons, heart SN are characters
heart$annot.samples$Sample.Number <- as.numeric(heart$annot.samples$Sample.Number)
sn <- intersect(kidney$pca1$Sample.Number, heart$pca1$Sample.Number)
kidney$idx <- match(sn, kidney$pca1$Sample.Number)
heart$idx <- match(sn, heart$pca1$Sample.Number)
sel.gene <- "Cdkn2a"
sel.kidney <- which(kidney$annot.mrna$symbol == "Cdkn2a")
sel.heart <- which(heart$annot.mrna$symbol == "Cdkn2a")
sel.mrna <- cbind(kidney$annot.samples[kidney$idx, ],
Kidney = kidney$expr.mrna[kidney$idx, sel.kidney],
Heart = heart$expr.mrna[heart$idx, sel.heart])
sel.mrna$Age <- factor(mrna$Age, levels = c(6,12,18))
ggplot(sel.mrna, aes(x = Kidney, y = Heart, color = Age, shape=Sex, group=Age)) +
geom_point() +
geom_smooth(method="lm", se=FALSE, size=0.2) +
labs(title = "Protein Expression") +
scale_color_uchicago() + labs(title="Cdkn2a")
```
## Session information
<!-- Insert the session information into the document -->
```{r session-info}
```