Histogram data overlaping problem

92 views
Skip to first unread message

Samarth Kulshrestha

unread,
May 15, 2015, 4:20:07 AM5/15/15
to circos-data-...@googlegroups.com
Dear Martin

I have one problem regarding histogram plot. My data is in 4 coloumn format. 4th column has maximum value=19 and minimum value= -16.
I want a histogram plot with:
<rules>
<rule>
condition  = var(value) < 0
show       = yes
fill_color = dred
orientation = in
</rule>

<rule>
condition  = var(value) > 0
show       = yes
fill_color = dgreen
orientation = out
</rule>

Even after applying these rules circos plot shows some overlap regions(attached image "chr13: few red bars are in outside orientation). All i want to plot is a histogram with value < 0 in green (outside orientation) and value > 0 red (inside orientation) without any overlap.


Thanks
histogram.png

Martin Krzywinski

unread,
May 16, 2015, 9:08:48 PM5/16/15
to circos-data-...@googlegroups.com
The orientation parameter applies to a plot not an individual data point.

You do not need to switch the orientation for data points -- negative and positive values will automatically be drawn in opposite direction from the baseline.

If you want negative values to point "out" then set

<plot>
...
orientation = in
fill_color = red
...

and use rules just to color the bins that are < 0. 

<rules>
<rule>
condition = var(value) < 0
fill_color = green
</rule>
<rule>
</rules>



Martin Krzywinski
science + art


--
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.
For more options, visit https://groups.google.com/d/optout.

Samarth Kulshrestha

unread,
May 18, 2015, 8:23:35 AM5/18/15
to circos-data-...@googlegroups.com
Thanks for your valuable suggestions Martin in the previous post.
But i have another set of problem.

hsY    359001    2918000    -10
hsY    2918001    6109000    -10
hsY    7443001    9173001    -9
hsY    10084001    13132000    -15
hsY    14703001    22216001    -12
hsY    17784001    20608000    1
hsY    22514001    28755001    -12
hsY    28784001    58984000    3
hsY    28815001    56522000    -14

hsY    57251001    58280000    -14

Suppose i have data-set mentioned above with overlapped bins(in bold). When i run circos i get an image with histogram bars(attached: chrY), but in presence of overlapping bins, understanding of circos visualization is a bit difficult. Here Red bars support negative value events and grey bars support  positive value events.

Histogram script:
<plots>
<plot>
type      = histogram
file      = try1
r1   = 0.88r
r0   = 0.65r
orientation = in
fill_color = vdgrey

max       = 19
min       = -16
stroke_type = outline
thickness   = 0.01
extend_bin  = no


<rules>
<rule>
condition  = var(value) < 0
fill_color= vvdred
</rule>
</rules>


Problem:
Data visualization is a bit confusing as red bars captures positive value area below the base line. So any suggestion for this kind of problem?

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