Skip to content

Instantly share code, notes, and snippets.

@chasemc
Last active July 12, 2019 16:42
Show Gist options
  • Save chasemc/9391c733b8412c12ba0bc616a4edc275 to your computer and use it in GitHub Desktop.
Save chasemc/9391c733b8412c12ba0bc616a4edc275 to your computer and use it in GitHub Desktop.
converter <- function(inputDirectory,
ouputDirectory) {
a <- list.files(inputDirectory,
full.names = T)
b <- MALDIquantForeign::import(a,
centroided = FALSE)
nams <- paste0(tools::file_path_sans_ext(basename(a)), ".mzML")
for (i in seq_along(nams)) {
MALDIquantForeign::exportMzMl(b[[i]],
file.path(ouputDirectory,
nams[[i]]))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment