13
Stefan Wyder 27. March 12 GGbio - grammar of graphics for genomic data

GGbio - grammar of graphics for genomic data

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GGbio - grammar of graphics for genomic data

Stefan Wyder

27. March 12

GGbio - grammar of graphics

for genomic data

Page 2: GGbio - grammar of graphics for genomic data

What is ggplot2 A high-level R package for creating statistical graphics

also for summarizing and transforming data

inspired by „The Grammar of Graphics“Leland Wikinson 1999

INTERACTIVE!! Build plots iteratively and edit them later

Minimize the code needed

Build your new types of display

Page 3: GGbio - grammar of graphics for genomic data

ggplot – even more functionality

ggplot(aes(carat, price), data=diamonds) + geom_point() + facet_grid(color ~ .)

ggplot(aes(carat, price, col=color), data=diamonds) + ylab("dollars") + xlim(c(0,2)) + geom_point()

Geom

Facet

x y

Page 4: GGbio - grammar of graphics for genomic data

What is GGbio

• Extension and specialization of ggplot2

• for data types often used with genomic high-throughput data(Sequence data, Annotation, Chromosome PlotsGWAS/Manhattan Plot)

horizontal axis: genomic coordinatesFacets: chromosome or chromosome regions

• progressing fast, documentation not always updated – check regularly

Page 5: GGbio - grammar of graphics for genomic data

Data Structure>library(ggplot2)>library(ggbio)

Page 6: GGbio - grammar of graphics for genomic data

Functions

Page 7: GGbio - grammar of graphics for genomic data

Example 1 – Seq data

Page 8: GGbio - grammar of graphics for genomic data

Example 1 – Faceting

Page 9: GGbio - grammar of graphics for genomic data
Page 10: GGbio - grammar of graphics for genomic data

Example 2 – Annotation

Page 11: GGbio - grammar of graphics for genomic data

Example 3

Page 12: GGbio - grammar of graphics for genomic data

More info

http://tengfei.github.com/ggbio/

Installation

source("http://bioconductor.org/biocLite.R")biocLite("ggbio")

Page 13: GGbio - grammar of graphics for genomic data

Future of Ggplot2

• see Webinar by Hadley (who wrote Ggplot2)

www.revolutionanalytics.com/news-events/free-webinars/2012/ggplot2-with-hadley-wickham

• making it faster• Maps