data tracks SESSION 2 MARTIN KRZYWINSKI Genome Sciences Center BC - - PowerPoint PPT Presentation

data tracks
SMART_READER_LITE
LIVE PREVIEW

data tracks SESSION 2 MARTIN KRZYWINSKI Genome Sciences Center BC - - PowerPoint PPT Presentation

data tracks SESSION 2 MARTIN KRZYWINSKI Genome Sciences Center BC Cancer Agency Vancouver, Canada EMBO PRACTICAL COURSE: BIOINFORMATICS GENOME ANALYSES Izmir Biomedicine and Genome Center, Izmir, Turkey May 214, 2016 GENOME VISUALIZATION


slide-1
SLIDE 1

GENOME VISUALIZATION WITH CIRCOS v20160503

MARTIN KRZYWINSKI

SESSION 2

Genome Sciences Center BC Cancer Agency Vancouver, Canada

data tracks

EMBO PRACTICAL COURSE: BIOINFORMATICS GENOME ANALYSES

Izmir Biomedicine and Genome Center, Izmir, Turkey May 2–14, 2016

slide-2
SLIDE 2

histograms heatmaps histograms tiles links dynamic rules highlights

.

SESSION FINAL IMAGE

2 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-3
SLIDE 3

(A) Each data track confined to an annulus bounded by radii r0 and r1. (B) Any number

  • f tracks can be placed on the figure, and

(C) at any radial position, including inside/

  • utside ideogram circle and inside/outside
  • ticks. (D) Tracks can be made to overlap

and the order in which they are drawn is controlled by the z parameter.

.

DATA TRACK LAYOUT

3 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-4
SLIDE 4

(A) glyph (B) highlight with depth control (C) scatter (D) paired-location (E) ribbon (F) histogram (G) tile (H) highlight with auto depth (I) text with auto arrange (J) heat map (K) high-density text (L) high-density glyph (M) multi-type composite (N) variable scale control (O) fine geometry control (P) flexible text and element placement (Q) transparent ribbons (R) stacked histogram (S) connectors (T) tick rings

.

DATA TRACK TYPES

4 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-5
SLIDE 5

GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

LESSON 1

ideogram layout

5

slide-6
SLIDE 6

# <<include>> directives keep the # configuration file short and modular <<include ../etc/karyotype.and.layout.conf>> <<include ../etc/ideogram.conf>> <<include ../etc/ticks.conf>> <<include ../../etc/image.conf>> <<include etc/colors_fonts_patterns.conf>> <<include etc/housekeeping.conf>>

.

IDEOGRAM LAYOUT

6 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-7
SLIDE 7

# 2/1/etc/circos.conf <<include ../etc/karyotype.and.layout.conf>> # 2/etc/karyotype.and.layout.conf karyotype = ../../data/karyotype/karyotype.human.txt,../../data/karyotype/karyotype.mouse.txt chromosomes_units = 1000000 chromosomes_display_default = no chromosomes = hs1;hs2;mm1;mm2 chromosomes_order = hs1,hs2,mm2,mm1 chromosomes_color = hs1=rdylbu-11-div-2,hs2=rdylbu-11-div-3,mm1=rdylbu-11-div-10,mm2=rdylbu-11-div-9 chromosomes_reverse = /mm/ chromosomes_scale = /./=0.25r <highlights> <highlight> file = ../data/highlight.txt r0 = 1r+40p r1 = 1r+45p </highlight> </highlights>

LAYOUT PARAMETERS VIA <<INCLUDE>>

7 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-8
SLIDE 8

chromosome color name hs1 rdylbu-11-div-2 hs2 rdylbu-11-div-3 mm1 rdylbu-11-div-10 mm2 rdylbu-11-div-9

.

BREWER COLOR PALETTE FOR IDEOGRAMS

8 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-9
SLIDE 9

.

.

OTHER BREWER PALETTES

9 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-10
SLIDE 10

GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

LESSON 2

histograms

10

slide-11
SLIDE 11

# 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>

.

HISTOGRAMS

11 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-12
SLIDE 12

# 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 = yes 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>

.

HISTOGRAMS

12 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-13
SLIDE 13

# 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 = 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> </plots>

.

HISTOGRAMS

13 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-14
SLIDE 14

# 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 = 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> </plots>

.

HISTOGRAMS

14 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-15
SLIDE 15

GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

LESSON 3

heatmaps

15

slide-16
SLIDE 16

# 2/3/etc/circos.conf # heatmaps map a range of values onto # a list of colors <plot> type = heatmap file = ../data/both.cons.2e6.rhe.avg.txt min = 0.1 max = 0.9 r0 = 0.73r r1 = 0.75r color = spectral-11-div #color = spectral-11-div-rev #scale_log_base = 0.500 </plot>

.

HEATMAPS

16 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-17
SLIDE 17

# 2/3/etc/circos.conf <plot> type = heatmap file = ../data/both.cons.2e6.rn.avg.txt min = 0.1 max = 0.9 r0 = 0.70r r1 = 0.72r color = spectral-11-div </plot> <plot> type = heatmap file = ../data/both.cons.2e6.danrer.avg.txt min = 0.1 max = 0.9 r0 = 0.67r r1 = 0.69r color = spectral-11-div </plot> <plot> type = heatmap file = ../data/both.cons.2e6.fr.avg.txt min = 0.1 max = 0.9 r0 = 0.64r r1 = 0.66r color = spectral-11-div </plot>

.

HEATMAPS

17 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-18
SLIDE 18

<plot> ... color = spectral-11-div ... </plot>

REVERSE COLOR LISTS

# each color list has a corresponding reverse version # suffixed with -rev <plot> ... color = spectral-11-div-rev ... </plot>

18 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-19
SLIDE 19

.

LOG COLOR MAPPING

1 < 1 >1

x

color index, i

scale_log_base

1 scale_log_base

min max min x i n −

  • =
  • n

greater dynamic range

  • f color for smaller values

colors uniformly distributed across range of values greater dynamic range

  • f color for larger values

min max

0.5 2.0 1.0

19 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-20
SLIDE 20

# 2/3/etc/circos.conf <plot> ... scale_log_base = 0.5 ... </plot>

.

LOG COLOR MAPPING

20 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-21
SLIDE 21

GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

LESSON 4

links

21

slide-22
SLIDE 22

.

LINK GEOMETRY

22 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

e.g. radius = 0.95r e.g. bezier_radius = 0.2r p1 p2 p3 link drawn as quadratic Bezier curve curve control point p3 positioned at bezier_radius, and bisecting arc p1-p2. curve ends positioned at radius

slide-23
SLIDE 23

# 2/4/etc/circos.conf <links> <link> file = ../data/links.txt bezier_radius = 0r radius = 0.5r thickness = 1p color = black #color = black_a5 </link> </links>

.

LINKS

23 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-24
SLIDE 24

# 2/4/etc/circos.conf <links> <link> file = ../data/links.txt bezier_radius = 0r radius = 0.5r thickness = 1p #color = black color = black_a5 </link> </links>

.

LINKS

24 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-25
SLIDE 25

GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

LESSON 5

density histograms & axis grids

25

slide-26
SLIDE 26

# 2/5/etc/circos.conf <plot> type = histogram file = ../data/links.density.txt min = 0 max = 10 r0 = 0.5r r1 = 0.55r thickness = 0 fill_color = black </plot>

.

DENSITY HISTOGRAMS

26 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-27
SLIDE 27

# 2/5/etc/circos.conf <plot> type = histogram file = ../data/links.density.txt min = 0 max = 10 r0 = 0.5r r1 = 0.55r thickness = 0 fill_color = black </plot> <plot> show = yes type = histogram file = ../data/links.density.stacked.txt min = 0 max = 300000 r0 = 0.55r r1 = 0.65r thickness = 0 fill_color = rdylbu-11-div-10, rdylbu-11-div-2, rdylbu-11-div-3, rdylbu-11-div-9 </plot>

.

DENSITY HISTOGRAMS

27 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-28
SLIDE 28

# 2/5/etc/circos.conf <plot> type = histogram file = ../data/links.density.txt min = 0 max = 10 r0 = 0.5r r1 = 0.55r thickness = 0 fill_color = black </plot> <plot> show = yes type = histogram file = ../data/links.density.stacked.txt min = 0 max = 300000 r0 = 0.55r r1 = 0.65r thickness = 0 fill_color = rdylbu-11-div-10, rdylbu-11-div-2, rdylbu-11-div-3, rdylbu-11-div-9 </plot>

Histogram bars are colored by color of ideogram corresponding to the link’s other end. (A) most links from hs2 (B) most links from hs1 (C) most links from mm2 (D) most links from mm1

DENSITY HISTOGRAMS

28 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-29
SLIDE 29

# 2/data/links.density.txt # - normal histogram hs2 3000000 3999999 15.0000 hs2 4000000 4999999 1.0000 hs2 6000000 6999999 1.0000 hs2 9000000 9999999 7.0000 hs2 10000000 10999999 1.0000 hs2 11000000 11999999 1.0000 hs2 25000000 25999999 1.0000 # 2/data/links.density.stacked.txt # - stacked histogram hs2 0 4999999 7755.0000,0.0000,0.0000,15461.0000 hs2 5000000 9999999 7877.0000,0.0000,0.0000,9648.0000 hs2 10000000 14999999 4877.0000,0.0000,0.0000,1319.0000 hs2 25000000 29999999 40722.0000,0.0000,0.0000,20747.0000 hs2 30000000 34999999 7664.0000,0.0000,0.0000,2691.0000 hs2 35000000 39999999 11408.0000,0.0000,0.0000,23640.0000 hs2 40000000 44999999 42742.0000,0.0000,0.0000,16721.0000 hs2 50000000 54999999 7745.0000,0.0000,0.0000,7684.0000 hs2 60000000 64999999 7016.0000,0.0000,0.0000,23395.0000 hs2 70000000 74999999 2685.0000,0.0000,0.0000,5510.0000 hs2 80000000 84999999 950.0000,0.0000,0.0000,12583.0000 hs2 85000000 89999999 0.0000,0.0000,0.0000,123674.0000 hs2 90000000 94999999 0.0000,0.0000,0.0000,8511.0000

STACKED HISTOGRAM DATA FORMAT

29 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-30
SLIDE 30

# 2/5/etc/circos.conf <plot> ... <axes> <axis> color = grey spacing = 0.25r thickness = 1 </axis> </axes> ... </plot>

.

DENSITY HISTOGRAMS

30 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-31
SLIDE 31

# 2/5/etc/circos.conf <plot> ... <axes> <axis> color = grey_a4 spacing = 0.25r thickness = 1 </axis> <axis> color = grey_a1 spacing = 0.5r thickness = 1 </axis> <axis> color = red position = 0.75r thickness = 2 </axis> </axes> ... </plot>

.

DENSITY HISTOGRAMS

31 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-32
SLIDE 32

GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

LESSON 6

tiles, backgrounds & dynamic rules

32

slide-33
SLIDE 33

# 2/6/etc/circos.conf <plot> type = tile file = ../data/tiles.txt r0 = 1r+2p r1 = 1r+40p layers = 7 layers_overflow = hide layers_overflow_color = red margin = 1u thickness = 3 padding = 2

  • rientation = out

color = black stroke_thickness = 1 stroke_color = vdgrey ... </plot>

.

TILES

33 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-34
SLIDE 34

# 2/6/etc/circos.conf <plot> ... <backgrounds> <background> y0 = 0.75r color = grey_a1 </background> <background> y0 = 0.25r y1 = 0.75r color = grey_a3 </background> <background> y1 = 0.25r color = grey_a5 </background> </backgrounds> </plot>

.

TILES

34 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-35
SLIDE 35

.

.

TILE GEOMETRY

35 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-36
SLIDE 36

# 2/6/etc/circos.conf <plot> ... <rules> <rule> condition = 1 color = eval( sprintf("spectral-11-div-%d", remap_int(var(size),0,10e6,1,11) ) ) </rule> </rules> </plot>

.

DYNAMIC FORMATTING RULES

36 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-37
SLIDE 37

# 2/6/etc/circos.conf <rules> <rule> use = yes condition = var(size) < 5e6 show = no </rule> <rule> condition = 1 color = eval( sprintf("spectral-11-div-%d", remap_int(var(size),0,10e6,1,11) ) ) </rule> </rules>

.

DYNAMIC FORMATTING RULES

37 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-38
SLIDE 38

GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

LESSON 7

highlights

38

slide-39
SLIDE 39

.

.

HIGHLIGHT GEOMETRY

39 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-40
SLIDE 40

# 2/7/etc/circos.conf <plot> type = highlight file = ../data/highlight.max.top20.txt r0 = 0.975r r1 = 0.995r #r0 = 0.9r #r1 = 0.975r #r0 = dims(ideogram,radius_inner) #r1 = dims(ideogram,radius_outer) fill_color = spectral-5-div-3 stroke_thickness = 1p stroke_color = red z = 15 </plot> <plot> type = highlight file = ../data/highlight.min.top20.txt r0 = 0.835r r1 = 0.855r #r0 = 0.835r #r1 = 0.9r #r0 = dims(ideogram,radius_inner) #r1 = dims(ideogram,radius_outer) fill_color = spectral-5-div-4 stroke_thickness = 1p stroke_color = red z = 15 </plot>

.

HIGHLIGHTS

40 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-41
SLIDE 41

# 2/7/etc/circos.conf <plot> type = highlight file = ../data/highlight.max.top20.txt #r0 = 0.975r #r1 = 0.995r r0 = 0.9r r1 = 0.975r #r0 = dims(ideogram,radius_inner) #r1 = dims(ideogram,radius_outer) #fill_color = spectral-5-div-3 stroke_thickness = 1p stroke_color = red z = 15 </plot> <plot> type = highlight file = ../data/highlight.min.top20.txt #r0 = 0.835r #r1 = 0.855r r0 = 0.835r r1 = 0.9r #r0 = dims(ideogram,radius_inner) #r1 = dims(ideogram,radius_outer) #fill_color = spectral-5-div-4 stroke_thickness = 1p stroke_color = red z = 15 </plot>

.

HIGHLIGHTS

41 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-42
SLIDE 42

# 2/7/etc/circos.conf <plot> type = highlight file = ../data/highlight.max.top20.txt #r0 = 0.975r #r1 = 0.995r #r0 = 0.9r #r1 = 0.975r r0 = dims(ideogram,radius_inner) r1 = dims(ideogram,radius_outer) fill_color = spectral-5-div-3 stroke_thickness = 1p stroke_color = red z = 15 </plot> <plot> type = highlight file = ../data/highlight.min.top20.txt #r0 = 0.835r #r1 = 0.855r #r0 = 0.835r #r1 = 0.9r r0 = dims(ideogram,radius_inner) r1 = dims(ideogram,radius_outer) fill_color = spectral-5-div-4 stroke_thickness = 1p stroke_color = red z = 15 </plot>

.

HIGHLIGHTS

42 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-43
SLIDE 43

GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

LESSON 8

formatting links with dynamic rules

43

slide-44
SLIDE 44

# 2/8/etc/circos.conf <link chain> file = ../data/links.txt bezier_radius = 0r radius = 0.5r thickness = 1p color = black_a5 </link>

.

RULES FOR LINKS

44 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-45
SLIDE 45

# 2/8/etc/circos.conf <rules> use = yes <rule> use = yes condition = on(hs1) color = rdylbu-11-div-2_a3 </rule> <rule> condition = 1 show = no </rule> </rules>

.

RULES FOR LINKS

45 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-46
SLIDE 46

# 2/8/etc/circos.conf <rule> # multiple conditions evaluated with AND condition = between(hs1,mm1) condition = var(start2) < 40Mb || var(start2) > 160Mb thickness = eval( remap_round(var(size1),0,50000,1,5) ) z = eval( remap_round(var(size1),0,50000,1,5) ) color = eval( sprintf("rdylbu-11-div-%d_a3", remap_round(var(start1),0,250e6,1,11) ) ) </rule>

.

RULES FOR LINKS

46 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-47
SLIDE 47

# 2/8/etc/circos.conf <rule> # multiple conditions evaluated with AND condition = between(hs1,mm1) || between(hs2,mm2) condition = var(start2) < 40Mb || var(start2) > 160Mb thickness = eval( remap_round(var(size1),0,50000,1,5) ) z = eval( remap_round(var(size1),0,50000,1,5) ) color = eval( sprintf("rdylbu-11-div-%d_a3", remap_round(var(start1),0,250e6,1,11) ) ) </rule>

.

RULES FOR LINKS

47 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks

slide-48
SLIDE 48

48 GENOME VISUALIZATION WITH CIRCOS · Session 2 · Data Tracks