petter_s — Apr 12, 2016, 2:31 PM
# price per gb/month google genomics
price=0.022
#bam per sample to store in gb
sampleSize = 0.2
nSamp=seq(0,1e5,by=1000)
x1 <- data.frame(nSamp=nSamp,Storage_3y= 36*price*sampleSize*nSamp,Storage_10y=120*price*sampleSize*nSamp)
require(reshape)
Loading required package: reshape
Loading required package: plyr
Attaching package: 'reshape'
The following objects are masked from 'package:plyr':
rename, round_any
x1.m <- melt(x1,id.vars="nSamp")
require(ggplot2)
Loading required package: ggplot2
ggplot(x1.m, aes(x=nSamp,y=value,col=variable)) + ylab("Cost/year [$]")+
geom_line()