我有下表:
fst = fread("beng_wbm_92x_win2000.window")
colnames(fst) = c("Chr", "Pos", "Fst")
> fst
chr Pos fst
1: 0 2500 0.531040
2: 0 3500 0.818037
3: 0 5500 0.829916
4: 0 6500 0.505682
5: 0 7500 0.639140
---
43565: 99 3006500 0.759512
43566: 993 14500 0.693944
43567: 993 15500 0.523174
43568: 993 16500 0.586963
43569: 993 17500 0.858804
我正在尝试使用以下方法制作热图:
mine.heatmap <- ggplot(fst, mapping = aes(x = Pos, y = Chr, fill = Fst)) +
geom_tile() +
xlab(label = "Pos") +
ylab(label = "Scaffold") +
coord_cartesian(ylim=c(-0, 1140))
ggsave(filename = "FST_TajimaD.png", mine.heatmap , width = 5, height = 4, dpi = 300, units = "in", device='png')
但是它将使用蓝色标度绘制数据,其中Fst值越低,亮度越高。