首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >circos 可视化手册-line plot 篇

circos 可视化手册-line plot 篇

作者头像
生信修炼手册
发布2020-05-11 10:43:37
7340
发布2020-05-11 10:43:37
举报
文章被收录于专栏:生信修炼手册生信修炼手册

line plotcircos中的用法比较简单,示例如下:

对于折线图而言,调整外观的属性有以下4个

1. thickness

thickness 控制线条的粗细

2. color

color 控制线条的颜色

3. fill_color

fill_color控制填充色,在折线的下方进行颜色填充

4. max_gap

在直线图中,会看到如下所示的分割线,max_gap的作用就是设置分割线的间距,max_gap = 1u 代表每隔1个单位画一条分割线,其用法和ticks类似

控制位置的属性在前面的文章中我们已经介绍过了,这里在重复一遍。

r0r1分别设置圆环的内径和外径,maxmin设置y轴的最大值和最小值,orientation控制y轴0点的位置,orientation = in代表 y = 0 位于r1上;orientation = out表示y = 0位于r0 上;z代表优先级,数值越大,优先级越高,当两个折线图重叠时,优先级高的会有优先显示。

backgrounds, axes, rules的结合使用,在scatter plot中,我们也介绍过了,今天解锁一种axes的新用法,代码如下

在之前的文章中,我们看到了用y0, y1指定范围,在用spacing参数设定间隔的用法, 这种用法方便的设置多条轴线,今天的这个例子中,通过position直接设置轴线的位置,用于指定单条轴线。

最后放一张line plot的示例,在下图中,除去染色体外,包括3个line plot; 最内圈的line plot有3种填充色,背景色也有3种,另外两圈的line plot中,其axes的定义就是使用了position的用法,可以看到其轴线非常少,只有2,3条;最内圈的line plot的轴线则采用spacing的用法,其轴线非常多,而且均匀分布

完整代码如下

<<include colors_fonts_patterns.conf>>
<<include ideogram.conf>>
<<include ticks.conf>>
<image>
<<include etc/image.conf>>
</image>
karyotype   = data/karyotype/karyotype.human.txt
chromosomes_units = 1000000
chromosomes       = hs1 # ;hs2;hs3
chromosomes_display_default = no
<plots>
type      = line
thickness = 2
<plot>
max_gap = 1u
file    = data/6/snp.density.250kb.txt
color   = vdgrey
min     = 0
max     = 0.015
r0      = 0.5r
r1      = 0.8r
fill_color = vdgrey_a3
<backgrounds>
<background>
color     = vvlgreen
y0        = 0.006
</background>
<background>
color     = vvlred
y1        = 0.002
</background>
</backgrounds>
<axes>
<axis>
color     = lgrey_a2
thickness = 1
spacing   = 0.025r
</axis>
</axes>
<rules>
<rule>
condition    = var(value) > 0.006
color        = dgreen
fill_color   = dgreen_a1
</rule>
<rule>
condition    = var(value) < 0.002
color        = dred
fill_color   = dred_a1
</rule>
</rules>
</plot>
# outside the circle, oriented out
<plot>
max_gap = 1u
file    = data/6/snp.density.txt
color   = black
min     = 0
max     = 0.015
r0      = 1.075r
r1      = 1.15r
thickness = 1
fill_color = black_a4
<axes>
<axis>
color     = lgreen
thickness = 2
position  = 0.006
</axis>
<axis>
color     = lred
thickness = 2
position  = 0.002
</axis>
</axes>
</plot>
<plot>
z       = 5
max_gap = 1u
file    = data/6/snp.density.1mb.txt
color   = red
fill_color = red_a4
min     = 0
max     = 0.015
r0      = 1.075r
r1      = 1.15r
</plot>
# same plot, but inside the circle, oriented in
<plot>
max_gap = 1u
file    = data/6/snp.density.txt
color   = black
fill_color = black_a4
min     = 0
max     = 0.015
r0      = 0.85r
r1      = 0.95r
thickness   = 1
orientation = in
<axes>
<axis>
color     = lgreen
thickness = 2
position  = 0.01
</axis>
<axis>
color     = vlgreen
thickness = 2
position  = 0.008
</axis>
</axes>
<axis>
color     = vlgreen
thickness = 2
position  = 0.006
</axis>
<axis>
color     = red
thickness = 2
position  = 0.002
</axis>
</axes>
</plot>
<plot>
z       = 5
max_gap = 1u
file    = data/6/snp.density.1mb.txt
color   = red
fill_color = red_a4
min     = 0
max     = 0.015
r0      = 0.85r
r1      = 0.95r
orientation = in
</plot>
</plots>
<<include etc/housekeeping.conf>>
本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2018-04-28,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 生信修炼手册 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1. thickness
  • 2. color
  • 3. fill_color
  • 4. max_gap
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档