Skip to content

Commit

Permalink
Fix "object 'need_chrpos' not found" error
Browse files Browse the repository at this point in the history
Responding to issue n-mounier#12
  • Loading branch information
lcpilling authored Nov 1, 2023
1 parent 23c9bec commit c6765db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/MRlap.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ MRlap <- function(exposure,
hm3 = normalizePath(hm3)
} else stop("hm3 : wrong format, should be character", call. = FALSE)

## default is to need the CHR:POS info. Only exception is if using local Plink clumping
need_chrpos=TRUE

## user-provided SNP list?
if (!do_pruning){
Expand Down Expand Up @@ -145,7 +147,6 @@ MRlap <- function(exposure,
if(MR_pruning_LD<0) stop("MR_pruning_LD : should be positive", call. = FALSE)
if(MR_pruning_LD>1) stop("MR_pruning_LD : should not be larger than 1", call. = FALSE)

need_chrpos=TRUE
if(MR_pruning_LD>0){
if(verbose) cat("The LD threshold used for pruning MR instruments is:", MR_pruning_LD, "\n")
if(!is.null(MR_plink)){
Expand Down

0 comments on commit c6765db

Please sign in to comment.