Skip to content

Commit

Permalink
Update susie.R - fix #147
Browse files Browse the repository at this point in the history
  • Loading branch information
chr1swallace authored Apr 10, 2024
1 parent e7e5d67 commit cdb9760
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/susie.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ coloc.susie=function(dataset1,dataset2, back_calculate_lbf=FALSE, susie.args=lis
s2=do.call("runsusie", c(list(d=dataset2,suffix=2),susie.args))
cs1=s1$sets
cs2=s2$sets
if(is.null(cs1$cs) || is.null(cs2$cs) || length(cs1$cs)==0 || length(cs2$cs)==0 )
if(is.null(cs1$cs) || is.null(cs2$cs) || length(cs1$cs)==0 || length(cs2$cs)==0 ) {
warning("at least one dataset has no credible sets, nothing to colocalise")
return(data.table(nsnps=NA))
}

idx1=cs1$cs_index
idx2=cs2$cs_index
Expand Down

0 comments on commit cdb9760

Please sign in to comment.