line plot
在circos
中的用法比較簡單弯屈,示例如下:
對于折線圖而言,調(diào)整外觀的屬性有以下4個(gè)
1. thickness
thickness
控制線條的粗細(xì)
2. color
color
控制線條的顏色
3. fill_color
fill_color
控制填充色,在折線的下方進(jìn)行顏色填充
4. max_gap
在直線圖中,會看到如下所示的分割線召嘶,max_gap
的作用就是設(shè)置分割線的間距瞒滴,max_gap = 1u
代表每隔1個(gè)單位畫一條分割線曲梗,其用法和ticks
類似
控制位置的屬性在前面的文章中我們已經(jīng)介紹過了,這里在重復(fù)一遍妓忍。
r0
和r1
分別設(shè)置圓環(huán)的內(nèi)徑和外徑虏两,max
和min
設(shè)置y軸的最大值和最小值,orientation
控制y軸0點(diǎn)的位置世剖,orientation = in
代表 y = 0
位于r1上定罢;orientation = out
表示y = 0
位于r0 上;z
代表優(yōu)先級旁瘫,數(shù)值越大祖凫,優(yōu)先級越高,當(dāng)兩個(gè)折線圖重疊時(shí)酬凳,優(yōu)先級高的會有優(yōu)先顯示蝙场。
與backgrounds
, axes
, rules
的結(jié)合使用,在scatter plot
中粱年,我們也介紹過了售滤,今天解鎖一種axes
的新用法,代碼如下
在之前的文章中,我們看到了用y0
, y1
指定范圍完箩,在用spacing
參數(shù)設(shè)定間隔的用法, 這種用法方便的設(shè)置多條軸線赐俗,今天的這個(gè)例子中,通過position
直接設(shè)置軸線的位置弊知,用于指定單條軸線阻逮。
最后放一張line plot
的示例,在下圖中秩彤,除去染色體外叔扼,包括3個(gè)line plot
; 最內(nèi)圈的line plot
有3種填充色,背景色也有3種漫雷,另外兩圈的line plot
中瓜富,其axes
的定義就是使用了position
的用法,可以看到其軸線非常少降盹,只有2,3條与柑;最內(nèi)圈的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>>