Skip to content

Commit

Permalink
add log file
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlkx committed Jul 23, 2024
1 parent 7230031 commit 628ec76
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Type: Package
Title: Adjusting for Genetic Confounders in Transcriptome-Wide Association
Studies Improves Discovery of Risk Genes of Complex Traits
Date: 2024-06-14
Version: 0.3.10
Version: 0.3.11
Authors@R: c(person("Siming","Zhao",role="aut",email="siming.zhao06@gmail.com"),
person("Wesley","Crouse",role="aut"),
person("Sheng","Qian",role="aut",email="shengqian@uchicago.edu"),
Expand Down
7 changes: 5 additions & 2 deletions R/ctwas_merge_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ merge_region_data <- function(boundary_genes,
logfile = NULL,
...) {

# Identify overlapping regions and get a list of regions to be merged
loginfo("Identify overlapping regions and get region_info for merged regions.")
if (!is.null(logfile)){
addHandler(writeToFile, file= logfile, level='DEBUG')
}

# Identify overlapping regions and get a list of regions to be merged
loginfo("Identify overlapping regions and create merged snp_map and LD_map.")
res <- create_merged_snp_LD_map(boundary_genes,
region_info = region_info,
snp_map = snp_map,
Expand Down
8 changes: 0 additions & 8 deletions R/ctwas_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ read_var_info <- function(var_info_file){

# run mclapply and stop if not all cores delivered results
mclapply_check <- function(X, FUN, mc.cores = 1){

if (length(X) <= 1 || mc.cores == 1) {
lapply(X, FUN)
} else {
Expand All @@ -229,13 +228,6 @@ mclapply_check <- function(X, FUN, mc.cores = 1){
}
)
}

}

# # check mclapply result
# check_mc_res <- function(x){
# if (any(sapply(x, is.null))) {
# stop("Not all cores returned results. Try rerun with bigger memory or fewer cores")
# }
# }

0 comments on commit 628ec76

Please # to comment.