stephenslab / susieR

R package for "sum of single effects" regression.
https://stephenslab.github.io/susieR
Other
176 stars 45 forks source link

Cross CS correlation #77

Closed gaow closed 3 years ago

gaow commented 5 years ago

Sometimes it is of interest (at least to me) to obtain some measure of correlation between every pair of CS reported. It is more of a diagnostic tool.

In this case we might be looking for the maximum absolute correlation. The most straighforward (maybe not the most efficient) implementation is something like the following:

  1. For each SNP j in Credible set A and each SNP k in Credible set B, compute abs(corr(X_j, X_k)). This will give a vector of length J times K.
  2. The maximum value in that vector is the quantity of interest.

There are certainly cases where this quantity does not make sense, for example if one obtains some 30% CS and ask for correlations between all these CS ... but for a reasonable set-up and as a debug tool, I find this would be a useful thing to do.