Skip to content

Commit

Permalink
Fix COLOC2 null check to be more extensive
Browse files Browse the repository at this point in the history
  • Loading branch information
frewmack committed Feb 8, 2023
1 parent b05e07f commit f2e2513
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coloc2/functions_coloc_likelihood_summary_integrated2.R
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ if (!file.exists(outfolder)) dir.create(outfolder)
rsq_filter = 0.6 #Imputation quality filter applied to datasets

###
if (!is.null(biom.df$type) && unique(biom.df$type) == "cc") cc=TRUE else cc=FALSE
if (!is.na(biom.df$type) && !is.null(biom.df$type) && unique(biom.df$type[which(!is.na(biom.df$type) && !is.null(biom.df$type))]) == "cc") cc=TRUE else cc=FALSE

maf.eqtl = ifelse("MAF" %in% names(eqtl.df), TRUE, FALSE)
maf.biom = ifelse("MAF" %in% names(biom.df), TRUE, FALSE)
Expand Down Expand Up @@ -976,7 +976,7 @@ if (!file.exists(outfolder)) dir.create(outfolder)
rsq_filter = 0.6 #Imputation quality filter applied to datasets

###
if (!is.null(biom.df$type) && unique(biom.df$type) == "cc") cc=TRUE else cc=FALSE
if (!is.na(biom.df$type) && !is.null(biom.df$type) && unique(biom.df$type[which(!is.na(biom.df$type) && !is.null(biom.df$type))]) == "cc") cc=TRUE else cc=FALSE
#if (all(c("CHR", "POS") %in% names(biom.df))) haveCHRPOS.biom=TRUE else haveCHRPOS.biom=FALSE
#if (all(c("CHR", "POS") %in% names(eqtl.df))) haveCHRPOS.eqtl=TRUE else haveCHRPOS.eqtl=FALSE
maf.eqtl = ifelse("MAF" %in% names(eqtl.df), TRUE, FALSE)
Expand Down

0 comments on commit f2e2513

Please sign in to comment.