本文学习参考:
生信媛:https://mp.weixin.qq.com/s/qXDlKf7ut8QF2c5_0hiKpA
http://circos.ca/
circos 用于基因组圈图。
circos是用perl写的程序,依赖一些perl模块。安装主要是GD等模块的安装。
circos常用参数:
circos -conf circos.conf #运行软件
常用参数:
-version
-modules 检测是否将所需的perl模块都安装上
-outputdir 设置输出文件的路径
-outputfile 设置输出文件名的前缀
使用circos画出基因组圈图,(实例数据为水稻);需要准备的文件:
1.是karyotype.txt
第一列:通常为chr,是对染色体的描述;
第二列:通常为-;
第三列:是染色体的ID;
第四列:染色体的标签,该值可以直接展示到圈图上;
第五列:起始位置;
第六列:结束位置;
第七列:染色体或者band的颜色。
chr - Chr1 1 0 43270922 chr1
chr - Chr2 2 0 35937249 chr2
chr - Chr3 3 0 36413818 chr3
chr - Chr4 4 0 35502693 chr4
chr - Chr5 5 0 29958433 chr5
chr - Chr6 6 0 31248786 chr6
chr - Chr7 7 0 29697620 chr7
chr - Chr8 8 0 28443021 chr8
chr - Chr9 9 0 23012719 chr9
chr - Chr10 10 0 23207286 chr10
chr - Chr11 11 0 29021105 chr11
chr - Chr12 12 0 27531855 chr12
2.主配置文件(circos.conf)
<<include etc/colors_fonts_patterns.conf>>
<image>
<<include etc/image.conf>>
</image> #以上部分不需要修改的标准参数
karyotype = karyotype.txt
chromosomes_units = 1000000 #设置长度单位,一下设置表示为1M长度的序列代表为1u。
chromosomes_display_default = yes #默认是将所有的染色体都展示出来。
<ideogram>
<spacing> #设置圈图中染色体之间的空隙大小,以下设置为每个空隙大小为周长的0.5%
default = 0.005r
</spacing>
radius = 0.80r #设定ideograms的位置,即在离圆心80%处
thickness = 6p #设定ideograms的厚度
fill = yes #设定dideograms是否填充颜色,颜色由karyotype最后一列决定
fill_color = deepskyblue
stroke_color = black #设定ideograms轮廓的颜色及其厚度
stroke_thickness = 1p
show_label = yes #设定是否显示label,对应的是karyotype文件的第四列
label_font = light
label_radius = 1r + 110p #当显示标签的时候必须要有的参数,用来设定label的位置
label_size = 30
label_parallel = yes #设定label的字体方向,yes是易于浏览的方向
</ideogram>
show_ticks = yes #是否显示标记,染色体刻度
show_tick_labels = yes
<ticks>
skip_first_label = no
skip_last_label = no
radius = dims(ideogram,radius_outer)
color = black #设定标签颜色
thickness = 2p
size = 30p
multiplier = 1e-6
format = %.2f #label值的格式化方法;%f结果为浮点数,这个是表示结果为小数点后保留2位
#以下设定了2个ticks,前者为小刻度,后者是大刻度。
<tick>
spacing = 2u #设定每个刻度代表的长度,其单位有u,即1u = chromosomes_units = 1000000.
size = 10p #设置tick的长度
show_label = no
thickness = 3p
</tick>
<tick> #此处设置的是大刻度
spacing = 10u
size = 20p
show_label = yes
label_size = 25p
label_offset = 10p #设置ticks' label离ticks的距离
format = %.2f
</tick>
</ticks>
###########以上即可显示基因组的基本信息#########################
#####highlights还可以加上一些基因组的注释信息等#######
<highlights>
z = 0
<highlight>
file = gene.gff3 #文件信息包括染色体位置,起始位置,终止位置
r0 = 0.90r #r0和r1代表这个图形的起始和终止分别距离圆心的距离
r1 = 0.99r
fill_color = blue #即外圈注释为蓝色
</highlight>
<highlight>
file = transposon.gff3
r0 = 0.81r
r1 = 0.90r
fill_color = red
</highlight>
</highlights>
###################以下用于绘制图形#############
<plots> ###此行一定要添加否则不能显示直方图等
<plot>
type = histogram
thickness = 1p
file = gc.histogram.txt ##该文件有四列,例子:Chr1 0 199999 0.4585
r1 = 0.57r #设置直方图的位置,r1要比r0大,默认方向向外
r0 = 0.48r
fill_color = red
orientation=out
<backgrounds> #设定直方图的背景颜色
<background>
color=vvlgrey
</background>
</backgrounds>
</plot>
</plots>
<<include etc/housekeeping.conf>>
结果如下

网友评论