Hi.. How to label different tracks ???

195 views
Skip to first unread message

Samarth Kulshrestha

unread,
Dec 29, 2014, 7:54:08 AM12/29/14
to circos-data-...@googlegroups.com
Hi,

I am new to Circos and this group as well. I have generated an image using some toy data (attached image) and want to label those 3 tracks with some text.

Labelling for example:: for first track i want SAMPLE1, for second track SAMPLE2 etc. How to label different tracks in this fashion??


Any help would be appreciated.
Thanks in advance.
multiple_tracks.png

David Cook

unread,
Jan 2, 2015, 11:05:35 AM1/2/15
to circos-data-...@googlegroups.com
Hi Samarth,

There are two options I commonly see:

1. Use illustrator to pull out a wedge that can be labelled (see attached image)

2. Use the <pairwise> function to increase the space between two specific ideograms (see the tutorial here: http://circos.ca/documentation/tutorials/ideograms/spacing_breaks/lesson). This can make room for full labels or numbers that you can define in a figure key. You can add the numbers to the plot using Illustrator or whatever image editing software you prefer.

Hope this helps,

David Cook

Samarth Kulshrestha

unread,
Jan 12, 2015, 5:26:02 AM1/12/15
to circos-data-...@googlegroups.com
Thank You David for informative suggestions.

Martin Krzywinski

unread,
Jan 13, 2015, 8:27:50 PM1/13/15
to circos-data-...@googlegroups.com
The two options by David are good suggestions. Circos doesn't have a dedicated track label function, at the moment.

However, you can create labels using text plots.

I've attached an example where I do this for three plots, which are histogram plots. 

The labeling is done using a single data point which includes parameters. All labels are at hs1:0 position and the "dummy" value is replaced by the value of the parameter for each track.

hs1 0 0 dummy t1=ABC,t2=DEF,t3=GHI

Each label needs its own plot track, so that it has the right radial position. In this example, each label track defines a parameter tidx that defines which track the label applies to. Using the value of this parameter, the radial position and actual label text are determined.

This isn't an ideal solution because the label is not wrapped around the circle -- it is linearly oriented text. However, for short labels, this approximation is fine.

<plot>
tidx = t1
# label.conf uses value of tidx -- this is the only variable
# that is changing, so that we can reuse the configuration
<<include label.conf>>
</plot>

<plot>
tidx = t2
<<include label.conf>>
</plot>

<plot>
tidx = t3
<<include label.conf>>
</plot>


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.

circos.png
track_label.tgz

Samarth Kulshrestha

unread,
Jan 15, 2015, 7:31:34 AM1/15/15
to circos-data-...@googlegroups.com

Thanks a lot Martin for your valuable suggestion. I ran the alternative approach and got expected output (attachment).
Multiple_track_labelling.png

Martin Krzywinski

unread,
Jan 15, 2015, 2:36:18 PM1/15/15
to circos-data-...@googlegroups.com
Looks good. You don't need to increase the spacing between chr1 and chrY in this case.


Martin Krzywinski
science + art


--

May Mah

unread,
Mar 6, 2015, 3:40:27 PM3/6/15
to circos-data-...@googlegroups.com
Hello,
I am trying to do the track labels for my presentation. This method seems to have a maximum allowed character length of around 10 letters. and the text is tangential instead of radial. Has anyone managed to find a way around it it?

Thanks,
Maya


On Thursday, 15 January 2015 20:36:18 UTC+1, Martin wrote:
Looks good. You don't need to increase the spacing between chr1 and chrY in this case.


Martin Krzywinski
science + art


On Thu, Jan 15, 2015 at 4:31 AM, Samarth Kulshrestha <sama...@gmail.com> wrote:

Thanks a lot Martin for your valuable suggestion. I ran the alternative approach and got expected output (attachment).

On Monday, 29 December 2014 18:24:08 UTC+5:30, Samarth Kulshrestha wrote:
Hi,

I am new to Circos and this group as well. I have generated an image using some toy data (attached image) and want to label those 3 tracks with some text.

Labelling for example:: for first track i want SAMPLE1, for second track SAMPLE2 etc. How to label different tracks in this fashion??


Any help would be appreciated.
Thanks in advance.

--
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-visualization+unsub...@googlegroups.com.

Martin Krzywinski

unread,
Mar 9, 2015, 9:01:27 PM3/9/15
to circos-data-...@googlegroups.com
Yes, the text is drawn radially along a straight baseline. 

I haven't implemented text layout on a path yet.


Martin Krzywinski
science + art


To unsubscribe from this group and stop receiving emails from it, send an email to circos-data-visual...@googlegroups.com.

Gyan Prakash Mishra

unread,
Jun 12, 2015, 7:21:18 PM6/12/15
to circos-data-...@googlegroups.com


Hi Martin,

I tried to run configuartion file from your uploaded "track_label.tgz" and got this error


debuggroup summary 0.14s welcome to circos v0.66 7 Apr 2014
debuggroup summary 0.14s loading configuration from file circos.conf
debuggroup summary 0.14s found conf file circos.conf

  *** CIRCOS ERROR ***

  CONFIGURATION FILE ERROR

  You attempted to reference a configuration parameter using conf(.,tidx), but
  no parameter was found at the configuration file position .,tidx

  
 

 
Reply all
Reply to author
Forward
0 new messages