adjusting for confounding factors in Spearman correlation?
1
1
Entering edit mode
15 months ago
diogo.moraes ▴ 10

Hello

I have a large heterogeneous dataset (n~1000) with gene expression and weight. The age ranges vary from 18-80 years old, there are both men and women. I would like to find genes that correlate with weight regardless of sex and age. Because there are differences in weight between men, women and some age ranges, I have decided to stratify the samples, run Spearman's correlation using sapply on each group and look for common significant genes. However, this also reduces sample size of each test. Is there any other way to deal with these confounding factors besides stratification?

Best, Diogo

sapply spearman r • 511 views
3
Entering edit mode
15 months ago
Papyrus ★ 2.2k

I understand you are specifically interested in Spearman correlation? If not, you could always do a linear model in limma-voom or DESeq2, etc. to test the effect of the gene expression ~ weight relationship, while including sex and age in the model.

Aside from that, for any analysis for which you can't adjust for covariates in a model, you can always regress-out the effect of sex and age from your data prior to the analysis, using for example the removeBatchEffect function from limma (if your data is count based, you can transform it to log-scale through DESeq2, for example, prior to regressing-out covariates, so that their distribution is more normal/homoscedastic).