Skip to content

Conversation

@golharam
Copy link
Contributor

@golharam golharam commented Oct 29, 2025

This PR add GET "/{project_id}/samples/download" and POST "/{project_id}/samples/upload" endpoints

Ryan Golhar added 2 commits October 29, 2025 16:06
Copy link
Contributor

@EricSDavis EricSDavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ✅ Download functionality works well.
  • ❌ Re-uploading the same samplesheet to a project results in a 500 integrity error for samples. This could be problematic if a user wants to make partial edits to a samplesheet and re-upload it.
    • 📝 Update add_sample_to_project() to check for existing samples/sample attributes and make edits, rather than attempting to create a new sample which triggers an error.
  • ℹ️ Uploading a samplesheet takes a long time. Not sure if there is a more efficient way than calling put/post requests to opensearch with each sample addition - maybe doing this as a batch?
  • 🙏 Request addition of an endpoint to delete/unlink sample/samplesheet? Users otherwise have no way to remove samples linked to a project.

@golharam
Copy link
Contributor Author

  1. If we upload a samplesheet that is missing a sample that currently exists in SamplesDB, what does that mean? Does it mean deleting the sample? Does it mean leaving it alone?
  2. How will we track changes being performed?

@golharam
Copy link
Contributor Author

The upload functionality is to reset the sample metadata for all samples in the project.

@golharam golharam requested a review from EricSDavis October 30, 2025 22:42
@golharam golharam marked this pull request as draft October 30, 2025 22:42
@golharam golharam removed the request for review from EricSDavis October 30, 2025 22:42
@golharam
Copy link
Contributor Author

When a samplesheet is uploaded, we can scan the bucket to ensure fastq file are present for the sample. If they are not, the sample can be highlighted in red.

@golharam
Copy link
Contributor Author

Also, the user should be able to re-scan the bucket to auto-populate the samplesheet, then they can download the auto-created samplesheet to populate with metadata and re-upload.

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.

Add endpoint to upload file of sample metadata Add endpoint to download samples metadata

3 participants