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

Launch pipeline regex fails #674

Closed
edmundmiller opened this issue Jul 18, 2021 · 9 comments
Closed

Launch pipeline regex fails #674

edmundmiller opened this issue Jul 18, 2021 · 9 comments

Comments

@edmundmiller
Copy link
Contributor

Describe the bug
When trying to launch a new workflow some of the regex check fail
image
But .csv Passes

To Reproduce
Steps to reproduce the behavior:

  1. Go to Launch Pipeline for rnaseq
  2. Add samplesheet.csv
  3. Scroll down to launch
  4. See error

Expected behavior
The regex passes because it ends in csv

Screenshots
image

Browser (please complete the following information):

  • OS: NixOS 21.05
  • Browser: Firefox
  • Version 88.0.1
@edmundmiller
Copy link
Contributor Author

I have a feeling it's either in

"pattern": "\\.csv$",

Or in the way the site parses it. It also seems to fail with anything that starts with \\. so the gtf or .gtf.gz for the gtf file also fails similarly.

@mashehu
Copy link
Contributor

mashehu commented Jul 21, 2021

Good catch! The problem is that the HTML form field wants the regex to match the whole string, therefore the pattern in the nextflow_schema.json needs to be updated. I guess \S*\.csv$ should be sufficient. Moving the issue to the RNAseq repo.

@mashehu mashehu transferred this issue from nf-core/website Jul 21, 2021
mashehu pushed a commit to mashehu/rnaseq that referenced this issue Jul 21, 2021
@mashehu mashehu mentioned this issue Jul 21, 2021
3 tasks
@mashehu mashehu closed this as completed Jul 21, 2021
@drpatelh
Copy link
Member

Thanks @mashehu ! Fancy giving the dev launcher a test-drive @emiller88 to double-check?

@edmundmiller
Copy link
Contributor Author

Gave it a run and it works great!

@ewels
Copy link
Member

ewels commented Jul 29, 2021

@mashehu I think that this is a website bug, not a pipeline schema issue.

JSON schema patterns should match partial strings unless I'm mistaken..?

@mashehu
Copy link
Contributor

mashehu commented Jul 29, 2021

Yes and no. We check for these by adding the regex into the pattern field for the respective input field. These are always checked against the whole string according to the HTML specs: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern#constraint_validation

@ewels
Copy link
Member

ewels commented Jul 29, 2021

Struggling to find the reference now, but I'm 90% sure I looked into this a few weeks ago when the same thing came up in the Tower launch interface..

@mashehu
Copy link
Contributor

mashehu commented Jul 29, 2021

By already matching the full string in the regex it should now be okay in the json-schema and in the form, no?

@ewels
Copy link
Member

ewels commented Jul 29, 2021

http://json-schema.org/draft/2020-12/json-schema-core.html#rfc.section.6.4

Finally, implementations MUST NOT take regular expressions to be anchored, neither at the beginning nor at the end. This means, for instance, the pattern "es" matches "expression".

This is from a more recent schema version but I think it still holds true. The validation from the Java library that we use within the pipeline certainly seems to behave this way anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants