File: align.r

package info (click to toggle)
r-cran-ggseqlogo 0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 908 kB
  • sloc: makefile: 2
file content (34 lines) | stat: -rw-r--r-- 1,452 bytes parent folder | download
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
# 
# pd = data.frame(
#   letters = strsplit("AGTGACCGACTATCATAGTGACCCAGAATCATAGTGACCGAGTATGAT", "")[[1]],
#   species = rep(c("Human", "Armadillo", "Porcupine"), each=16),
#   x       = rep(1:16, 3),
#   change  = c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
#               0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,
#               0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0),
#   score1  = c(0,0,0,0,0,0,1,1,2,2,2,3,3,3,4,3,
#               0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,
#               0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
#   score2  = c(0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,
#               0,0,0,0,2,2,2,2,0,0,0,0,0,0,0,0,
#               0,0,0,0,3,3,3,3,0,0,0,0,0,0,0,0)
# )
# 
# pd = subset(pd, x <= 15)
# 
# 
# 
# p = ggplot(pd[pd$score1 != 0,], aes(x=x, y=species)) +
#   coord_fixed(ratio = 1.2, ylim=c(0.5, 3.5)) +
#   #geom_tile(aes(fill=score1)) +
#   #scale_fill_gradient2("Score 1", limits=c(0,4),low="#762A83", mid="white", high="#1B7837", guide=guide_colorbar(title.position="top")) +
#   geom_text(data=pd, aes(label=letters, color=factor(change)), size=rel(5), family="mono") + theme_logo()#+
#   #scale_color_manual("Change", values=c("black", "#F2A11F"), labels=c("None", "Some"), guide=guide_legend(direction="vertical", title.position="top", override.aes=list(shape = "A")))
# 
# print(p)
# 
# ll = z + guides(fill='none')
# zz =  p + scale_x_continuous(breaks=1:15) + theme(legend.position="none")
# p3 = plot_grid(ll, zz, align = 'v', nrow = 2)
# 
# print(p3)