Skip to content

Commit

Permalink
close file connection for file header retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
jasenfinch committed Feb 17, 2021
1 parent eba7578 commit 907499a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions R/get.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@ getHeaders <- function(files){

headers <- files %>%
future_map(~{
.x %>%
openMSfile(backend = 'pwiz') %>%
ms <- .x %>%
openMSfile(backend = 'pwiz')

file_header <- ms %>%
header()

close(ms)

return(file_header)
}) %>%
set_names(files) %>%
bind_rows(.id = 'FileName') %>%
Expand Down

0 comments on commit 907499a

Please sign in to comment.