R/plotInsert.R

Defines functions plotInsert

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)))
}
sequinstandards/RAnaquin documentation built on Aug. 9, 2019, 2:46 p.m.