Re: [circos] Is it possible to plot the directional triangles using Circos?

212 views
Skip to first unread message

Martin Krzywinski

unread,
Mar 27, 2013, 8:22:25 PM3/27/13
to circos-data-...@googlegroups.com

Yes. I've attached an example.

This uses the scatter plot track, in which the glyph (triangle) is rotated based on the value of the point. You can thus make the triangle point back or forward.

Circos 0.64-pre1 adds more intuitive support for this. The parameter is now called "glyph_rotation", previously and less intuitively called "angle_shift". 

# Adjust the rotation and color of each glyph, based on its value.
# By default, the triangle glyph points outward. 
# -90 deg - points counter-clockwise
#  90 deg - points clockwise
<rules>
<rule>
condition      = var(value) == -1
glyph_rotation = -90
color          = red
</rule>
<rule>
condition      = var(value) == 1
glyph_rotation = 90
color          = blue
</rule>
</rules>

The data for this look like this, with regions that point back given a value of -1 and those that point forward +1. 

hs6 41759694 41810776 -1
hs6 41996942 42008760 -1
hs6 42126228 42156621 1
hs6 42820212 42821862 1
hs6 80873082 81112709 -1

In this example, the triangle size is constant and placed in the middle of the region. 

There's no support yet to stretch the triangle along the angular direction to match the size of the region.



Martin Krzywinski
science + art



On Thu, Mar 21, 2013 at 10:41 PM, Qiongyi Zhao <qyzha...@gmail.com> wrote:
Hi,

I just wonder if it is possible to plot the triangle that is directional like the attached "file1.png".  Directional triangles here represent either the forward strand RNA or the reverse strand RNA. I can only plot the triangle like attached "file2.png" (orientation: in or out), but couldn't find any instruction to show how to plot directional triangles like "file1.png". Hope you can help me.  Thanks very much.

#### Below is the codes for this plot
### tRNA
<plot>
type       = scatter
file       = tRNA.txt
glyph      = triangle
glyph_size = 24p
r1   = 0.90r
r0   = 0.88r
fill_color = black
thickness = 0p
extend_bin = no
</plot>


Best regards,

Qiongyi



--
You received this message because you are subscribed to the Google Groups "Circos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visual...@googlegroups.com.
To post to this group, send email to circos-data-...@googlegroups.com.
Visit this group at http://groups.google.com/group/circos-data-visualization?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

circos.png
directed.regions.tgz

Qiongyi Zhao

unread,
Mar 28, 2013, 3:12:41 AM3/28/13
to circos-data-...@googlegroups.com
Great! I can make it now. Thank you very much for your kind help. 

Cheers,

Qiongyi
To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visualization+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages