bundles and automation SESSION 3 MARTIN KRZYWINSKI Genome Sciences - - PowerPoint PPT Presentation

bundles and automation
SMART_READER_LITE
LIVE PREVIEW

bundles and automation SESSION 3 MARTIN KRZYWINSKI Genome Sciences - - PowerPoint PPT Presentation

bundles and automation SESSION 3 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


slide-1
SLIDE 1

GENOME VISUALIZATION WITH CIRCOS v20160503

MARTIN KRZYWINSKI

SESSION 3

Genome Sciences Center BC Cancer Agency Vancouver, Canada

bundles and automation

EMBO PRACTICAL COURSE: BIOINFORMATICS GENOME ANALYSES

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

slide-2
SLIDE 2

GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

LESSON 1

ideogram layout

2

slide-3
SLIDE 3

# 3/1/etc/circos.conf <<include ../etc/karyotype.and.layout.conf>> <<include ideogram.conf>> <<include ticks.conf>> <<include ../etc/image.conf>> <<include etc/colors_fonts_patterns.conf>> <<include etc/housekeeping.conf>> # 3/1/../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[hs1a]:0-120; hs1[hs1b]:140-); /mm\d/ chromosomes_order = mm19,hs1b,hs1a chromosomes_reverse = hs1a,hs1b chromosomes_scale = hs1a:0.25r,hs1b:0.25r <highlights> <highlight> file = ../data/highlight.txt r0 = 0.99r r1 = 0.999r </highlight> </highlights>

.

IDEOGRAM LAYOUT

3 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-4
SLIDE 4

GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

LESSON 2

link geometry

4

slide-5
SLIDE 5

.

.

LINK GEOMETRY - BEZIER RADIUS

5 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-6
SLIDE 6

.

.

LINK GEOMETRY - CREST

6 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-7
SLIDE 7

.

.

LINK GEOMETRY - CREST

7 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-8
SLIDE 8

# 3/2/etc/circos.conf <links> <link> file = ../data/links.txt bezier_radius = 0r radius = 0.85r thickness = 1p color = grey_a5 </link> </links>

.

LINKS

8 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-9
SLIDE 9

GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

LESSON 3

color rules

9

slide-10
SLIDE 10

# 3/3/etc/circos.conf <rule> condition = 1 color = eval( sprintf("chr%s_a4",substr(var(chr2),2)) ) z = eval(-var(size1)) thickness = 2p flow = stop </rule>

.

SINGLE RULE THAT ALWAYS TRIGGERS

10 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-11
SLIDE 11

# 3/3/etc/circos.conf <rule> condition = on(mm11) color = chr11_a3 z = 10 thickness = 2p flow = stop </rule>

.

SINGLE RULE WITH CONDITION

11 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-12
SLIDE 12

# 3/3/etc/circos.conf <rule> condition = on(mm11) color = chr11_a3 z = 10 thickness = 2p flow = goto between_20_50 if true flow = stop </rule> <rule> tag = between_20_50 condition = var(start1) > 20e6 && var(end1) < 50e6 color = reds-5-seq-4_a3 z = 20 thickness = 3p </rule>

.

MULTIPLE RULES, WITH FLOW

12 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-13
SLIDE 13

GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

LESSON 4

bundles

13

slide-14
SLIDE 14

# 3/4/etc/circos.conf <link> ribbon = yes file = ../data/bundles.txt bezier_radius = 0r radius = 0.85r thickness = 0p color = black_a3 </link>

.

RIBBON LINKS

14 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-15
SLIDE 15

.

.

BUNDLING - CREATING RIBBONS

15 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-16
SLIDE 16

.

LINKS IN A BUNDLE

16 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-17
SLIDE 17

# 3/4/etc/circos.conf <rule> condition = 1 color = eval( sprintf("chr%s_a1",substr(var(chr2),2)) ) radius2 = 0.99r z = eval(-var(size2)) flow = stop </rule>

.

SINGLE RULE

17 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-18
SLIDE 18

# 3/4/etc/circos.conf <rule> condition = 1 color = eval( sprintf("greys-9-seq-%d_a5", remap_round(var(size1),0,1e6,2,9) ) ) radius2 = 0.99r z = eval(-var(size2)) flow = continue </rule> <rule> condition = on(mm(5|8|11)) color = eval( sprintf("chr%s_a1",substr(_CHR2_,2)) ) z = 10 </rule>

.

MULTIPLE RULES WITH FLOW

18 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-19
SLIDE 19

GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

LESSON 5

stacked histograms

19

slide-20
SLIDE 20

# 3/5/etc/circos.conf <plot> type = histogram min = 0 max = 50e3 r0 = 1r r1 = 1r+43p file = ../data/histogram.mm.txt fill_color = black thickness = 0 </plot> <plot> type = histogram min = 0 max = 35e6 r0 = 1r r1 = 1r+43p file = ../data/histogram.mm.bundles.txt thickness = 2 color = reds-5-seq-4 z = 10 </plot> <plot> type = histogram min = 0 max = 25 r0 = 1r r1 = 1r+43p file = ../data/histogram.hs.stacked.txt #file = ../data/ histogram.hs.stacked.norm.txt thickness = 0 fill_color = chrs #sort_bin_values = yes </plot>

.

HISTOGRAMS

20 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-21
SLIDE 21

# 3/5/etc/circos.conf <plot> type = histogram min = 0 max = 1 r0 = 1r r1 = 1r+43p file = ../data/ histogram.hs.stacked.norm.txt thickness = 0 fill_color = chrs #sort_bin_values = yes </plot>

.

NORMALIZED HISTOGRAM

21 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-22
SLIDE 22

# 3/5/etc/circos.conf <plot> type = histogram min = 0 max = 1 r0 = 1r r1 = 1r+43p file = ../data/ histogram.hs.stacked.norm.txt thickness = 0 fill_color = chrs sort_bin_values = yes </plot>

.

SORTING STACKED HISTOGRAM BINS

22 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-23
SLIDE 23

# 3/5/etc/circos.conf <plot> type = histogram min = 0 max = 50e3 r0 = 1r r1 = 1r+43p file = ../data/histogram.mm.txt fill_color = black <rules> <rule> condition = 1 fill_color = eval( sprintf("chr%s",substr(var(CHR),2)) ) color = black thickness = 1 </rule> </rules> </plot>

.

SETTING FILL COLOR WITH RULES

23 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-24
SLIDE 24

GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

LESSON 6

scatter plot

24

slide-25
SLIDE 25

# 3/6/etc/circos.conf <plot> show = yes type = scatter file = ../data/scatter.cons.txt min = 0.39 max = 0.55 r0 = 0.855r r1 = 0.995r glyph = square glyph_size = 3 fill_color = grey <rules> <rule> flow = stop </rule> </rules>

.

SHORT-CIRCUITING RULES

25 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-26
SLIDE 26

# 3/6/etc/circos.conf <rule> # 90% percentile condition = var(value) >= 0.489 fill_color = green flow = goto resize if true </rule> <rule> # 10% percentile condition = var(value) <= 0.416 fill_color = red flow = goto resize if true </rule> <rule> # within 1 std of mean condition = abs(var(value) - 0.455) < 0.01 fill_color = dgrey flow = goto resize if true </rule> <rule> tag = resize condition = 1 glyph_size = eval( remap_round( abs(var(value) - 0.455),0,0.1,5,20 )) z = eval( remap_round( abs(var(value) - 0.455),0,0.1,1,100 )) glyph = circle #flow = continue </rule>

.

COLORING AND RESIZING GLYPHS

26 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-27
SLIDE 27

# 3/6/etc/circos.conf <rule> condition = 1 ... flow = continue </rule> <rule> condition = 1 value = 0.47 </rule>

.

CHANGING DATA VALUES WITH RULES

27 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-28
SLIDE 28

GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

LESSON 7

plot counters

28

slide-29
SLIDE 29

.

.

PREPARING FOR AUTOMATION

29 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-30
SLIDE 30

# 3/7/etc/circos.conf h0 = 0.75 hs = 0.07 hw = 0.06

<plots> <plot> init_counter = h:1 type = heatmap file = ../data/heatmap.counter(h).txt r0 = eval(sprintf("%fr", conf(h0) + (counter(h)-1) * conf(hs) )) r1 = eval(sprintf("%fr", conf(h0) + (counter(h)-1) * conf(hs) + conf(hw) )) color = eval(sprintf("chr%s_a3",counter(h))) </plot> <plot> pre_increment_counter = h:1 type = heatmap file = ../data/heatmap.counter(h).txt r0 = eval(sprintf("%fr", conf(h0) + (counter(h)-1) * conf(hs) )) r1 = eval(sprintf("%fr", conf(h0) + (counter(h)-1) * conf(hs) + conf(hw) )) color = eval(sprintf("chr%s_a3",counter(h))) </plot>

COUNTERS

30 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-31
SLIDE 31

.

.

THREE AUTOMATED HEATMAPS

31 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-32
SLIDE 32

GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

LESSON 8

fully automated heatmaps

32

slide-33
SLIDE 33

# 3/8/etc/heatmap.conf <plot> pre_increment_counter = h:1 type = heatmap file = ../data/heatmap.counter(h).txt r0 = eval(sprintf("%fr", conf(h0) + (counter(h)-1) * conf(hs) )) r1 = eval(sprintf("%fr", conf(h0) + (counter(h)-1) * conf(hs) + conf(hw) )) color = eval(sprintf("chr%s_a3",counter(h))) stroke_thickness = 1 stroke_color = dgrey </plot>

TEMPLATE BLOCK

33 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-34
SLIDE 34

# 3/8/etc/circos.conf # repeated include of template configuration # # values based on counters # are dynamically populated <<include ../7/etc/heatmap.conf>> # mm1 <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> <<include ../7/etc/heatmap.conf>> # mm19

.

19 AUTOMATED HEATMAPS

34 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-35
SLIDE 35

# 3/8/etc/heatmap.conf color = eval(("black","red")[counter(h)%2])

.

USING COUNTER VALUES IN RULES

35 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation

slide-36
SLIDE 36

.

TITLE

36 GENOME VISUALIZATION WITH CIRCOS · Session 3 · Bundles and Automation