Hi guys,
I have three genomes, different isolates of the same fungal species, which chromosomes/contigs are indicated in the circos.sequences.txt as seq1 -> seq47 (so I would need 47 different colors and thus, I am using the Luminance-corrected chromosome palettes (lum70chr* from circos colors.ucsc.config file).
I used Sibelia to create syntony block to be visualized with Circos but I want to adjust something in the picture.
First of all, I would like to color the links starting from the same chromosomes/contigs with the same color, as Chiara asked years ago.
I followed Martin's suggestions but there is something wrong.
## case 1: using color = eval(sprintf("chr%s",substr(var(chr1),2))) (in my case with lum70chr*)
My code would be:
karyotype = circos.sequences.txt
chromosomes_units = 1000000
<ideogram>
<spacing>
default = 0.003r
<pairwise seq10 seq11>
spacing = 1u
</pairwise>
<pairwise seq26 seq27>
spacing = 1u
</pairwise>
<pairwise seq47 seq1>
spacing = 1u
</pairwise>
</spacing>
radius = 0.75r
thickness = 180p
fill = yes
stroke_color = black
stroke_thickness = 5p
show_label = yes
label_font = default
label_size = 14
label_parallel = yes
</ideogram>
show_ticks* = yes
show_tick_labels* = yes
show_grid = yes*
<links>
crest = 1
bezier_radius = 0.3r
bezier_radius_purity = 1.0
<link>
show = yes
ribbon = yes
stroke_color = vdgrey
stroke_thickness = 2
file = circos.segdup.txt
radius = 0.79r
#color = red_a4
thickness = 15
<rules>
<rule>
condition = from(seq1)
color = eval(sprintf("lum70chr%s",substr(var(chr1),3)))
</rule>
</rules>
</link>
</links>
################################################################
# The remaining content is standard and required. It is imported
# from default files in the Circos distribution.
#
# These should be present in every Circos configuration file and
# overridden as required. To see the content of these files,
# look in etc/ in the Circos distribution.
<image>
<<include circos.image.conf>>
</image>
# RGB/HSV color definitions, color lists, location of fonts, fill patterns.
# Included from Circos distribution.
<<include etc/colors_fonts_patterns.conf>>
# Debugging, I/O an dother system parameters
# Included from Circos distribution.
<<include etc/housekeeping.conf>>
<highlights>
fill_color = green
<highlight>
file = circos.highlight.txt
ideogram = no
fill_color = blue_a3
stroke_color = black
stroke_thickness = 4
r0 = 1r -200p
r1 = 1r -250p
</highlight>
</highlights>
<ideogram>
label_radius = 1r + 400p
</ideogram>
And the output is Figure-case1 below: from each ideogram/chromosome/contigs start links with different colors
#### case 2: assign a color to each chromosome/contigs from seq1 to seq 47 and then use color = eval(var(chr1))
karyotype = circos.sequences.txt
chromosomes_units = 1000000
<ideogram>
<spacing>
default = 0.003r
<pairwise seq10 seq11>
spacing = 1u
</pairwise>
<pairwise seq26 seq27>
spacing = 1u
</pairwise>
<pairwise seq47 seq1>
spacing = 1u
</pairwise>
</spacing>
radius = 0.75r
thickness = 180p
fill = yes
stroke_color = black
stroke_thickness = 5p
show_label = yes
label_font = default
label_size = 14
label_parallel = yes
</ideogram>
show_ticks* = yes
show_tick_labels* = yes
show_grid = yes*
<links>
crest = 1
bezier_radius = 0.3r
bezier_radius_purity = 1.0
<link>
show = yes
ribbon = yes
stroke_color = vdgrey
stroke_thickness = 2
file = circos.segdup.txt
radius = 0.79r
#color = red_a4
thickness = 15
<rules>
<rule>
condition = 1
color* = eval(var(chr1))
</rule>
</rules>
</link>
</links>
################################################################
# The remaining content is standard and required. It is imported
# from default files in the Circos distribution.
#
# These should be present in every Circos configuration file and
# overridden as required. To see the content of these files,
# look in etc/ in the Circos distribution.
<image>
<<include circos.image.conf>>
</image>
# RGB/HSV color definitions, color lists, location of fonts, fill patterns.
# Included from Circos distribution.
<<include etc/colors_fonts_patterns.conf>>
# Debugging, I/O an dother system parameters
# Included from Circos distribution.
<<include etc/housekeeping.conf>>
<colors>
seq1=lum70chr1
seq2=lum70chr2
seq3=lum70chr3
seq4=lum70chr4
seq5=lum70chr5
seq6=lum70chr6
seq7=lum70chr7
seq8=lum70chr8
seq9=lum70chr9
seq10=lum70chr10
seq11=lum70chr11
seq12=lum70chr12
seq13=lum70chr13
seq14=lum70chr14
seq15=lum70chr15
seq16=lum70chr16
seq17=lum70chr17
seq18=lum70chr18
seq19=lum70chr19
seq20=lum70chr20
seq21=lum70chr21
seq22=lum70chr22
seq23=lum70chr23
seq24=lum70chrX
seq25=lum70chr24
seq26=lum70chrY
seq27=lum70chrM
seq28=lum70chr0
seq29=lum70chrUn
seq30=lum70chrNA
seq31=lum80chr1
seq32=lum80chr2
seq33=lum80chr3
seq34=lum80chr4
seq35=lum80chr5
seq36=lum80chr6
seq37=lum80chr7
seq38=lum80chr8
seq39=lum80chr9
seq40=lum80chr10
seq41=lum80chr11
seq42=lum80chr12
seq43=lum80chr13
seq44=lum80chr14
seq45=lum80chr15
seq46=lum80chr16
seq47=lum80chr17
</colors>
<highlights>
fill_color = green
<highlight>
file = circos.highlight.txt
ideogram = no
fill_color = blue_a3
stroke_color = black
stroke_thickness = 4
r0 = 1r -200p
r1 = 1r -250p
</highlight>
</highlights>
<ideogram>
label_radius = 1r + 400p
</ideogram>
And I got the same picture with slightly different colors assigned:
The final idea would be to color the highlights below the ideogram with the same links colors.
Any suggestion please?
Silvia