Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Adafede committed Jul 22, 2023
1 parent 1317ba0 commit 3726540
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/create_edges_parallel.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ create_edges_parallel <- function(index,
frags = frags,
precs = precs
) |>
dplyr::bind_rows()
tidytable::bind_rows()
return(list)
}
11 changes: 10 additions & 1 deletion R/create_edges_spectra.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ create_edges_spectra <- function(
precz <- spectra$precursorMz
fragz <- spectra@backend@peaksData
## Originally written with future but too slow...TODO investigate
## TODO investigate weird error
zzz <- lapply(
X = 2:1,
FUN = create_edges_progress,
query = 1,
s1 = cbind(mz = fragz[[1]][, 1], intensity = fragz[[1]][, 2]),
frags = fragz,
precs = precz
)
edges <- pbmcapply::pbmclapply(
X = 1:(nspecz - 1),
mc.cores = parallelly::availableCores(),
Expand All @@ -103,7 +112,7 @@ create_edges_spectra <- function(
precs = precz,
nspecs = nspecz
) |>
dplyr::bind_rows()
tidytable::bind_rows()

## old version, keep in case
# par <- if (parallel) {
Expand Down

0 comments on commit 3726540

Please sign in to comment.