abyss-dbgfm NC_000913

Load libraries

library(lattice)

Read data

data <- read.table('NC_000913.tab', header = TRUE)

Fit a linear model

lm <- lm(time ~ k, data)

Plot time vs. k

xyplot(time ~ k, data, type = c('p', 'r'),
    panel = function(...) {
        panel.xyplot(...)
        panel.text(data$k[1], lm$coefficients[1],
            paste('Intercept, Slope', toString(lm$coefficients), sep='\n'))
        },
    xlim = c(0, 1.1*max(data$k)),
    ylim = c(0, 1.1*max(data$time)),
    main = 'abyss-dbgfm NC_000913 Time vs. k',
    xlab = 'Size of a k-mer',
    ylab = 'Time (s)')

plot of chunk plot