-
Notifications
You must be signed in to change notification settings - Fork 0
/
Visual.R
26 lines (20 loc) · 810 Bytes
/
Visual.R
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
#getwd()
#setwd('/Users/user/Documents/OUCRU/Graph_Genome')
#--------------------------------- INSTALL AND CALL PACKAGES ---------------------------#
library(ggplot2)
library(tidyr)
library(devtools)
#--------------------------------- INSTALL AND CALL PACKAGES ---------------------------#
report1=read.csv('test.csv',sep='\t',header=F)
colnames(report1)=c("gene","read_count","length","coverage")
#report1$acc_no =
t=separate(data = report1, col = gene, into = c("left", "right"), sep = "_")
t=as.data.frame(table(t$left))
colnames(t) = c("Gene","No_of_detected_prot")
t$tot_prot = c(11,11)
t$pct_detect=round(t$No_of_detected_prot/t$tot_prot*100,2)
t
write.csv(table(t$left),file = "t.csv")
install.packages("rmarkdown", type = "source")
library(rmarkdown)
rmarkdown::render('Report.Rmd', clean=TRUE)