Skip to content

Instantly share code, notes, and snippets.

@michaelbarton
Created February 28, 2010 23:56
Show Gist options
  • Save michaelbarton/317935 to your computer and use it in GitHub Desktop.
Save michaelbarton/317935 to your computer and use it in GitHub Desktop.
isolate type size
KY485 size 11.2
R124 size 7.3
Pf-5 size 7.07
SBW25 size 6.72
Pf0-1 size 6.44
KY485 coverage 5
R124 coverage 6.3
Pf-5 coverage 0
SBW25 coverage 0
Pf0-1 coverage 0
#! /usr/bin/Rscript
library(ggplot2)
data = read.csv(file='genome_size.csv',header=T,sep=',')
strains <- as.ordered(1:5)
levels(strains) <- c("KY485","R124","Pf-5","SBW25","Pf0-1")
data$isolate <- factor(data$isolate,strains)
types <- as.ordered(1:2)
levels(types) <- c("size","coverage")
data$type <- factor(data$type,types)
c <- ggplot(data,aes(x=isolate,y=size,fill=type))
c <- c + geom_bar(position="identity")
c <- c + scale_fill_grey("Genome", start=0.5, end=0.2) + theme_bw()
c <- c + scale_y_continuous("Genome (MBp)")
c <- c + scale_x_discrete(
expression(paste(italic("Pseudomonas fluorescens")," isolate"))
)
postscript("coverage.eps",width=6,height=3,onefile=FALSE,horizontal=FALSE, paper = "special",colormodel="rgb")
print(c)
graphics.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment