I have cohort RNA sequencing data and clinical traits. Is the given code below fine to normalize and correct for Batch effect. For further analysis can we subject the processed matrix to WGCNA directly?
You are asking for analysis advice on a support site meant for technical advice for using Bioconductor packages (WGCNA is not part of Bioconductor). Ideally you would ask this sort of question on biostars.org instead.
What you have done will remove any batch effects that can be captured as the mean of a batch. You could also consider using RUVseq or ComBat in sva, which can adjust for differences in variability between batches as well. You might also consider using cqn, since WGCNA is making inter-gene comparisons. It's your analysis though, so you have to decide what you think is best.
Apologies for asking the analysis question here and thank you for the response.