Created
August 25, 2020 18:20
-
-
Save GabrielHoffman/8f8638f038ab3d48ffe42d954fa3c5d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(edgeR) | |
library(variancePartition) | |
dge = DGEList( counts = NEW.COUNTS ) | |
dge = calcNormFactors(dge) | |
# standard design | |
form = ~ Dx + scale(RIN) + ageOfDeath + Reported_Gender + scale(IntronicRate) + scale(IntragenicRate) + scale(IntergenicRate) | |
design = model.matrix(form, COVARIATES) | |
# standard voom and lmFit | |
vobj = voomWithDreamWeights(dge, form, COVARIATES) | |
fit = dream(vobj, form, info, computeResiduals=TRUE) | |
# fit = eBayes(fit) # if only fixed effects | |
residExpression = residuals(fit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment