premessa icon indicating copy to clipboard operation
premessa copied to clipboard

Regex does not find files.

Open cwlkr opened this issue 1 year ago • 1 comments

Hi there,

Using premessa panel editor and selecting a file in a folder containing "PATHWITHDRIVE/FILENAME.FCS" files, we had the issue that no files were found by premessa, which resulted in an error in line 35 of file paneleditor_shinyGUI/server.R: names(panel.table)[2] <- "Most common" as panel.table is empty.

Debugging the application I found this line (line 58 paneleditor_shinyGUI/server.R ) that did not return any files, just NULL. files.list <- list.files(working.directory, pattern = "*.fcs$", ignore.case = T)

The pattern argument in list.files as I understand is expected to be regex and not a glob expansion. Should the correct regex pattern then not be: pattern = ".*\.fcs$"?

I don't really know why this was an issue for us and not others, but this change resulted in the application working for us, but it might be a windows specific issue.

Checked premessa versions: 0.3.2, 0.3.4/ R version 4.1.1 / operating system windows 10

Thanks and best, cwlkr

cwlkr avatar Dec 14 '22 11:12 cwlkr