diff --git a/DESCRIPTION b/DESCRIPTION index a0a472c..e23cae6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: chromConverter Title: Chromatographic File Converter -Version: 0.7.0 +Version: 0.7.1 Authors@R: c( person(given = "Ethan", family = "Bass", email = "ethanbass@gmail.com", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index a188c49..e152329 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +## chromConverter 0.7.1 + +* Fix automatic file detection for directories (e.g., Waters `.raw` and Agilent `.D`) + ## chromConverter 0.7.0 ### Major features diff --git a/R/utils.R b/R/utils.R index 36a8d44..589d1bf 100644 --- a/R/utils.R +++ b/R/utils.R @@ -258,7 +258,8 @@ format_to_extension <- function(format_in){ #' @noRd find_files <- function(paths, pattern){ files <- unlist(lapply(paths, function(path){ - files <- list.files(path = path, pattern = pattern, + dirs <- ifelse(pattern %in% c("\\.raw$", "\\.d$"), TRUE, FALSE) + files <- list.files(path = path, pattern = pattern, include.dirs = dirs, full.names = TRUE, recursive = TRUE, ignore.case = TRUE) if (length(files)==0){ if (!dir.exists(path)){ diff --git a/README.md b/README.md index c446fd0..8ef0772 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ Thermo RAW files can be converted by calling the [ThermoRawFileParser](https://g [OpenChrom](https://lablicate.com/platform/openchrom) is open source chromatography software, containing a large number of file parsers, which can now be conveniently accessed directly from R. Strangely, configuring OpenChrom for use on the command-line deactivates the graphical user interface (GUI). Thus, it is recommended to make a separate copy of OpenChrom if you'd still like to access the GUI. To use the OpenChrom parsers, follow the steps detailed below: -1) Download [OpenChrom](https://lablicate.com/platform/openchrom/download) (**version 1.4.x only**) and place it into a directory of your choice. +1) Download [OpenChrom](https://lablicate.com/platform/openchrom/download) (**version ≤ 1.4**) and place it into a directory of your choice. 2) If you intend to use the GUI in the future, it is recommended to make a separate copy of OpenChrom for command-line use. 3) Call `read_chroms` with `parser = "openchrom"`. The first time you call the parser, you may be asked to provide the path to your local installation of OpenChrom. The path will then be saved for future use. If the command-line interface is disabled, you will be given the option to automatically activate the command-line. Alternatively, the command-line option can be activated from R by calling `configure_openchrom(cli = "true")` or following the [instructions](https://github.com/OpenChrom/openchrom/wiki/CLI) to manually activate the CLI. This process can be reversed using the same function: e.g. `configure_openchrom(cli = "false"). To specify an OpenChrom executable in a non-standard location, call `configure_openchrom` with the `path` argument, e.g. `configure_openchrom(cli = "true", path = "path_to_openchrom_executable"). diff --git a/inst/CITATION b/inst/CITATION index f0e6170..9c1ecf5 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -5,7 +5,7 @@ bibentry( title = "chromConverter: Chromatographic File Converter", author = "Ethan Bass", year = "2024", - version = "version 0.7.0", + version = "version 0.7.1", doi = "10.5281/zenodo.6792521", url = "https://ethanbass.github.io/chromConverter/", textVersion = paste("Bass, E. (2024).",