create data track, draw a histogram, which is a plot-type track. Two kinds of data tracks : plots and links.
create an image with one histogram
#session/2/2/etc/circos.conf
<plots>
type = histogram
thickness = 1p
color = black
#color = white
min = 0
max = 1
r0 = 0.85r
r1 = 0.975r
<plot>
file = ../data/both.cons.2e6.max.txt
fill_color = spectral-5-div-3 # yellow
</plot>
<plot>
show = no
file = ../data/both.cons.2e6.avg.txt
fill_color = spectral-5-div-4 # green
thickness = 2p
</plot>
<plot>
show = no
file = ../data/both.cons.2e6.min.txt
fill_color = spectral-5-div-5 # blue
#fill_color = white
</plot>
</plots>
<<include ../etc/karyotype.and.layout.conf>>
<<include ../etc/ideogram.conf>>
<<include ../etc/ticks.conf>>
<<include ../../etc/image.conf>>
<<include etc/colors_fonts_patterns.conf>>
"circos.conf" 45L, 769C 1,0-1 Top
the histogram without any fill color
<plot>
file = ../data/both.cons.2e6.max.txt
#fill_color = spectral-5-div-3 # yellow
</plot>
Figure 7
the histogram filled color of yellow
<plot>
file = ../data/both.cons.2e6.max.txt
fill_color = spectral-5-div-3 # yellow
</plot>
Figure 8
The order in which the tracks are drawn is controlled by the z (think of it as depth) parameter.
The second histogram will use another data file.
<plot>
file = ../data/both.cons.2e6.max.txt
fill_color = spectral-5-div-3 # yellow
</plot>
<plot>
show = yes
file = ../data/both.cons.2e6.avg.txt
fill_color = spectral-5-div-4 # green
thickness = 2p
</plot>
Figure 9
add a third histogram in the same region of the figure
<plot>
file = ../data/both.cons.2e6.max.txt
fill_color = spectral-5-div-3 # yellow
</plot>
<plot>
show = yes
file = ../data/both.cons.2e6.avg.txt
fill_color = spectral-5-div-4 # green
thickness = 2p
</plot>
<plot>
show = yes
file = ../data/both.cons.2e6.min.txt
fill_color = spectral-5-div-5 # blue
#fill_color = white
</plot>
Figure 10
the surprse the author offered
change some parameters value
<plots>
type = histogram
thickness = 1p
#color = black
#each histogram will have a white outline
color = white
min = 0
max = 1
r0 = 0.85r
r1 = 0.975r
<plot>
file = ../data/both.cons.2e6.max.txt
fill_color = spectral-5-div-3 # yellow
</plot>
<plot>
show = yes
file = ../data/both.cons.2e6.avg.txt
fill_color = spectral-5-div-4 # green
#thicker outline to seperate the two histograms
thickness = 2p
</plot>
<plot>
show = yes
file = ../data/both.cons.2e6.min.txt
#white fill to remove the histogram from view
#but use it to mask out the bottom of the second histogram
#fill_color = spectral-5-div-5 # blue
fill_color = white
</plot>
</plots>
<<include ../etc/karyotype.and.layout.conf>>
<<include ../etc/ideogram.conf>>
<<include ../etc/ticks.conf>>
Figure 11
Histogram Data Format
#chr start end value
Histograms can have variable size bins and bins do not need to abut (but they should not overlap). For data tracks like the scatter plot, the data point is drawn in the middle of the region.
Data Options
Formate parameters like color and thickness will override any track settings. Parameters like id can be used in rules, to change how data is displayed.
Track Defaults
All track types have sufficient parameters set to default values to be drawn by only specifying the file name and track type.
These defaults are applied to all the tracks of a specific type. Thus, if you draw multiple histograms using their default values, they will be drawn on top of each other because their r0 and r1 values will be the same. you can undefined a parameter, such as one set by default, using --undef--
thickness = undef
you have the ability to turn off the use of default settings in --etc/housekeeping.conf -- Either comment out
track_defaults = etc/tracks
or override it in your main configuration file with
track_default* = undef
What is shown in the figure ?
The histogram values on the mouse chromosomes correspond to conservation with the human genome, and on the human chromosomes to conservation with the mouse genome.
The original data can be download from the UCSC Genome Browser table viewer(group Comparative Genomics track 28-way Cons table multiz28waySummary)
The --bincons-- script in 2/data/ucsc scans the contents from the files, bins the scores for alignments between mouse and human and calculates the minimum, maximum and average score values for each bin.
cat multiz.mm9.* | ./bincons -stat min -binsize 2e6 -chrprefix mm -species hg18
cat multiz.hg18.* | ./bincons -stat min -binsize 2e6 -chrprefix hs -species mm8
and the output of these commands is used as the input for the minimum score histogram. This and other commands to generate all the data tracks for this session can be found in 2/data/ucsc/create.tracks.
#!/bin/bash
PERL=/usr/bin/perl
binsize=2e6
binsize_arg=2000000
echo "Creating data tracks from UCSC data files. This might take 2-3 minutes."
################################################################
# Lesson 2
echo "Creating histogram tracks for Lesson 2"
for stat in avg min max ; do
echo " statistic $stat"
\rm ../both.cons.$binsize.$stat.txt
cat multiz.mm9.* | ./bincons -stat $stat -binsize $binsize_arg -chrprefix mm -species hg18 > ../both.cons.$binsize.$stat.txt
cat multiz.hg18.* | ./bincons -stat $stat -binsize $binsize_arg -chrprefix hs -species mm8 >> ../both.cons.$binsize.$stat.txt
done
################################################################
# Lesson 3
echo "Creating heat map tracks for Lesson 3"
for s in rhe rn danrer fr ; do
echo " species $s"
\rm ../both.cons.$binsize.$s.avg.txt
for g in mm hg ; do
cat multiz.$g* | ./bincons -binsize $binsize_arg -chrprefix $g -species $s | sed 's/hg/hs/' >> ../both.cons.$binsize.$s.avg.txt
done
done
1,1 Top