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

Nextflow Samplesheet: File Selector #879

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

ChrisHuynh333
Copy link
Collaborator

@ChrisHuynh333 ChrisHuynh333 commented Dec 30, 2024

What does this PR do and why?

This PR is for story STRY0016505, which requested the nextflow samplesheet be populated with the most recent uploaded file, and to add the uploaded time of each file to its respective listing.

Having filename + created date within the original dropdown selection looked very cumbersome and so, for a better user experience, we decided to create a file selector so more file data could be displayed to the user.

Screenshots or screen recordings

Samplesheet (attachments selection no longer a dropdown)
image

File Selector:
image

How to set up and validate locally

Test selecting paired-end files:

  1. Use or create a sample, and upload multiple paired-end attachments to the sample. Note the file ordering based on upload time.
  2. Select the above sample and launch a workflow (any version)
  3. Verify the most recent files are selected by default.
  4. Within either the fastq_1 or fastq_2 fields, click the file to open the file selector.
  5. Within the file selector, from top down, verify the file ordering is from most recent to oldest upload time.
  6. Verify the correct attachment was displayed as selected.
  7. Select any other file than what was currently selected and submit
  8. Verify the selected field now has the selected attachment, and the paired-end field was also updated with the associated attachment.
  9. Submit the workflow execution and verify it contains the expected files.

Test selecting single-end files, default paired-end selection and No file selection:

  1. Use a seeded sample (with its seeded attachments), and upload non-paired fastq attachments to the sample (eg: only 1 of the 2 attachments of a paired-end).
  2. Select the above sample and launch a workflow (any version)
  3. Verify the seeded paired end files are selected by default even though they are not the most recent upload (paired-end selection is preferred over single end).
  4. Click the fastq_1 field, and verify all the uploaded attachments are included, and that there is no No file option (since fastq_1 is required).
  5. Select any of the attachments, and verify the fastq_1 field updates with the selection and fastq_2 remains unchanged.
  6. Click the fastq_2 field, and verify none of the uploaded attachments are included, and that there is a No file option. Select the No file option and verify the fastq_2 field was updated accordingly
  7. Submit the workflow execution and verify the attachments (fastq_1 contains the selected attachment and fastq_2 contains no attachment)

Test samplesheet validation of selected files and file selector empty state:

  1. Create a sample with no attachments
  2. Select the above sample and launch a workflow (any version)
  3. Verify both fastq_1 and fastq_2 attachment fields have no file selected.
  4. Submit the workflow
  5. Verify an error message occurs within the samplesheet dialog, and that only the fastq_1 field is highlighted in red, as fastq_2 is not required.
  6. Click either the fastq_1 or fastq_2 file field. Verify a no attachments message within the file selector, with no submit button.

Test file selector filtering:
1 Selected a seeded sample and launch a workflow (any version)
2. Click either the fastq_1 or fastq_2 attachment fields.
3. Verify reference.fasta is not displayed as it's not a fastq file.

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

@ChrisHuynh333 ChrisHuynh333 force-pushed the nextflow-samplesheet/file-selector branch from e7e565b to b02c3fc Compare January 6, 2025 23:48
@ChrisHuynh333 ChrisHuynh333 force-pushed the nextflow-samplesheet/file-selector branch from 012975c to 6f9cc82 Compare January 7, 2025 22:21
@ChrisHuynh333 ChrisHuynh333 self-assigned this Jan 8, 2025
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

Successfully merging this pull request may close these issues.

1 participant