-
Notifications
You must be signed in to change notification settings - Fork 0
/
formatFunctionalPrediction.rmd
60 lines (37 loc) · 1.05 KB
/
formatFunctionalPrediction.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
---
title: ""
output:
html_document: default
pdf_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Libraries
```{r libraries,message = FALSE, warnings = FALSE,}
library(pheatmap)
library(dplyr)
library(stringr)
library(purrr)
library(DESeq2)
library(ggplot2)
library(ggrepel)
library(biomaRt)
library(writexl)
library(VennDiagram)
```
## Import column data
```{r coldata}
data <- read.table("function.prediction.tsv", sep='\t', quote="\"", header=FALSE, fill = FALSE)
colnames(data) <- c("gene", "md5", "sequence_length", "analysis", "signature_accession", "signature_description", "start_location", "stop_location", "score", "status", "date", "InterPro_accession", "InterPro_description")
data %>% head
```
```{r split_to_list}
group_names <- data %>% group_by(analysis) %>% group_keys() %>% pull(1)
group_list <- data %>% group_by(analysis) %>% group_split() %>% set_names(group_names)
write_xlsx(group_list, path = "function.prediction.xlsx")
```
## Session Info
```{r, sessionInfo}
sessionInfo()
```