copyright :Krzywinski, M. et al. Circos: an Information Aesthetic for Comparative Genomics. Genome Res (2009) 19:1639-1645
thanks to the handsome tools and the creative teams, I have the chance to enjoy the journey of drawing amazing pictures. The software, circos-0.69-6, will be my great work partner. The course materials , software files and something new reedited for the purpoes of learning will be present here. To save time , list the citation only one time here. Thanks for the authors' great work.
Lesson 1 Drawing and Spacing Ideograms
paraments and files annotation :
karyotype: size and name of chromsome
units : unit of length for the chromosome
display default : yes /no , appearance order
ideogram.conf : spacing, position, thickness, color/outline format of the ideogram
ticks.conf : position, label, spacing, and grids for tick marks
image.conf : size, location, format of the output image
Colors_Fonts_Patterns.conf : color, Fonts, and fill patterns
housekeeping.conf : file delimiters, debugging options and other global settings
defining a karyotype:
karyotype file : defines the name, size and colors of the chromosomes. any subset of the chromosomes can be drawn.
<colors> block : defined in the etc/colors_fonts_patterns.conf file . colors are predefined for each hue.:
# etc/colors_fonts_patterns.conf
<colors>
<<include etc/colors.conf>>
</colors>
<fonts>
<<include etc/fonts.conf>>
</fonts>
<patterns>
<<include etc/patterns.conf>>
</patterns>
~
~
# etc/colors.conf
# HUE (e.g. red)
# dHUE (dark HUE, e.g. dred)
# vdHUE (very dark HUE, e.g. vdred))
# vvdHUE (very very dark HUE, e.g. vvdred))
#
# Pure colors are prefixed with "p" (e.g. pred, dpred, vdpred) and
# are based on 10% luminance steps from a pure hue color. Use these
# at your discretion.
#
# Boutique colors are not. If you really must use 'bisque', then add
#
# bisque = 255,228,196
#
# See colors.unixnames.txt for a large number of named color definitions.
#
# In addition to hues, two other color groups are defined.
#
# - cytogenetic band colors (e.g. gposNNN, acen, stalk, etc.) which
# correspond to colors on ideogram bands
# - UCSC chromosome color palette (e.g. chrNN, chrUn, chrNA)
# - included from ucsc.conf
#
# Another useful list of colors is in brewer.conf, which defines
# Brewer Palettes (www.colorbrewer.org), and corresponding lists.
#
#
#
white = 255,255,255
vvvvlgrey = greys-9-seq-1
vvvlgrey = greys-9-seq-1
vvlgrey = greys-9-seq-2
vlgrey = greys-9-seq-3
lgrey = greys-9-seq-4
grey = greys-9-seq-5
dgrey = greys-9-seq-6
vdgrey = greys-9-seq-7
vvdgrey = greys-9-seq-8
vvvdgrey = greys-9-seq-9
vvvvdgrey = greys-9-seq-9
black = 0,0,0
41,1 14%
# etc/colors_Brewer.conf
# Colors from www.ColorBrewer.org by Cynthia A. Brewer,
# Geography, Pennsylvania State University. See BREWER for license.
# See www.colorbrewer.org for details.
#
# Color names are PALETTE-NUMCOLORS-TYPE-IDX (e.g. reds-3-seq-1)
#
# PALETTE palette name (e.g. reds)
# NUMCOLORS number of colors in the palette (e.g. 3)
# TYPE palette type (div, seq, qual)
# IDX color index within the palette (e.g. 1)
#
# Another version of the color index is defined where COLORCODE is the
# color's letter unique to a given PALETTE.
#
# For each palette, two color list are defined for use with heatmaps.
#
# PALETTE-NUMCOLORS-TYPE
# PALETTE-NUMCOLORS-TYPE-rev
#
# where the second contains colors in reversed order.
#
# Also supported is the format
#
# PALETTE-NUMCOLORS
# PALETTE-NUMCOLORS-rev
#
# (without the -TYPE), which isn't necessary to uniquely identify the palette.
#
# Each diverging and sequential palette has all the colors used for
# its n-color variants listed an integrated 13-color (for sequential)
# or 15-color (for diverging) palettes.
#
# http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_updates.html
# http://mkweb.bcgsc.ca/brewer
#
#
blues-3-seq = blues-3-seq-(\d+)
blues-3-seq-rev = rev(blues-3-seq-(\d+))
blues-3-seq-1 = 222,235,247
blues-3-seq-2 = 158,202,225
blues-3-seq-3 = 49,130,189
1,1 Top
[arthur@localhost 1]$ circos
debuggroup summary 0.47s welcome to circos v0.69-6 31 July 2017 on Perl 5.016003
debuggroup summary 0.48s current working directory /home/arthur/BGA2017/Course_material/June08/circos-course/session/1/1
debuggroup summary 0.48s command /home/arthur/BGA2017/Course_material/circos/circos-0.69-6/bin/circos [no flags]
debuggroup summary 0.48s guessing configuration file
debuggroup summary 0.48s found conf file /home/arthur/BGA2017/Course_material/June08/circos-course/session/1/1/etc/circos.conf
debuggroup summary 1.05s debug will appear for these features: output,summary
debuggroup summary 1.05s bitmap output image ./circos.png
debuggroup summary 1.05s parsing karyotype and organizing ideograms
debuggroup summary 1.07s karyotype has 5 chromosomes of total size 185,000,005
debuggroup summary 1.07s applying global and local scaling
debuggroup summary 1.08s allocating image, colors and brushes
debuggroup summary 4.53s drawing 5 ideograms of total size 185,000,005
debuggroup summary 4.53s drawing highlights and ideograms
debuggroup output 4.76s generating output
debuggroup output 4.87s created PNG image ./circos.png (57 kb)
[arthur@localhost 1]$ ls
circos.png circos.svg etc misc
[arthur@localhost 1]$ eog circos.png
figure2
spacing between ideograms
the u suffix indicates that the units of this value are given relative to the value defined by chromosome_units. Since chromosomes_units = 1000000, the spacing is 2000000(2Mb)
[arthur@localhost etc]$ ls
circos.conf ideogram.conf
#ideogram spacing default 2u to 10u
[arthur@localhost etc]$ vim ideogram.conf
[arthur@localhost 1]$ circos
debuggroup summary 0.41s welcome to circos v0.69-6 31 July 2017 on Perl 5.016003
debuggroup summary 0.41s current working directory /home/arthur/BGA2017/Course_material/June08/circos-course/session/1/1
debuggroup summary 0.41s command /home/arthur/BGA2017/Course_material/circos/circos-0.69-6/bin/circos [no flags]
debuggroup summary 0.41s guessing configuration file
debuggroup summary 0.41s found conf file /home/arthur/BGA2017/Course_material/June08/circos-course/session/1/1/etc/circos.conf
debuggroup summary 0.77s debug will appear for these features: output,summary
debuggroup summary 0.77s bitmap output image ./circos.png
debuggroup summary 0.77s parsing karyotype and organizing ideograms
debuggroup summary 0.79s karyotype has 5 chromosomes of total size 185,000,005
debuggroup summary 0.79s applying global and local scaling
debuggroup summary 0.80s allocating image, colors and brushes
debuggroup summary 4.48s drawing 5 ideograms of total size 185,000,005
debuggroup summary 4.48s drawing highlights and ideograms
debuggroup output 4.74s generating output
debuggroup output 4.82s created PNG image ./circos.png (59 kb)
[arthur@localhost 1]$ ls
circos.png circos.svg etc misc
[arthur@localhost 1]$ eog circos.png
figure 3
spacing between specific pairs of ideograms
#spacing on either side of ch1 will be changed
<pairwise ch1>
spacing = 5u
</pairwise>
#Spacing between individual ideograms pairs can be ajusted
<pairwise ch2 ch3>
spacing = 15u
</pairwise>
<ideogram>
<spacing>
#default = 2u
default = 10u
<pairwise chr1>
spacing = 5u
</pairwise>
#<pairwise chr2 chr3>
#spacing = 15u
#</pairwise>
#<pairwise chr3 chr4>
#spacing = 25u
#</pairwise>
</spacing>
<<include ../../etc/ideogram.conf>>
</ideogram>
the space adjacent to ch1 is changed from 10u to 5u
figure 4
the spacing between chromosome 2 and chromosome 3 is increased from 10u to 15u and between chromosome 3 and chromosome 4 10u to 25u .
figure 5