NelleV / moanin

Timecourse transcriptomic analysis
https://nellev.github.io/moanin/
Other
5 stars 0 forks source link

Definition of voom weights doesn't use the user defined group/variable #85

Closed epurdom closed 4 years ago

epurdom commented 4 years ago

The following code in DE_timecourse (line 221) fixed the previous problem with voom weights, but didn't incorporate the user-defined values of Group and timepoint creating an error:

    if(use_voom_weights){
        design <- stats::model.matrix(
            ~Group*Timepoint + 0,
            data=colData(object))

        y <- edgeR::DGEList(counts=assay(object))
        y <- edgeR::calcNormFactors(y, method="upperquartile")
        v <- limma::voom(y, design, plot=FALSE)
        weights <- v$weights
    }

Need to have a test that runs voom weights and make tests run user-defined columns everywhere to trigger these problems in future.