-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheffector.Rmd
88 lines (62 loc) · 1.23 KB
/
effector.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
87
88
---
title: "PTR-60-75 effectors"
author: "Paula Moolhuijzen"
date: "Date: `r format(Sys.time(), '%d %B, %Y')`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
libraries loaded
```{r, echo=FALSE, message=FALSE, include=FALSE}
getwd()
setwd(getwd())
print(getwd())
```
## R load libraries
```{r}
library(ggplot2)
library(dplyr)
library(ggrepel)
library(ggpubr)
```
### read in effectors data
```{r}
tbl <- read.table("effector.txt", sep="\t", header = FALSE, stringsAsFactors=TRUE)
#str(tbl)
```
## set headers
```{r}
names(tbl) <-c(V1="Group", V2="Gene", V3="Length", V4="Score")
#head(tbl)
```
## Compare means effector length
```{r}
compare_means(Length ~ Group, data = tbl)
```
## boxplot effector lengths
```{r}
p1 <- ggplot(tbl, aes(x=Group, y=Length, fill=Group)) +
geom_boxplot()
p1
```
## boxplot effector scores
```{r}
p2 <- ggplot(tbl, aes(x=Group, y=Score, fill=Group)) +
geom_boxplot()
p2
```
## Compare means effector scores
```{r}
compare_means(Score ~ Group, data = tbl)
```
## boxplot effector A) length and B) score
```{r}
pdf(file="effector-boxplots.pdf")
ggarrange(p1, p2, labels = c("A", "B"),
ncol = 2, nrow = 1)
dev.off()
```
```{r}
sessionInfo()
```