Skip to content

Commit

Permalink
fixed ld extraction in run_carma
Browse files Browse the repository at this point in the history
  • Loading branch information
mglev1n committed Mar 16, 2024
1 parent 9d38a3c commit f6f72dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/run_carma.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ run_carma <- function(df, snp_col, z_col, effect_allele_col, bfile, threads = 1,

sumstat <- df

plink_extract_ld_possibly <- purrr::possibly(levinmisc::plink_extract_ld)

ld <- df %>%
plink_extract_ld(bfile = bfile, snp_col = {{snp_col}}, effect_allele_col = {{effect_allele_col}})
plink_extract_ld_possibly(bfile = bfile, plink_bin = plink_bin, snp_col = {{snp_col}}, effect_allele_col = {{effect_allele_col}})

if(is.null(ld)) {
return(sumstat %>% mutate(ld_error = TRUE))
Expand Down
4 changes: 3 additions & 1 deletion dev/flat_genomics_functions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,10 @@ run_carma <- function(df, snp_col, z_col, effect_allele_col, bfile, threads = 1,
sumstat <- df
plink_extract_ld_possibly <- purrr::possibly(levinmisc::plink_extract_ld)
ld <- df %>%
plink_extract_ld(bfile = bfile, snp_col = {{snp_col}}, effect_allele_col = {{effect_allele_col}})
plink_extract_ld_possibly(bfile = bfile, plink_bin = plink_bin, snp_col = {{snp_col}}, effect_allele_col = {{effect_allele_col}})
if(is.null(ld)) {
return(sumstat %>% mutate(ld_error = TRUE))
Expand Down

0 comments on commit f6f72dd

Please sign in to comment.