码迷,mamicode.com
首页 > 其他好文 > 详细

Simple circos code

时间:2017-04-01 00:51:21      阅读:339      评论:0      收藏:0      [点我收藏+]

标签:nts   i/o   cluster   tle   nim   default   download   font   folder   

According to the tutorials (http://circos.ca/documentation/tutorials/), to draw a graph using circos, at least three files needed.

Download the software and install: http://circos.ca/software/download/

Files preparation:

# 1. genome file#

# can be in one file or one species one file. Following is the format.

chr - sb7 sb7 0 354 chr7
chr - si7 si7 0 322 chr7
chr - sb8 sb8 0 215 chr8
chr - si8 si8 0 251 chr8
chr - sb15 sb15 0 130 chr15
chr - si15 si15 0 147 chr15

# 2. hist.txt #

# this is not necessary to have.

"V1" "temp1" "temp"
"1" 1 0.5 555
"2" 1 1.5 157
"3" 1 2.5 0
"4" 1 3.5 3
"5" 1 4.5 3
"6" 1 5.5 0
"7" 1 6.5 0
"8" 1 7.5 0
"9" 1 8.5 0
"10" 1 9.5 0
"11" 1 10.5 0
"12" 1 11.5 0
"13" 1 12.5 0
"14" 1 13.5 0
"15" 1 14.5 0
"16" 1 15.5 0
"17" 1 16.5 0
"18" 1 17.5 0
"19" 1 18.5 0
"20" 1 19.5 0
"21" 1 20.5 0
"22" 1 21.5 8
"23" 1 22.5 209
"24" 2 0.5 0
"25" 2 1.5 1
"26" 2 2.5 0
"27" 2 3.5 0
"28" 2 4.5 0
"29" 2 5.5 0
"30" 2 6.5 0

# 3. link file#

linkzm-si-1-1 zm1 0 61 z=0,color=chr1
linkzm-si-1-1 si1 0 78 z=0,color=chr1
linkzm-si-1-9 zm1 71 125 z=0,color=chr9
linkzm-si-1-9 si9 0 73 z=0,color=chr9
linkzm-si-1-14 zm1 125 222 z=0,color=chr14
linkzm-si-1-14 si14 0 73 z=0,color=chr14

# 4.genome.conf#

#karyotype = /home/xlai/Desktop/UntitledFolder/motif/Newcluster/circos/zm.txt,/home/xlai/Desktop/UntitledFolder/motif/Newcluster/circos/sb.txt,/home/xlai/Desktop/UntitledFolder/motif/Newcluster/circos/si.txt
karyotype = /home/xlai/Desktop/UntitledFolder/motif/Newcluster/circos/sbsi.scaled.txt
#chromosomes_units = 100

#this histgram part is not necessary
########################################histogram
<plots>
<plot>

type = histogram

file = /home/xlai/Desktop/UntitledFolder/motif/Newcluster/circos/sbsi.hist.txt

fill_color = vdgrey

color            = black
stroke_thickness = 3
r1               = 0.99r
r0               = 0.7r
orientation      = out


extend_bin = yes

<rule>
condition = on()
show      = yes
</rule>

</plot>
<plot>

type = histogram

file = /home/xlai/Desktop/UntitledFolder/motif/Newcluster/circos/clock.txt

fill_color = vdgrey

color            = black
stroke_thickness = 1
r1               = 0.99r
r0               = 0.95r
orientation      = in


extend_bin = yes

<rule>
condition = on()
show      = yes
</rule>

</plot>
</plots>
############################
<ideogram>

<spacing>
default = 0.001r
</spacing>

# Ideogram position, fill and outline

radius           = 0.9r
thickness        = 20p
fill             = yes
stroke_color     = dgrey
stroke_thickness = 2p

# Minimum definition for ideogram labels.
show_label       = yes
# see etc/fonts.conf for list of font names
label_font       = default
label_radius     = 1r + 75p
label_size       = 40
label_parallel   = yes

</ideogram>
###############
show_links      = yes
### links
<links>

show          = conf(show_links)
ribbon        = yes
flat          = yes
radius        = 0.7r-30p
bezier_radius = 0.3r
color         = black_a5

<link>
file = /home/xlai/Desktop/UntitledFolder/motif/Newcluster/circos/lk.sbsi.scaled.txt
<rules>
<rule>  
condition  = var(size1) < 0
show       = no
</rule>

<rule>
condition  = 1
color      = eval(sprintf("chr%s_a3",substr(var(chr2),2)))
z          = eval(remap_int(var(size2),0,1,0,-100))
</rule>
</rules>
</link>

</links>

################################################################

<image>
# Included from Circos distribution.
<<include etc/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>>

Simple circos code

标签:nts   i/o   cluster   tle   nim   default   download   font   folder   

原文地址:http://www.cnblogs.com/xlai/p/6654178.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!