Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slash characters in investigation title not sanitized for assay file names #37

Closed
mikkonie opened this issue Feb 8, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@mikkonie
Copy link
Contributor

mikkonie commented Feb 8, 2024

Describe the Bug

Something originally noticed in SODAR, see bihealth/sodar-server#1896.

If one or more / characters are present in the investigation title, they get carried over to assay file names. This causes an error when Cookiecutter creates a file, as the slash gets intepreted as a path to a folder.

How to Reproduce

Enter a slash character / in the investigation title and try to create the ISA-Tab.

Expected Behavior

We should replace the slash characters with e.g. underscore when forming the assay file name. When entered into the actual investigation file, these characters should be allowed in the investigation title, as AFAIK they are not forbidden by ISA-Tab.

Notes

In Unix/Linux, / should be the only forbidden ASCII character, so we shouldn't have to worry about other special characters.

@mikkonie mikkonie added the bug Something isn't working label Feb 8, 2024
@mikkonie
Copy link
Contributor Author

mikkonie commented Feb 8, 2024

I noticed this does not actually happen consistently with all templates. For cytof a slash in investigation title works, because it uses the investigation identifier instead of the investigation title for the file name. A slash in the ID does cause the same error however.

For the stem cell core templates this works, as the use the study title and correctly replace the slash characters.

sellth added a commit that referenced this issue Feb 9, 2024
Co-authored-by: Thomas Sell <thomas.sell@bih-charite.de>
@sellth
Copy link
Collaborator

sellth commented Feb 9, 2024

closed via #38

@sellth sellth closed this as completed Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants