Skip to content

Commit

Permalink
refactor: ensure calls don't fail on Windows parallel processing
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Jan 16, 2025
1 parent 6f019fa commit 1da3646
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions R/functions-massbank.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@

for (i in seq(along = spec)) {
mb_sub <- mb[begin[i]:end[i]]
spec[[i]] <- .extract_mb_spectrum(mb_sub)
spec[[i]] <- MsBackendMassbank:::.extract_mb_spectrum(mb_sub)
if (metaBlocks$read[which(metaBlocks$metadata == "ac")])
ac[[i]] <- .extract_mb_ac(mb_sub)
ac[[i]] <- MsBackendMassbank:::.extract_mb_ac(mb_sub)
if (metaBlocks$read[which(metaBlocks$metadata == "ch")])
ch[[i]] <- .extract_mb_ch(mb_sub)
ch[[i]] <- MsBackendMassbank:::.extract_mb_ch(mb_sub)
if (metaBlocks$read[which(metaBlocks$metadata == "sp")])
sp[[i]] <- .extract_mb_sp(mb_sub)
sp[[i]] <- MsBackendMassbank:::.extract_mb_sp(mb_sub)
if (metaBlocks$read[which(metaBlocks$metadata == "ms")])
ms[[i]] <- .extract_mb_ms(mb_sub)
ms[[i]] <- MsBackendMassbank:::.extract_mb_ms(mb_sub)
if (metaBlocks$read[which(metaBlocks$metadata == "record")])
record[[i]] <- .extract_mb_record(mb_sub)
record[[i]] <- MsBackendMassbank:::.extract_mb_record(mb_sub)
if (metaBlocks$read[which(metaBlocks$metadata == "pk")])
pk[[i]] <- .extract_mb_pk(mb_sub)
pk[[i]] <- MsBackendMassbank:::.extract_mb_pk(mb_sub)
if (metaBlocks$read[which(metaBlocks$metadata == "comment")])
cmt[[i]] <- list(
comment = .extract_mb_comment(mb_sub))
comment = MsBackendMassbank:::.extract_mb_comment(mb_sub))
}

res <- DataFrame(do.call(rbind, spec))
Expand Down

0 comments on commit 1da3646

Please sign in to comment.