Skip to content

Commit

Permalink
v1.2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhang503 committed Mar 19, 2023
1 parent c3a9354 commit 8721385
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/scores.R
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,9 @@ calc_pepscores <- function (topn_ms2ions = 100L, type_ms2ions = "by",
rm(list = c("cache_pars", "call_pars"))
}

# to be deleted
# n_cores <- detect_cores(16L)

d2 <- calc_threeframe_ppm(ppm_ms2) * 1E-6

for (fi in list_i) {
Expand Down Expand Up @@ -817,6 +820,9 @@ calcpepsc <- function (file, topn_ms2ions = 100L, type_ms2ions = "by",
# -> res[[i]] <- NULL
# -> length(res) shortened by 1

# will be used again later
n_cores <- detect_cores(48L)

if (n_rows <= 5000L) {
probs <- calc_pepprobs_i(
df,
Expand All @@ -833,8 +839,7 @@ calcpepsc <- function (file, topn_ms2ions = 100L, type_ms2ions = "by",
else {
path_df <- file.path(tempdir, "df_sc_temp.rda")
max_rows <- 100000L

n_cores <- detect_cores(48L)

cl <- parallel::makeCluster(getOption("cl.cores", n_cores))
parallel::clusterExport(cl, list("calc_pepprobs_i", "scalc_pepprobs",
"calc_probi", "calc_probi_bypep",
Expand Down

0 comments on commit 8721385

Please sign in to comment.