Custom text for each ideogram label?

189 views
Skip to first unread message

Azam Mohsin

unread,
Oct 11, 2020, 11:02:35 PM10/11/20
to Circos
Is there way to change text for each ideogram label?

I tried to use the label_format parameter change to id1 to 'Name1' and id2 to 'Name2' like this:

label_format = eval( replace(var(chr),"id1","Name1");   replace(var(chr),"id2","Name2");)

But this only changes it for id2 and not id1. How can I have replace statements in the eval for label_format?  or is there any other way to specify the text for each ideogram label?

Thanks

sol.do...@gmail.com

unread,
Oct 12, 2020, 3:16:28 AM10/12/20
to Circos
Hi Azam, 

I am not sure if I understood your question correctly, but normally you define the labels in the 4th column of the karyotype file:
chr - ID LABEL START END COLOR 

So in your case you can write something like this:
chr - id1 Name1 0 1000 black


Hope it helps,
Marisol

Azam Mohsin

unread,
Oct 12, 2020, 3:28:24 AM10/12/20
to Circos

Hi Marisol,

Thanks for your response. The issue is that my original labels have  many white spaces and dashes. When I tried to use these labels in the karyotype file and then in the links.txt file, I would always get an error because of the dashes. I renamed all my labels to id1, id2, id3, id4, ... etc. But on the plot, I want  replace id1, id2, ... with  the original label names.

Thanks,

Azam

Dirk Krienbühl

unread,
Jan 25, 2022, 2:22:12 PM1/25/22
to Circos
Hi Azam,

have you solved that ideogram labelling problem yet?

Unfortunately I came across the same issue as you have (... and additionally I want to be also able to have emojis in the label) at the moment I solved it using a name with and incrementing number.

Many thanks in advance for your reply.

:-) Dirk

Dirk Krienbühl

unread,
Feb 4, 2022, 7:24:33 PM2/4/22
to Circos
FYI, I solved it by editing the generated SVG file after circos has generated it, using as dictionary with the original labels and the new labels,  a small python script will read the SVG line by line and replace the original labels with the new ones found in the dictionary, now I can use any character I want even emoji's :-)
Reply all
Reply to author
Forward
0 new messages