-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.r
25 lines (17 loc) · 933 Bytes
/
example.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
library(ggplot2)
dfa<-read.table("unikseq-r_CEMA.fa-i_shark.fa-o_teleost.fa-k25-uniqueKmers.tsv", sep="\t", header = TRUE)
my_x_title <- expression(paste("Position of 25-mers on ", italic("C. maximus"), " Mt genome"))
# Stacked
ggplot(dfa, aes(fill=condition, y=value, x=position)) +
geom_col() + labs(x=my_x_title) + ylab("Proportion of species with 25-mers") + coord_flip()
======
PLOT ON A LOG10 SCALE
library(ggplot2)
library(ggallin)
library(scales)
dfa<-read.table("unikseq-r_CEMA.fa-i_shark.fa-o_teleost.fa-k25-uniqueKmers.tsv", sep="\t", header = TRUE)
my_x_title <- expression(paste("Position of 25-mers on ", italic("C. maximus"), " Mt genome"))
# Stacked
ggplot(dfa, aes(fill=condition, y=value*1000, x=position)) +
scale_y_continuous(trans = pseudolog10_trans,breaks=c(-1000,-100,-10,-1,0,1,10,100,1000)) +
geom_col() + labs(x=my_x_title) + ylab("Proportion (x10) of species with 25-mers") + coord_flip()