转录组

Circos简易安装与使用

2021-03-25  本文已影响0人  17号小行星

Circos是使用Perl写的程序,主要通过输入配置文件来作图。

conda install circos
circos -modules
image.png
若安装有问题请移步:https://www.dazhuanlan.com/2020/02/10/5e40c06de4f85/
circos -man  #q退出
chr - Cerasus_campanulata Cerasus_campanulata 1 434334 chr1
chr - Eriobotrya_japonica Eriobotrya_japonica 1 434980 chr2
chr - Fragaria_orientalis Fragaria_orientalis 1 275143 chr3
chr - Malus_domestica Malus_domestica 1 396947 chr4
chr - Malus_domestica_cultivar_Yantai_fuji_8 Malus_domestica_cultivar_Yantai_fuji_8 1 396947 chr5
chr - Malus_hupehensis_var.mengshanensis    Malus_hupehensis_var.mengshanensis 1 422555 chr6
chr - Malus_x_domestica_cultivar_Golden_delicious Malus_x_domestica_cultivar_Golden_delicious 1 396947 chr7
chr - Prunus_avium Prunus_avium 1 444567 chr8
chr - Pyrus_betulifolia Pyrus_betulifolia 1 469928 chr9
chr - Rosa_chinensis Rosa_chinensis 1 313448 chr10
chr - Rosa_sp.JP-2020 Rosa_sp.JP-2020 1 303484 chr11
chr - Sorbus_aucuparia Sorbus_aucuparia 1 384977 chr12
chr - Sorbus_torminalis Sorbus_torminalis 1 386758 chr13

第四列是最终图中染色体的名字,第五列是染色体的起始位置,第六列是终止位置,最后一列是对应染色体的颜色(circos配置好的)
links.txt

Cerasus_campanulata 361313  361366  Eriobotrya_japonica 165335  165388
Cerasus_campanulata 361679  371694  Eriobotrya_japonica 125924  138060
Cerasus_campanulata 372750  378588  Eriobotrya_japonica 381870  388067
Cerasus_campanulata 382877  383111  Eriobotrya_japonica 389595  389824
Cerasus_campanulata 383295  388281  Eriobotrya_japonica 42226   47124
Cerasus_campanulata 388922  389054  Eriobotrya_japonica 27833   27957
Cerasus_campanulata 389399  391598  Eriobotrya_japonica 104435  106674
Cerasus_campanulata 399111  399770  Eriobotrya_japonica 328684  329261
Cerasus_campanulata 401795  401855  Eriobotrya_japonica 116778  116838
Cerasus_campanulata 402607  403615  Eriobotrya_japonica 367945  368916
Cerasus_campanulata 403769  407869  Eriobotrya_japonica 282620  286544
Cerasus_campanulata 407904  408066  Eriobotrya_japonica 289586  289730
Cerasus_campanulata 408195  408444  Eriobotrya_japonica 294047  294301
Cerasus_campanulata 408662  409100  Eriobotrya_japonica 356944  357381
Cerasus_campanulata 409209  411330  Eriobotrya_japonica 239141  241361
Cerasus_campanulata 412248  416430  Eriobotrya_japonica 304340  308555
Cerasus_campanulata 424008  424801  Eriobotrya_japonica 242674  243457
Cerasus_campanulata 426379  426826  Eriobotrya_japonica 87515   87992
<ideogram>

show = yes

<spacing>

default = 5u

# The " " are required because
# the trailing /> is interpreted as a block end. 
# Otherwise, you can also use a space 
# <pairwise /hs/ /hs/ >

<pairwise "/hs/ /hs/">
spacing = 0.001r
</pairwise>

</spacing>

thickness         = 30p

#stroke_thickness = 0
#stroke_color     = dgrey

fill           = yes
fill_color     = black

radius         = 0.80r
show_label     = yes
label_font     = default
label_radius   = dims(ideogram,radius_outer) + 250p
label_size     = 24p
label_parallel = yes

show_bands            = yes
fill_bands            = yes
band_stroke_thickness = 0
band_stroke_color     = black
band_transparency     = 4

</ideogram>

links.conf

<links>
#################################################
<link>
 
# 指定link文件路径,其数据格式为:
# chr1 start1 end1 chr2 start2 end2
file = data/karyotype/links.txt
 
# 设置links曲线的半径
radius = 0.31r
 
# 设置贝塞尔曲线半径,该值越大越扁平,不好看
bezier_radius = 0r
 
# 设置link曲线的颜色
color = blue_a4

# 设置link曲线的厚度
thickness = 2

<rules>
<rule>
condition = var(chr1) eq "ath1"
color=rdylgn-5-div-1
</rule>
<rule>
condition = var(chr1) eq "ath2"
color=rdylgn-5-div-2
</rule>
<rule>
condition = var(chr1) eq "ath3"
color=rdylgn-5-div-3
</rule>
<rule>
condition = var(chr1) eq "ath4"
color=rdylgn-5-div-4
</rule>
<rule>
condition = var(chr1) eq "ath5"
color=rdylgn-5-div-5
</rule>
</rules>
 
</link>
</links>

总配置文件 circos.conf

karyotype = data/karyotype/mitogenome.txt

chromosomes_units = 1000

chromosomes_display_default = yes

<<include ideogram.conf>>
<<include links.conf>>

<links>
<link>
ribbon = yes
file   = data/karyotype/links.txt

radius        = 0.999r
bezier_radius = 0r

color            = green
stroke_color     = green
stroke_thickness = 2
</link>
</links>

<image>
<<include etc/image.conf>>

file* = vars.png
</image>

<<include etc/colors_fonts_patterns.conf>>
<<include etc/housekeeping.conf>>
cd /home/tanwei/anaconda3/pkgs/circos-0.69.8-0/etc
circos -conf circos.conf
上一篇 下一篇

猜你喜欢

热点阅读