-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbdnf trial differential expressiohn.Rmd
62 lines (46 loc) · 1.58 KB
/
bdnf trial differential expressiohn.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
```{r setup}
knitr::opts_chunk$set(echo = TRUE)
library("tidyverse")
library("DESeq2")
library("ggplot2")
library("pacman")
library("readr")
library('data.table')
```
this let's you access the 'create_feature_count_table' function gifted by AL :)
```{r}
source(here::here('create_feature_count_table.R'))
```
this organizes all the data from the many .bam files and creates one data frame you can work with
```{r}
featureCounts <- create_feature_count_table("C:/Users/mlomb/OneDrive/Desktop/MRes project/Differential Expression/data/bdnf_trial_full/bdnf_trial_full")
```
this lets you access the 'make_deseq_dfs.R'
```{r}
source(here::here('make_deseq_dfs.R'))
```
this runs the make_deseq_dfs() function
```{r}
my_df <- make_deseq_dfs(featureCounts, grep_pattern = "", base_grep = "CONTROL", contrast_grep = "BDNF")
```
accessing 'run_standard_deseq.R'
```{r}
source(here::here('run_standard_deseq.R'))
```
running run_standard_deseq
```{r}
my.dds <- run_standard_deseq("C:/Users/mlomb/OneDrive/Desktop/MRes project/Differential Expression/data/bdnf_trial_full/bdnf_trial_full",
base_grep = "CONTROL",
contrast_grep = "BDNF",
grep_pattern = "",
baseName = "control",
contrastName = 'BDNF')
```
accessing volcano plot making function
```{r}
source(here::here('make_volcano_plot.R'))
```
running it to make preeeettttyyyy graph
```{r}
my_plot <- make_volcano_plot(my.dds$results_table)
```