While performing co-expression analysis of my RNA seq data, I tried to remove non differentially expressed genes using limma, but I am getting a warning. Please help me out. My RNA seq count data is "hep"
# >hep <- read.csv("hep.csv")
>log_counts <- log2(data.matrix(hep[,-1]))
> sample <- factor(rep(c("Non.neoplastic","Tumor"), each=21))
> design.mat <- model.matrix(~0+sample)
> colnames(design.mat) <- levels(sample)
> contrast.mat <- makeContrasts(diff = "Non.neoplastic-Tumor", levels = design.mat)
> fit <- lmFit(log_counts, design.mat)
> fit2 <- contrasts.fit(fit, contrast.mat)
> fit3 <- eBayes(fit2)
# Warning:
Zero sample variances detected, have been offset away from zero
Since you have a question ongoing on biostars https://www.biostars.org/p/9463542/ where one can see a shapshot of the data...I would assume that this is raw counts that you transform here and feed to limma? Did you normalize this? It is strongly recommended to exactly follow code from the manual if you are new to the topic. This would include the prefiltering step that is mentioned below. Something like https://f1000research.com/articles/5-1408/v3
After performing log transformation, I tried to remove any genes with _zero_ variance through this code
Even then, I am getting Zero variation in genes
Not good, please follow the linked workflow. It covers normalization, filtering and data transformation via voom, so all the topics that are currently lacking or not done properly.