Skip to content

Commit

Permalink
Add file indexes to headers in getHeaders() return
Browse files Browse the repository at this point in the history
  • Loading branch information
jasenfinch committed Aug 11, 2023
1 parent eb8fdf0 commit 5b06581
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions R/get.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,26 @@ getPeaks <- function(files,scans){

getHeaders <- function(files){

idx <- tibble(
FileName = files
) %>%
rowid_to_column(var = 'idx')

available_header_temps <- availableHeaderTemps(files)

file_headers <- available_header_temps %>%
future_map(readRDS)

file_headers <- file_headers %>%
set_names(files) %>%
bind_rows(.id = 'FileName') %>%
select(FileName,acquisitionNum,totIonCurrent,polarity,filterString)
set_names(idx$idx) %>%
bind_rows(.id = 'idx') %>%
mutate(
idx = as.numeric(idx)
) %>%
left_join(idx,
by = 'idx') %>%
select(idx,FileName,acquisitionNum,totIonCurrent,polarity,filterString) %>%
as_tibble()

return(file_headers)
}
Expand Down

0 comments on commit 5b06581

Please sign in to comment.