plotInsert <- function(data)
{
df1 <- data.frame(SIZE=rep(data$SIZE, data$SAMPLE_COUNT), Label="Sample")
df2 <- data.frame(SIZE=rep(data$SIZE, data$SEQUIN_COUNT), Label="Sequin")
df3 <- rbind(df1, df2)
df3 <- df3[df3$SIZE > 10 & df3$SIZE < 1000,]
p <- ggplot(data=df3, aes(x=SIZE)) + geom_density(aes(colour=Label)) + xlab("Insertion Size") + ylab("Density") + theme_bw()
suppressWarnings(print(.transformPlot(p)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.