I would like to adjust my RNAseq dataset for GC content.
I used EDASeq to calculate the offset.
data <-newSeqExpressionSet(counts=as.matrix(d$counts),featureData=feature,phenoData=data.frame(pheno),row.names=rownames(d)) dataOffset <- withinLaneNormalization(data,"gc", which="full",offset=TRUE) offset <- offst(dataOffset)
My goal is to incorporate “GC offset” into my edgeR pipeline (not to override edgeR calculated offset).
I found some suggestions online but I am not sure I am doing right.
d <- calcNormFactors(d, robust=TRUE, method ="TMM", offset=offset) d <- estimateDisp(d, design,) fit <- glmFit(d, design) summary(decideTests(lrt)) topTags(lrt)
Would you please advise?
Thanks a lot,