Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyone use this to calculate LD matrix for coloc-susie? Is there a bug in ld_matrix_local? #66

Open
laleoarrow opened this issue Apr 16, 2024 · 0 comments

Comments

@laleoarrow
Copy link

laleoarrow commented Apr 16, 2024

Here is my code for this susie-coloc, but the ld matrix seems a bit unusual as indicated by warning from susie:

In susie_suff_stat(XtX = XtX, Xty = Xty, n = n, yty = (n - 1) *  :
  IBSS algorithm did not converge in 100 iterations!
                  Please check consistency between summary statistics and LD matrix.
                  See https://stephenslab.github.io/susieR/articles/susierss_diagnostic.html

my code

x = out[[1]]
x = as.data.frame(x) # list can trans into a matrix directly but df would be just fine
# dim(x)
colnames(x)
x = TwoSampleMR::format_data(x, type = "exposure",
                             # phenotype_col = "Phenotype",
                             snp_col = "snp",
                             chr_col = "chr",
                             pos_col = "position",
                             effect_allele_col = "A1",
                             other_allele_col = "A2",
                             # eaf_col = "EAF",
                             beta_col = "beta",
                             # se_col = "SE",
                             pval_col = "pvalues",
                             min_pval = 1e-400
                             )
ld <- ieugwasr::ld_matrix_local(
  x$SNP,
  bfile = bfile,
  plink_bin = plinkbinr::get_plink_exe(),
  with_alleles = T
)
x2 = harmonise_ld_dat(x, ld)
susie_fit = susie_rss(x2$x$z.exposure, x2$ld, n=500) # unusual result, can not converge
@laleoarrow laleoarrow changed the title oloc Anyone use this to calculate LD matrix for coloc-susie? Is there a bug in ld_matrix_local? Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant