[BIOMAGE-1965] - Fix rerunning of embedding in old experiments #372
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Problem
Embedding resets on some experiments when the page is refreshed.
Cause
This happens because the UI fails to generate the correct ETag to get previously calculated embedding. A parameter of the calculation is the time the QC pipeline was last run. This is usually retrieved from the pipeline execution history from AWS. Unfortunately, AWS only keeps 90 days of execution history. To remedy this, the API dynamically generates a date. This results in the pipeline last run date to be different everytime the page is refreshed for experiments whose execution history is erased, i.e. pipelines that are executed more than 90 days ago.
Solution
API V2 actually stores the last execution history of the pipeline in the database and will return this if the pipeline is not found. However, there are experiments which has been run more than 90 days before v2 was released. For these exepriments, we return a fixed value of the date.
Aside from this, some randomness also arise from the UMAP function provided by Seurat. Alex's PR to update the Seurat version fixes this issue. Sara has written some note on that in the ticket.
More details fleshed out the ticket: https://biomage.atlassian.net/browse/BIOMAGE-1965
Staging link: https://ui-agi-beady-gibbon.scp-staging.biomage.net/
Details
URL to issue
https://biomage.atlassian.net/browse/BIOMAGE-1965
Link to staging deployment URL (or set N/A)
N/A
Links to any PRs or resources related to this PR
N/A
Integration test branch
master
Merge checklist
Your changes will be ready for merging after all of the steps below have been completed.
Code updates
Have best practices and ongoing refactors being observed in this PR
Manual/unit testing
Integration testing
You must check the box below to run integration tests on the latest commit on your PR branch.
Integration tests have to pass before the PR can be merged. Without checking the box, your PR
will not pass the required status checks for merging.
Documentation updates
Optional