CIRCOS教程翻译 1.8——label

本文介绍了一个用于基因数据可视化的配置文件实例,详细展示了如何通过配置文件来调整基因名称的显示方式,包括字体、颜色及布局等,并且演示了如何设置不同类型的图表如热力图、直方图等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

label的标签有的时候没有办法完全表现出来,这个主要还是由于空间不够造成的,只看想要的基因还是很不错的,主配置文件:

karyotype = data/karyotype/karyotype.human.txt
chromosomes_units = 1000000

chromosomes_display_default = no
chromosomes                 = /hs[1234]$/

<colors>
chr1* = red
chr2* = orange
chr3* = green
chr4* = blue
</colors>

chromosomes_reverse = /hs[234]/
chromosomes_scale   = hs1=0.5r,/hs[234]/=0.5rn

<plots>

<plot>
type  = text
file  = data/6/genes.labels.txt

r1    = 0.8r #设置label的空间范围,label可以自适应范围来确定显示多少个value值(基因名字)
r0    = 0.6r

label_font = light
label_size = 12p

#padding    = 0p #text在角度位置的边缘距离,建议不设置
#rpadding   = 0p #text在径向位置的边缘距离,建议不设置

show_links     = yes #添加label具体的连线位置
link_dims      = 2p,0p,10p,0p,2p #这个比较复杂,第一个参数是和r0的距离,最后一个参数是label和线的距离,第三个参数是线的长度,二和四比较麻烦,因为涉及到第6章的内容,大概的说一下就是,第二个参数是主干的长度,第四个参数是分支的长度,一般建议设置1、3、5即可
link_thickness = 2p
link_color     = black

<rules>
<<include exclude.hs1.rule>>

<rule> 
condition  = var(value) =~ /a/i #取出value列的基因名字,不区分大小写如果有a字母,那么加粗该基因名字
label_font = bold #svg格式可能看不出来加粗跟细的区别,强烈建议查看的时候用png格式!!!
flow       = continue
</rule>
<rule>
condition  = var(value) =~ /b/i #取出value列的基因名字,不区分大小写如果有b字母,那么该基因名字颜色为蓝色
color      = blue
</rule>
</rules>

</plot>

<plot>
type  = heatmap
file  = data/5/segdup.hs1234.heatmap.txt
r1    = 0.89r
r0    = 0.88r
color = hs1_a5,hs1_a4,hs1_a3,hs1_a2,hs1_a1,hs1
scale_log_base = 5

<rules>
<<include exclude.hs1.rule>>

<rule>
condition = var(id) ne "hs1"
show      = no
</rule>
</rules>

</plot>

<plot>
type  = heatmap
file  = data/5/segdup.hs1234.heatmap.txt
r1    = 0.90r
r0    = 0.89r
color = hs2_a5,hs2_a4,hs2_a3,hs2_a2,hs2_a1,hs2
scale_log_base = 5

<rules>
<<include exclude.hs1.rule>>
<rule>
condition = var(id) ne "hs2"
show      = no
</rule>
</rules>

</plot>

<plot>
type  = heatmap
file  = data/5/segdup.hs1234.heatmap.txt
r1    = 0.91r
r0    = 0.90r
color = hs3_a5,hs3_a4,hs3_a3,hs3_a2,hs3_a1,hs3
scale_log_base = 5

<rules>
<<include exclude.hs1.rule>>
<rule>
condition = var(id) ne "hs3"
show      = no
</rule>
</rules>

</plot>

<plot>
type  = heatmap
file  = data/5/segdup.hs1234.heatmap.txt
r1    = 0.92r
r0    = 0.91r
color = hs4_a5,hs4_a4,hs4_a3,hs4_a2,hs4_a1,hs4
scale_log_base = 5

<rules>
<<include exclude.hs1.rule>>
<rule>
condition = var(id) ne "hs4"
show      = no
</rule>
</rules>

</plot>

<plot>
type = histogram
file = data/5/segdup.hs1234.hist.txt
r1   = 0.88r
r0   = 0.81r

fill_color = vdgrey
extend_bin = no

<rules>
<<include exclude.hs1.rule>>
</rules>

<<include backgrounds.conf>>

</plot>

<plot>
type = histogram
file = data/5/segdup.hs1234.stacked.txt
r1   = 0.99r
r0   = 0.92r
fill_color  = hs1,hs2,hs3,hs4
orientation = in
extend_bin  = no

<rules>
<<include exclude.hs1.rule>>
</rules>

<<include axes.conf>>

</plot>

</plots>

<links>

<link>
file          = data/5/segdup.txt
radius        = 0.6r
bezier_radius = 0r
color         = black_a4
thickness     = 2

<rules>
<rule>
condition     = var(intrachr)
show          = no
</rule>
<rule>
condition     = 1
color         = eval(var(chr2))
flow          = continue
</rule>
<rule>
condition     = from(hs1)
radius1       = 0.99r
</rule>
<rule>
condition     = to(hs1)
radius2       = 0.99r
</rule>

</rules>

</link>

</links>

<<include ideogram.conf>>

<<include ticks.conf>>

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

<<include etc/colors_fonts_patterns.conf>> 

<<include etc/housekeeping.conf>> 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值