分享

CIRCOS圈图绘制 - 染色体信息展示和调整

 生物_医药_科研 2019-01-02

CIRCOS圈图绘制 - 最简单绘图和解释介绍了CIRCOS的安装、基本的配置文件的解释、如何最简单的获得一个CIRCOS图。最主要的部分还是配置文件的位置信息和各个参数的含义解释。


本篇则处理染色体层面展示时用到的配置参数,若有困惑的请先参考上一篇。如果两篇都没有讲明白,请留言。

展示染色体染色条带数据

把前面的配置文件再拓展一些,给染色体加上名字,并且按照染色深浅上色。

karyotype变量指定了绘制CIRCOS图所必须的一个文件 (文件的内容虽然通常是染色体的信息,但不局限于染色体信息,其它的区域信息、时间序列信息都可以使用)

文件内容如下 (#后面是注释,会被忽略)

前两列是固定的,chr -chr表示定义一条染色体;-表示指定这个区域的父区域,染色体没有父区域,用-代替。

ID是当前区域的名字,其子区域的父区域列都使用这个名字。如果同时绘制多个物种,可在ID中包含物种的代号。

LABEL是当前区域显示的名字。

START END是当前区域的范围,必须是整个的区域。如果想显示部分区域,可在后续配置中修改。

COLOR是当前区域的颜色,CIRCOS为每个染色体有定义好的颜色,存储于etc/colors.conf。除了预先定义了染色体的颜色,还定义了一些颜色变量可以直接使用。

#chr - ID LABEL START END COLORchr - hs1 1 0 248956422 chr1chr - hs2 2 0 242193529 chr2chr - hs3 3 0 198295559 chr3chr - hs4 4 0 190214555 chr4chr - hs5 5 0 181538259 chr5chr - hs6 6 0 170805979 chr6chr - hs7 7 0 159345973 chr7chr - hs8 8 0 145138636 chr8chr - hs9 9 0 138394717 chr9

如果有cytogenetic band信息,则写到文件末尾。band是固定的,DOMAIN指定从属信息,对应于上面染色体的ID信息。其它列与上面解释相同。

#band DOAMIN ID LABEL START END COLORband hs1 p36.33 p36.33 0 2300000 gnegband hs1 p36.32 p36.32 2300000 5400000 gpos25band hs1 p36.31 p36.31 5400000 7200000 gnegband hs1 p36.23 p36.23 7200000 9200000 gpos25band hs1 p36.22 p36.22 9200000 12700000 gnegband hs1 p36.21 p36.21 12700000 16200000 gpos50

# karyotype定义染色体的名字、ID、起始位置信息,是绘制图的根本karyotype = data/karyotype/karyotype.human.txt# 必须的部分,控制染色体信息显示# http:///documentation/tutorials/reference/ideogram/# 定义显示的染色体之间的间距,为图形半径的0.5% (r代表radius,半径)default = 0.005r# 染色体区域的绘制位置,默认所有染色体都处于远离圆心同样距离的位置# 这里设置的是图形半径的0.9倍的位置# 也可以设置绝对像素值radius    = 0.9r# 染色体区域的宽度,可以是相对图形半径,也可以说绝对像素值thickness = 20p# 染色体区域填充颜色fill      = yes# 染色体边的颜色和宽度stroke_thickness = 2stroke_color = black# 显示染色体标签名字# 更多label的调整见 # http:///documentation/tutorials/ideograms/labels/lessonshow_label = yeslabel_font = default# ideogram外圈再加总半径的0.05label_radius = dims(ideogram,radius_outer) + 0.005r# 如果想把label标记在圈里可以写,外圈半径+内圈半径除以2# label_rdius = (dims(ideogram,radius_outer)+dims(ideogram,radius_inner))/2label_size = 24# label与圈平行label_parallel   = yeslabel_case = upper# 显示karyotype中定义的细胞遗传学条带# fill_bands=yes 表示使用预先定义的颜色show_bands            = yesfill_bands            = yesband_transparency     = 4################################################################# The remaining content is standard and required. It is imported # from default files in the Circos distribution.## These should be present in every Circos configuration file and# overridden as required. To see the content of these files, # look in etc/ in the Circos distribution.# 这些都是引用文件,暂时不去管什么意思,后面用到再逐个解释。# 但是绘图时这些必须引用。下面会解释下最关键的引用位置。# Included from Circos distribution.>file* = circos_label_band.png# RGB/HSV color definitions, color lists, location of fonts, fill patterns.# Included from Circos distribution.># Debugging, I/O an dother system parameters# Included from Circos distribution.>

展示染色体刻度信息

显示染色体刻度信息,chromosome_units定义染色体一个单位的大小,缩写为u。若chromosome_units=1000000, 则10u=10000000

# karyotype定义染色体的名字、ID、起始位置信息,是绘制图的根本karyotype = data/karyotype/karyotype.human.txt# 必须的部分,控制染色体信息显示# 更多解释见# http:///documentation/tutorials/reference/ideogram/# 定义显示的染色体之间的间距,为图形半径的0.5% (r代表radius,半径)default = 0.005r# 染色体区域的绘制位置,默认所有染色体都处于远离圆心同样距离的位置# 这里设置的是图形半径的0.9倍的位置# 也可以设置绝对像素值radius    = 0.9r# 染色体区域的宽度,可以是相对图形半径,也可以说绝对像素值thickness = 20p# 染色体区域填充颜色fill      = yes# 染色体边的颜色和宽度stroke_thickness = 2stroke_color = black# 显示染色体标签名字# 更多label的调整见 # http:///documentation/tutorials/ideograms/labels/lessonshow_label = yeslabel_font = default# ideogram外圈再加总半径的0.05label_radius = dims(ideogram,radius_outer) + 0.05r# 如果想把label标记在圈里可以写,外圈半径+内圈半径除以2# label_rdius = (dims(ideogram,radius_outer)+dims(ideogram,radius_inner))/2label_size = 24# label与圈平行label_parallel   = yeslabel_case = upper# 显示karyotype中定义的细胞遗传学条带# fill_bands=yes 表示使用预先定义的颜色show_bands            = yesfill_bands            = yesband_transparency     = 4chromosomes_units           = 1000000show_ticks          = yesshow_tick_labels    = yes# ticks块定义了全局水平的tick的属性# 更多解释见http:///documentation/tutorials/ticks_and_labels/basics/# ticks出现的位置radius           = dims(ideogram,radius_outer)# The label multiplier is the constant used to multiply the tick value to obtain the tick label. For example,  if the multiplier is 1e-6,  then the tick mark at position 10, 000, 000 will have a label of 10. The multiplier is applied to the raw tick value,  regardless of the value of chromosomes_unit. # multiplier是用于获得ticks label的,当前ticks对应的染色体位置乘以multiplier就得到ticks label# 这个值的设置与chromosomes_units是没有任何关系的# 比如当前位置是10,000,000, 乘以multiplier (1e-6)就是10multiplier       = 1e-6# ticks颜色、粗细、大小color            = blackthickness        = 2psize             = 15p# 默认所有染色体都显示, 放置在ticks块中全局有效chromosomes_display_default=yes# 不在任何染色体显示, 放置在tick块中单个tick有效# 单词拼错无效#chromosomes_display_default=no# 每个tick定义一种间隔,20u, 5u, 还可增加3u,4u等, 大的刻度会覆盖小的刻度# 20u的间隔,定义大的ticks,并显示ticks_label# spacing定义多大间距一个tickspacing        = 20ushow_label     = yeslabel_size     = 20p# label的偏移量label_offset   = 10p# %d, %.nfformat         = %d# 5u的间隔,定义小的ticksspacing        = 5ucolor          = greysize           = 10p# 定义在哪些染色体显示ticks,哪些区域不显示chromosomes=-hs1;-hs2:0-100;-hs3:100-)# 30u的间隔,定义中等的tickschromosomes_display_default=nospacing        = 30ucolor          = redsize           = 15pchromosomes=hs1################################################################# The remaining content is standard and required. It is imported # from default files in the Circos distribution.## These should be present in every Circos configuration file and# overridden as required. To see the content of these files, # look in etc/ in the Circos distribution.# 这些都是引用文件,暂时不去管什么意思,后面用到再逐个解释。# 但是绘图时这些必须引用。下面会解释下最关键的引用位置。# Included from Circos distribution.>file* = circos_label_band_tick.png# RGB/HSV color definitions, color lists, location of fonts, fill patterns.# Included from Circos distribution.># Debugging, I/O an dother system parameters# Included from Circos distribution.>

调整染色体位置、大小

在CIRCOS中chromosome表示karyotype文件中定义的染色体的序列结构信息。ideogramchromosome信息的展示方式。一个染色体可以不展示,也有可能分成多段展示,可以选择图的位置,设置每个染色体的位置、相对大小。

# karyotype定义染色体的名字、ID、起始位置信息,是绘制图的根本karyotype = data/karyotype/karyotype.human.txt# 必须的部分,控制染色体信息显示# 更多解释见# http:///documentation/tutorials/reference/ideogram/# 定义显示的染色体之间的间距,为图形半径的0.5% (r代表radius,半径)default = 0.005r# 染色体区域的绘制位置,默认所有染色体都处于远离圆心同样距离的位置# 这里设置的是图形半径的0.9倍的位置# 也可以设置绝对像素值radius    = 0.9r# 改变染色体在circos环中内半径大小# 染色体区域的宽度,可以是相对图形半径,也可以说绝对像素值thickness = 20p# 染色体区域填充颜色fill      = yes# 染色体边的颜色和宽度stroke_thickness = 2stroke_color = black# 显示染色体标签名字# 更多label的调整见 # http:///documentation/tutorials/ideograms/labels/lessonshow_label = yeslabel_font = default# ideogram外圈再加总半径的0.05label_radius = dims(ideogram,radius_outer) + 0.05r# 如果想把label标记在圈里可以写,外圈半径+内圈半径除以2# label_rdius = (dims(ideogram,radius_outer)+dims(ideogram,radius_inner))/2label_size = 24# label与圈平行label_parallel   = yeslabel_case = upper# 显示karyotype中定义的细胞遗传学条带# fill_bands=yes 表示使用预先定义的颜色show_bands            = yesfill_bands            = yesband_transparency     = 4# 染色体大小调整chromosomes_scale   = hs1=0.1r;hs14=0.06r;hs6=0.06r# 个别染色体位置调整chromosomes_radius  = hs14:0.8r;hs6:0.8r;hs1:0.7rchromosomes_units           = 1000000show_ticks          = yesshow_tick_labels    = yes# ticks块定义了全局水平的tick的属性# 更多解释见http:///documentation/tutorials/ticks_and_labels/basics/# ticks出现的位置radius           = dims(ideogram,radius_outer)# The label multiplier is the constant used to multiply the tick value to obtain the tick label. For example,  if the multiplier is 1e-6,  then the tick mark at position 10, 000, 000 will have a label of 10. The multiplier is applied to the raw tick value,  regardless of the value of chromosomes_unit. # multiplier是用于获得ticks label的,当前ticks对应的染色体位置乘以multiplier就得到ticks label# 这个值的设置与chromosomes_units是没有任何关系的# 比如当前位置是10,000,000, 乘以multiplier (1e-6)就是10multiplier       = 1e-6# ticks颜色、粗细、大小color            = blackthickness        = 2psize             = 15p# 默认所有染色体都显示, 放置在ticks块中有效chromosomes_display_default=yes# 不在任何染色体显示, 放置在ticks块中有效#chromosomes_display_default=no# 每个tick定义一种间隔,20u, 5u, 还可增加3u,4u等, 大的刻度会覆盖小的刻度# 20u的间隔,定义大的ticks,并显示ticks_label# spacing定义多大间距一个tickspacing        = 20ushow_label     = yeslabel_size     = 20p# label的偏移量label_offset   = 10p# %d, %.nfformat         = %dchromosomes=-hs1;-hs14;-hs6# 5u的间隔,定义小的ticksspacing        = 5ucolor          = greysize           = 10p# 定义在哪些染色体显示ticks,哪些区域不显示chromosomes=-hs1;-hs14;-hs6;-hs2:0-100;-hs3:100-)# 30u的间隔,定义中等的tickschromosomes_display_default=nospacing        = 30ucolor          = redsize           = 15pchromosomes=hs1################################################################# The remaining content is standard and required. It is imported # from default files in the Circos distribution.## These should be present in every Circos configuration file and# overridden as required. To see the content of these files, # look in etc/ in the Circos distribution.# 这些都是引用文件,暂时不去管什么意思,后面用到再逐个解释。# 但是绘图时这些必须引用。下面会解释下最关键的引用位置。# Included from Circos distribution.>file* = circos_label_band_tick_chromove.png#画图起始的位置,相对于三点钟方向angle_offset* = 74# RGB/HSV color definitions, color lists, location of fonts, fill patterns.# Included from Circos distribution.># Debugging, I/O an dother system parameters# Included from Circos distribution.>

CIRCOS错误信息

  1. Dimension [$DIMS->{‘ideogram’}{‘default’}{' radius_outer'}] is not defined in expression [dims(ideogram, default,  radius_outer) + 0.05r]

    • radius_outer前面多了个空格

  2. CONFIGURATION FILE ERROR; Circos could not find the configuration file [simple.confy]]

    • 配置文件不存在,或名字、路径写错了

  3. Config::General: Block ““ has no EndBlock statement (level: 2, chunk 4191)!

    • 区块标签不成对

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多