上个教程中已经修改了进化树的分支颜色和标签颜色,接下来进行热图绘制
# 数据准备
我们可以从 help 界面查看我们需要输入的数据类型
#heatmap
!title Example of heatmap 图例标题
!showLegends 1 是否显示图例,1:显示,0:不显示
!defaultStrokeColor gold
!defaultStrokeWidth 2
!colorgradient blue, yellow,red 热图配色
!colorgradientMarkLabel 0,5,10,15,20,25 颜色梯度值
# -- heatmap column labels --
!showHeatMapColumnLabel 1 热图表头显示
!heatmapColumnLabels e1,e2,e3,control 表头内容
# -- heatmap --
!heatmap margin=2,colwidth=30,roundedcorner=2 热图内部信息
# -- show data value
!showdataValue show=1,fontsize=12
A -2,3,5,0
B 7,9,10,23
C 13,15,19,8
D 20,22,25,4
根据示例数据将我们的数据修改好
#heatmap
!title Expression of heatmap
!showLegends 0
#!defaultStrokeColor gold
#!defaultStrokeWidth 2
!colorgradient red,white,blue
!showHeatMapColumnLabel 1
# -- heatmap column labels --
!showHeatMapColumnLabel 1
!heatmapColumnLabels HS1,HS2,HS3,HS4
# -- heatmap --
!heatmap margin=1,colwidth=30,roundedcorner=5
# -- show data value
!showdataValue show=0,fontsize=12,fontitalic=0,fontbold=1,textangle=-60,fontcolor=red
AT1G03160.1 138.2662,119.4188,117.5653,131.9267
AT4G17540.1 190.04398,130.73198,140.72378,150.41085
Os06t0247800-01 22.3589,20.9118,19.7673,25.1028
Os02t0738900-01 93.544,21.6591,18.8547,31.3205
Os03t0732200-01 5.52722,4.83038,4.29929,3.81299
Os10t0185200-00 83.1737,83.2791,71.5573,69.86103
AT1G59610.1 40.8104,19.7877,21.998,34.7177
AT1G10290.1 140.8104,119.7877,121.998,134.7177
Os08t0425100-01 20.41115,39.6234,47.14298,63.02084
Os12t0178700-01 48.51467,52.1542,52.7949,62.7378
AT3G19720.1 124.4894,129.6265,127.352,132.6961
Os01t0748000-00 103.341,352.318,236.861,293.542
Os04t0129900-01 1.89585,8.67967,6.65843,2.84205
Os03t0260000-01 131.2451,61.22141,49.86475,97.78848
AT1G60500.1 29.84108,119.9479,125.1772,140.0944
Os01t0920400-01 152.695,113.472,74.9321,61.9664
AT2G14120.3 118.5393,229.62,230.3712,223.395
AT4G33650.2 15.4361,255.7039,138.4035,133.0883
Os04t0381000-01 1.81532,2.71541,4.09116,7.76133
Os05t0556100-01 322.122,217.55541,18.8402,15.2791
Os01t0681100-01 229.41612,249.59223,245.90516,125.5316
AT3G61760.1 232.8752,251.1922,136.812,117.087
AT5G42080.1 7.60426,3.105,8.66416,6.68762
Os09t0572900-01 27.5529,94.32025,40.786299,40.476955
AT1G14830.1 233.5316,235.4096,155.9334,164.4508
Os03t0713100-01 5.59436,3.86999,5.44011,4.85916
Os10t0567800-01 213.2103,218.9935,290.9288,225.216
AT2G44590.3 29.6786,52.4297,272.53,278.289
成品图:
可以看到三个 dataset 已经在右边显示了,可以选择是否显示或者删除,也可以点笔的形状进行修改
# 结果导出
在上方有三个按钮,可以保存为 png 格式、pdf 格式以及 nwk 格式
左侧也有一个按钮,可以保存为多种格式
将 png 格式保存到本地,可以看看效果
fine!!!