
本文由阿童木根據(jù)實(shí)踐經(jīng)驗(yàn)而整理,希望對(duì)大家有幫助。
原創(chuàng)微文,歡迎轉(zhuǎn)發(fā)轉(zhuǎn)載。 導(dǎo)讀
Circos是一個(gè)由加拿大科學(xué)家Martin KrzywinskiPerl利用perl語(yǔ)言開(kāi)發(fā)的用于描述關(guān)系型數(shù)據(jù)和可視化多維度的數(shù)據(jù)軟件。Circos憑借輸入簡(jiǎn)單,不需要太多的數(shù)據(jù)處理技巧就能調(diào)整到要求的輸入格式,輸出美觀(guān)、快捷等特點(diǎn)在比較基因組學(xué)和基因組繪圖中非常受歡迎。下面用自己敲出來(lái)的小數(shù)據(jù)展示Circos基本繪圖方法。需要用Linux系統(tǒng)哦。 軟件:Circos >官網(wǎng):http:/// >下載:http:///software/download/ >文獻(xiàn):Circos: An information aesthetic for comparative genomics. GenomeResearch 2009 >引用:近5000 >下載安裝后,查看依賴(lài)perl模塊: circos -modules # 全部OK就能用circos畫(huà)圖了。
ok 1.36 Carp ok 0.38 Clone ok 2.63 Config::General ok 3.56 Cwd ok 2.173 Data::Dumper ok 2.55 Digest::MD5 ok 2.85 File::Basename ok 3.56 File::Spec::Functions ok 0.2304 File::Temp ok 1.51 FindBin ok 0.39 Font::TTF::Font ok 2.71 GD ok 0.2 GD::Polyline ok 2.45 Getopt::Long ok 1.16 IO::File ok 0.428 List::MoreUtils ok 1.41 List::Util ok 0.01 Math::Bezier ok 1.9997 Math::BigFloat ok 0.07 Math::Round ok 0.08 Math::VecStat ok 1.03 Memoize ok 1.53_01 POSIX ok 1.29 Params::Validate ok 1.64 Pod::Usage ok 2.05 Readonly ok 2017060201 Regexp::Common ok 2.84 SVG ok 1.19 Set::IntSpan ok 1.6611 Statistics::Basic ok 2.53_01 Storable ok 1.20 Sys::Hostname ok 2.03 Text::Balanced ok 0.61 Text::Format ok 1.9726 Time::HiRes
第一圈:染色體 >底料:file.karyotype #chr bar contig rank start end col chr - one 1 1 10 purple chr - two 2 1 10 purple chr - three 3 1 10 purple # 可以根據(jù)最后一列的信息給染色體上色 >模具:circos.conf <<include etc/colors_fonts_patterns.conf>> # 導(dǎo)入配置文件:顏色 <<include etc/housekeeping.conf>> ## 導(dǎo)入管家參數(shù) <image> <<include etc/image.conf>> </image>
karyotype = file.karyotype # 指定文件:染色體 chromosomes_units = 100000 # 指定距離單位u chromosomes_display_default = yes # 顯示所有的染色體(no的話(huà)需要自己指定)
# 1. 第一圈:染色體
<ideogram>
<spacing> default = 0.005r # 設(shè)置圈圖中染色體之間的空隙大小,我們?cè)O(shè)置為0.005r的意思是每個(gè)染色體之間的空
</spacing>
radius = 1r # 初始圈半徑 thickness = 40p # 圈厚度 fill = yes # 圈顏色,使用指定顏色 stroke_color = 160,32,240 #染色體外邊框輪廓顏色,十進(jìn)制RGB stroke_thickness=2p #輪廓厚度 </ideogram>
>塑型:circos mkdir Figure circos-0.69-9/bin/circos -conf circos.conf --outputdir Figure -outputfile 1
>成品:染色體 
第二圈:高亮 >新材料:file.highlight # chr start end label one 1 5 nothing two 1 5 nothing three 1 5 nothing >模具:【追加到】circos.conf # 2. 第二圈:高亮
<highlights> z = 0 <highlight> file = file.highlight # 高亮 fill_color = 0,0,0 # RGB指定高亮顏色 r0 = 0.90r # 內(nèi)徑 r1 = 0.95r # 外徑 </highlight> </highlights> >塑型:circos circos-0.69-9/bin/circos -conf circos.conf --outputdir Figure -outputfile 2 >成品:染色體+高亮 
第三圈:散點(diǎn) >新材料:file.scatter # chr start end label one 1 5 nothing two 1 5 nothing three 1 5 nothing >模具:【追加】<plots>其中的<plot>【到】circos.conf
<plots> thickness = 1p # 3. 第三圈:形狀色塊
<plot> show = yes type = scatter # 類(lèi)型:scatter/line/histogram/heatmap
file = file.scatter # 指定文件 r0 = 0.80r r1 = 0.85r max = 1.0 min = 0.0
glyph = triangle # 散點(diǎn)形狀:circle/triangle/rectangle glyph_size = 60 # 散點(diǎn)大小 fill_color = 0,0,255 # 填充色:紅色 stroke_color = 0,0,255 # 邊框色:紅色 stroke_thickness = 1 </plot> </plots> >塑型:circos
circos-0.69-9/bin/circos -conf circos.conf --outputdir Figure -outputfile 3
>成品:染色體+高亮+散點(diǎn) 
第四圈:柱狀圖 >新材料A:file.histogram.in # chr start end size one 4 5 1 one 3 4 0.5 one 2 3 0.1 two 4 5 1 two 3 4 0.5 two 2 3 0.1 three 4 5 1 three 3 4 0.5 three 2 3 0.1 >新材料B:file.histogram.out # chr start end size one 1 2 1 one 2 3 0.5 one 3 4 0.1 two 1 2 1 two 2 3 0.5 two 3 4 0.1 three 1 2 1 three 2 3 0.5 three 3 4 0.1
>模具:【追加】新的<plot>【到】circos.conf中的<plots> <plot> type = histogram
z = 2 max_gap = 0u file = file.histogram.out # 柱狀圖 color = red # 上色 fill_color = 255,0,0 r0 = 0.70r r1 = 0.75r orientation = out # 方向:朝外 </plot>
<plot> type = histogram
z = 2 max_gap = 0u file = file.histogram.in # 柱狀圖 color = blue # 上色 fill_color = 0,0,255 r0 = 0.65r r1 = 0.70r orientation = in # 方向:朝圓心 </plot>
>塑型:circos circos-0.69-9/bin/circos -conf circos.conf --outputdir Figure -outputfile 4
>成品:染色體+高亮+散點(diǎn)+柱形圖 
結(jié)束語(yǔ): >利用以上方法,可對(duì)宏基因組Bin的數(shù)據(jù)進(jìn)行Circos繪圖,能得到下面的結(jié)果: 
感謝閱讀~
你可能還喜歡
1 技術(shù)貼 | 16S專(zhuān)題 | 簡(jiǎn)單介紹如何用自己的筆記本處理高通量16S數(shù)據(jù) 2 技術(shù)貼 | 宏基因組專(zhuān)題 | 組裝工具盤(pán)點(diǎn)和比較
3 技術(shù)貼 | R語(yǔ)言菌群Alpha多樣性分析和繪圖
4 技術(shù)貼 | 宏轉(zhuǎn)錄組專(zhuān)題 | DDBJ數(shù)據(jù)庫(kù):宏轉(zhuǎn)錄組測(cè)序數(shù)據(jù)下載 5 技術(shù)貼 | R語(yǔ)言pheatmap聚類(lèi)分析和熱圖
|