circos 可視化手冊(cè)-scatter plot 篇

plots這個(gè)block 中府蛇,支持許多的圖表類型判帮,scatter plot是最常用的一種轨奄。用法如下:

關(guān)于file文件的內(nèi)容净宵,在之前的文章中已經(jīng)詳細(xì)介紹過(guò)敲才。r0r1定義圓環(huán)的位置,maxmin定義y軸的最小值和最大值择葡,剩余的幾個(gè)參數(shù)控制散點(diǎn)的外觀紧武。

glyph表示點(diǎn)的形狀,circle代表圓形敏储,triangle代表三角形阻星,rectangle代表矩形;glyph_size控制點(diǎn)的大幸烟怼妥箕;fill_color控制點(diǎn)的填充色,stroke_color控制邊框的顏色更舞。

關(guān)于scatter plot, 在軟件的安裝目錄下畦幢,有對(duì)應(yīng)的默認(rèn)配置

etc/tracks/scatter.conf

oritenation表示方向,in表示從r0到r1, out表示從r1到r0

plot中疏哗,可以插入backgrounds, axes, rules3種block

1. backgrounds

用法如下:

backgrounds 定義背景色呛讲,每個(gè)定義一個(gè)區(qū)域的背景色禾怠,這個(gè)區(qū)域由y0y1定義返奉。

plot中贝搁, maxmin分別定義了y軸的最大值和最小值,這里的y0y1對(duì)應(yīng)的就是y軸的值芽偏;y0代表起始位置雷逆,y1代表終止位置;如果只指定了y0y1中的一個(gè)污尉,需要參考鄰近區(qū)域和max,min的值作出判斷

在上圖的第一個(gè)background中膀哲,只指定了y0 = 0.006,從其他結(jié)果background的設(shè)置可以推測(cè)出,此時(shí)的y1 = max;

上面的例子中被碗,根據(jù)y軸的值劃分了3個(gè)區(qū)域某宪,定義了3種不同 的背景色

  1. min到0.002,背景色為vvlred

  2. 0.002到0.006锐朴,背景色為vlgrey

  3. 0.006到max, 背景色為vvlgreen

2. axes

用法如下:

axes定義y軸的刻度線兴喂,由多個(gè)axis構(gòu)成。和backgrounds 一樣焚志,根據(jù)y0y1定義區(qū)域衣迷,spacing定義刻度線的間隔。

刻度線的外觀由thicknesscolor兩個(gè)參數(shù)控制酱酬,thickness 控制線條的粗細(xì)程度壶谒,color控制線條的顏色。

3. rules

用法如下:

rules代表規(guī)則膳沽,由多個(gè)rule構(gòu)成汗菜;在每個(gè)rule中,conditioon設(shè)置規(guī)則挑社,var(value) > 0.006 表示 y軸的值大于0.006呵俏,當(dāng)滿足這個(gè)條件時(shí),執(zhí)行rule中的其他語(yǔ)句滔灶,下面的示例中普碎,調(diào)整了value > 0.006的點(diǎn)的外觀。

最后看一個(gè)實(shí)例

這張圖中录平,除了染色體的圓環(huán)外麻车,還有3圈圓環(huán),每一個(gè)圓環(huán)都是一張scatter plot, 而且都設(shè)置了背景色和刻度線斗这。

結(jié)合整幅圖的結(jié)構(gòu)和散點(diǎn)圖的用法动猬,理解下面的配置文件就非常簡(jiǎn)單了

<<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

################################################################
# 
# define 3 scatter plots, using the same data file
#

<plots>

# all are scatter plots

type ? ? ? ? ? ? = scatter
stroke_thickness = 1

# first plot shows all points and selectively formats points at small/large
# y-axis values to be red/green and triangles/rectangles

<plot>

file ? ? ? ? ? ? = data/6/snp.density.txt
fill_color ? ? ? = grey
stroke_color ? ? = black
glyph ? ? ? ? ? ?= circle
glyph_size ? ? ? = 10

max ? = 0.013
min ? = 0
r1 ? ?= 0.95r
r0 ? ?= 0.65r

# optional y0/y1 values (absolute or relative) in <background> blocks
# define the start/end limits of background color
#
# y0 = 0.006
# y0 = 0.75r

<backgrounds>
<background>
color ? ? = vvlgreen
y0 ? ? ? ?= 0.006
</background>
<background>
color ? ? = vlgrey
y1 ? ? ? ?= 0.006
y0 ? ? ? ?= 0.002
</background>
<background>
color ? ? = vvlred
y1 ? ? ? ?= 0.002
</background>
</backgrounds>

<axes>
<axis>
color ? ? = lgreen
thickness = 1
spacing ? = 0.05r
y0 ? ? ? ?= 0.006
</axis>
<axis>
color ? ? = dgreen
thickness = 2
spacing ? = 0.1r
y0 ? ? ? ?= 0.006
</axis>

<axis>
color ? ? = lgrey
thickness = 1
spacing ? = 0.05r
y1 ? ? ? ?= 0.006
y0 ? ? ? ?= 0.002
</axis>
<axis>
color ? ? = dgrey
thickness = 2
spacing ? = 0.1r
y1 ? ? ? ?= 0.006
y0 ? ? ? ?= 0.002
</axis>

<axis>
color ? ? = lred
thickness = 1
spacing ? = 0.05r
y1 ? ? ? ?= 0.002
</axis>

<axis>
color ? ? = dred
thickness = 2
spacing ? = 0.1r
y1 ? ? ? ?= 0.002
</axis>

</axes>

<rules>

<rule>
condition ? ?= var(value) > 0.006
stroke_color = dgreen
fill_color ? = green
glyph ? ? ? ?= rectangle
glyph_size ? = 8
</rule>

<rule>
condition ? ?= var(value) < 0.002
stroke_color = dred
fill_color ? = red
glyph ? ? ? ?= triangle
</rule>

</rules>

</plot>

# the second plot is a crop of the first plot, placed outside
# the ideogram circle, showing only points with large y-values

<plot>

file ? ? ? ? ? ? = data/6/snp.density.txt
fill_color ? ? ? = green
stroke_color ? ? = dgreen
glyph ? ? ? ? ? ?= rectangle
glyph_size ? ? ? = 8

max ? = 0.013
min ? = 0.007
r1 ? ?= 1.175r
r0 ? ?= 1.075r

<backgrounds>
# you can stack backgrounds by using transparent color
<background>
color ? ? = vlgreen_a4
y0 ? ? ? ?= 0.75r
</background>
<background>
color ? ? = vlgreen_a4
y0 ? ? ? ?= 0.5r
</background>
<background>
color ? ? = vlgreen_a4
y0 ? ? ? ?= 0.25r
</background>
<background>
color ? ? = vlgreen_a4
</background>
</backgrounds>

<axes>
<axis>
color ? ? = green_a3
thickness = 2
spacing ? = 0.1r
</axis>
</axes>

<rules>

<rule>
condition ? ?= var(value) < 0.007
show ? ? ? ? = no
</rule>

</rules>

</plot>

# the third plot is a crop of the first plot, placed closer to the
# center of the circle, showing only points with small y-values

<plot>

file ? ? ? ? ? ? = data/6/snp.density.txt
fill_color ? ? ? = red
stroke_color ? ? = dred
glyph ? ? ? ? ? ?= rectangle
glyph_size ? ? ? = 8

max ? = 0.0015
min ? = 0.000
r1 ? ?= 0.60r
r0 ? ?= 0.35r

<backgrounds>
<background>
color ? ? = vlred_a4
y1 ? ? ? ?= 0.25r
</background>
<background>
color ? ? = vlred_a4
y1 ? ? ? ?= 0.5r
</background>
<background>
color ? ? = vlred_a4
y1 ? ? ? ?= 0.75r
</background>
<background>
color ? ? = vlred_a4
</background>
</backgrounds>

<axes>
<axis>
color ? ? = red_a5
thickness = 1
spacing ? = 0.025r
</axis>
<axis>
color ? ? = red_a3
thickness = 2
spacing ? = 0.1r
</axis>
</axes>

<rules>
<rule>
condition ? ?= var(value) > 0.002
show ? ? ? ? = no
</rule>
</rules>

</plot>

</plots>

<<include etc/housekeeping.conf>>
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市表箭,隨后出現(xiàn)的幾起案子赁咙,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 217,542評(píng)論 6 504
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件彼水,死亡現(xiàn)場(chǎng)離奇詭異崔拥,居然都是意外死亡,警方通過(guò)查閱死者的電腦和手機(jī)凤覆,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,822評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門链瓦,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái),“玉大人盯桦,你說(shuō)我怎么就攤上這事慈俯。” “怎么了拥峦?”我有些...
    開(kāi)封第一講書人閱讀 163,912評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵贴膘,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我略号,道長(zhǎng)刑峡,這世上最難降的妖魔是什么? 我笑而不...
    開(kāi)封第一講書人閱讀 58,449評(píng)論 1 293
  • 正文 為了忘掉前任璃哟,我火速辦了婚禮氛琢,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘随闪。我一直安慰自己阳似,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,500評(píng)論 6 392
  • 文/花漫 我一把揭開(kāi)白布铐伴。 她就那樣靜靜地躺著撮奏,像睡著了一般。 火紅的嫁衣襯著肌膚如雪当宴。 梳的紋絲不亂的頭發(fā)上畜吊,一...
    開(kāi)封第一講書人閱讀 51,370評(píng)論 1 302
  • 那天,我揣著相機(jī)與錄音户矢,去河邊找鬼玲献。 笑死,一個(gè)胖子當(dāng)著我的面吹牛梯浪,可吹牛的內(nèi)容都是我干的捌年。 我是一名探鬼主播,決...
    沈念sama閱讀 40,193評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼挂洛,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼礼预!你這毒婦竟也來(lái)了?” 一聲冷哼從身側(cè)響起虏劲,我...
    開(kāi)封第一講書人閱讀 39,074評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤托酸,失蹤者是張志新(化名)和其女友劉穎褒颈,沒(méi)想到半個(gè)月后,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體励堡,經(jīng)...
    沈念sama閱讀 45,505評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡谷丸,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,722評(píng)論 3 335
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了念秧。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片淤井。...
    茶點(diǎn)故事閱讀 39,841評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡布疼,死狀恐怖摊趾,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情游两,我是刑警寧澤砾层,帶...
    沈念sama閱讀 35,569評(píng)論 5 345
  • 正文 年R本政府宣布,位于F島的核電站贱案,受9級(jí)特大地震影響肛炮,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜宝踪,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,168評(píng)論 3 328
  • 文/蒙蒙 一侨糟、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧瘩燥,春花似錦秕重、人聲如沸。這莊子的主人今日做“春日...
    開(kāi)封第一講書人閱讀 31,783評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至服鹅,卻和暖如春凳兵,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背企软。 一陣腳步聲響...
    開(kāi)封第一講書人閱讀 32,918評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工庐扫, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人仗哨。 一個(gè)月前我還...
    沈念sama閱讀 47,962評(píng)論 2 370
  • 正文 我出身青樓形庭,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親藻治。 傳聞我的和親對(duì)象是個(gè)殘疾皇子碘勉,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,781評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容