### voom + limma

Data file: B_625_625_5spc_repl1.rds

    require(limma)
    require(edgeR)
    cdata <- readRDS("B_625_625_5spc_repl1.rds")
    is.valid <- check_compData(cdata)
    if (!(is.valid == TRUE)) stop("Not a valid compData object.")
    nf <- edgeR::calcNormFactors(count.matrix(cdata), method = "TMM")
    voom.data <- limma::voom(count.matrix(cdata), design = model.matrix(~factor(sample.annotations(cdata)$condition)),
        lib.size = colSums(count.matrix(cdata)) * nf)
    voom.data$genes <- rownames(count.matrix(cdata))
    voom.fitlimma <- limma::lmFit(voom.data, design = model.matrix(~factor(sample.annotations(cdata)$condition)))
    voom.fitbayes <- limma::eBayes(voom.fitlimma)
    voom.pvalues <- voom.fitbayes$p.value[, 2]
    voom.adjpvalues <- p.adjust(voom.pvalues, method = "BH")
    voom.logFC <- voom.fitbayes$coefficients[, 2]
    voom.score <- 1 - voom.pvalues
    result.table <- data.frame(pvalue = voom.pvalues, adjpvalue = voom.adjpvalues,
        logFC = voom.logFC, score = voom.score)
    rownames(result.table) <- rownames(count.matrix(cdata))
    result.table(cdata) <- result.table
    package.version(cdata) <- paste("limma,", packageVersion("limma"), ";", "edgeR,",
        packageVersion("edgeR"))
    analysis.date(cdata) <- date()
    method.names(cdata) <- list(short.name = "voom", full.name = "voom.3.18.11.limma.TMM")
    is.valid <- check_compData_results(cdata)
    if (!(is.valid == TRUE)) stop("Not a valid compData result object.")
    saveRDS(cdata, "/Users/charlotte/Documents/Projects/Rpackages/compcoder/compcodeR/vignettes/B_625_625_5spc_repl1_voom.limma.rds")
    print(paste("Unique data set ID:", info.parameters(cdata)$uID))

    [1] "Unique data set ID: B6Wo1X5LIQ"

    sessionInfo()

    R version 3.0.2 (2013-09-25)
    Platform: x86_64-apple-darwin10.8.0 (64-bit)

    locale:
    [1] sv_SE.UTF-8/sv_SE.UTF-8/sv_SE.UTF-8/C/sv_SE.UTF-8/sv_SE.UTF-8

    attached base packages:
     [1] splines   parallel  tcltk     stats     graphics  grDevices utils
     [8] datasets  methods   base

    other attached packages:
     [1] compcodeR_0.99.1        genefilter_1.44.0
     [3] TCC_1.2.0               ROC_1.38.0
     [5] samr_2.0                matrixStats_0.8.14
     [7] impute_1.36.0           NOISeq_2.4.0
     [9] NBPSeq_0.1.8            qvalue_1.36.0
    [11] HTSDiff_1.0.1           HTSCluster_2.0.1
    [13] RColorBrewer_1.0-5      ggplot2_0.9.3.1
    [15] plotrix_3.5-3           edgeR_3.4.2
    [17] limma_3.18.11           EBSeq_1.2.0
    [19] gplots_2.12.1           blockmodeling_0.1.8
    [21] DSS_1.8.0               locfdr_1.1-7
    [23] DESeq2_1.2.10           RcppArmadillo_0.4.000.2
    [25] Rcpp_0.11.0             DESeq_1.14.0
    [27] lattice_0.20-24         locfit_1.5-9.1
    [29] Biobase_2.22.0          baySeq_1.16.0
    [31] GenomicRanges_1.14.4    XVector_0.2.0
    [33] IRanges_1.20.6          BiocGenerics_0.8.0
    [35] rpanel_1.1-2            sm_2.2-5.4
    [37] roxygen2_3.1.0          devtools_1.5

    loaded via a namespace (and not attached):
     [1] annotate_1.40.0      AnnotationDbi_1.24.0 bitops_1.0-6
     [4] brew_1.0-6           bsseq_0.10.0         caTools_1.16
     [7] codetools_0.2-8      colorspace_1.2-4     DBI_0.2-7
    [10] dichromat_2.0-0      digest_0.6.4         evaluate_0.5.1
    [13] formatR_0.10         gdata_2.13.2         geneplotter_1.40.0
    [16] grid_3.0.2           gtable_0.1.2         gtools_3.2.1
    [19] httr_0.2             KernSmooth_2.23-10   knitr_1.5
    [22] labeling_0.2         markdown_0.6.4       MASS_7.3-29
    [25] memoise_0.1          modeest_2.1          munsell_0.4.2
    [28] plyr_1.8             proto_0.3-10         R.methodsS3_1.6.1
    [31] RCurl_1.95-4.1       reshape2_1.2.2       ROCR_1.0-5
    [34] RSQLite_0.11.4       scales_0.2.3         stats4_3.0.2
    [37] stringr_0.6.2        survival_2.37-7      tools_3.0.2
    [40] vioplot_0.2          whisker_0.3-2        XML_3.95-0.2
    [43] xtable_1.7-1