Skip to content

Regex does not find files. #49

@cwlkr

Description

@cwlkr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions