如何解决 Circos SVG 错误放置文本的问题?
我有以下 Circos 图,我将其渲染为 SVG 文件,然后转换为 PNG,为了便于说明:
围绕外缘的文本标签的方向正确,从 12 点钟到 9 点钟点钟方向,向外,远离灰色弧线。
在 9 和 12 之间,文本标签向内,与灰色弧线重叠。这是预料之外的。
这是一个特写镜头,用于澄清问题:
如果我从 Circos 输出 PNG,而不是 SVG ,标签绘制正确,但随后我无法在 Adobe Illustrator 或 Inkscape 中标记矢量格式的 SVG 图形。所以我需要 SVG 输出。
以下是与添加标签相关的 circos.conf 文件的片段:
<image>
dir = /tmp
file = circos.png
png = yes
radius = 3000p
background = white
angle_offset = -176
</image>
...
<plots>
<plot>
type = text
color = black
file = factorList.txt
r0 = 1r
r1 = 1r+200p
label_size = 12p
label_font = condensedbold
padding = 0p
rpadding = 0p
label_snuggle = yes
max_snuggle_distance = 1r
snuggle_sampling = 2
snuggle_tolerance = 0.25r
snuggle_link_overlap_test = yes
snuggle_link_overlap_tolerance = 2p
snuggle_refine = yes
</plot>
</plots>
我不确定可以应用哪些其他选项来尝试解决此问题。我的问题是:我应该在这个或另一个配置文件中尝试什么来修复 SVG 输出?谢谢你的建议。
I have the following Circos diagram, which I rendered as an SVG file and then converted to PNG, for the purposes of illustration:
The text labels that circle the outer rim are oriented correctly from 12 o'clock to 9 o'clock, oriented outwards, away from the grey arcs.
Between 9 and 12, the text labels are oriented inwards, overlapping the grey arc. This is not expected.
Here's a close-up, to clarify the issue:
If I output a PNG from Circos, instead of SVG, the labels are drawn correctly, but then I lose the ability to mark up the vector-formatted SVG figure in Adobe Illustrator or Inkscape. So I need the SVG output.
Here's a snippet of the circos.conf
file relevant to the addition of the labels:
<image>
dir = /tmp
file = circos.png
png = yes
radius = 3000p
background = white
angle_offset = -176
</image>
...
<plots>
<plot>
type = text
color = black
file = factorList.txt
r0 = 1r
r1 = 1r+200p
label_size = 12p
label_font = condensedbold
padding = 0p
rpadding = 0p
label_snuggle = yes
max_snuggle_distance = 1r
snuggle_sampling = 2
snuggle_tolerance = 0.25r
snuggle_link_overlap_test = yes
snuggle_link_overlap_tolerance = 2p
snuggle_refine = yes
</plot>
</plots>
I'm not sure what other options I can apply to try to resolve this. My question is: What should I try in this or another configuration file, which fixes the SVG output? Thanks for your advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许你可以尝试这个选项:
我认为上面的布局是由 snuggle 选项引起的,还要检查你的conf文件并确保plot(type=text)的所有“r0”和“r1”都大于1r。
这是 circos 课程示例
Maybe you can try this option:
And I think the layout above caused by the snuggle option ,and also check your conf file and be sure all the "r0" and "r1" of plot(type=text) are bigger than 1r .
Here is the circos lessonss example