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

New Case Action Top-up #3971

Open
1 task
RasmusBurge-CG opened this issue Nov 25, 2024 · 5 comments
Open
1 task

New Case Action Top-up #3971

RasmusBurge-CG opened this issue Nov 25, 2024 · 5 comments

Comments

@RasmusBurge-CG
Copy link
Contributor

RasmusBurge-CG commented Nov 25, 2024

As a member of prod bioinfo,
I want a new action on case called Top-up,
So that analysis would start automatically when new data is available for cases that have been topped up.

Clarification

It’s very easy to overlook manually starting cases after a top-up, which has the potential to cause significant delays in processing samples (potentially devastating for critically ill patients). To prevent this and avoid unnecessary sample processing, one could set the case status to Top-up. This way, when new data becomes available for that case, the automation will pick up the sample and start it. Additionally, there is potential for integration with LIMS: when a sample is requeued for top-up, it could automatically update the status in StatusDB.

Work impact

Answer the following questions:

  • Is there currently a workaround for this issue? If so, what is it?
    • Yes, we need to communicate with each other in production to inform one another about a top-up. Alternatively, one could check all the samples in the delivery step, retrieve the case from statusdb, and verify if it’s running in TB.
  • How much time would be saved by implementing this feature on a weekly basis?
    • 1 hour
  • How many users are affected by this issue?
    • All prod members
  • Are customers affected by this issue?
    • Yes, it happens from time to time that we forget to manually restart cases that have been topped up.

Acceptance Criteria

  • A way in which analyses involving samples sent to top-up start automatically when the data is ready

Notes

  • Additional information.
  • Dependencies.
  • Related user stories.
@diitaz93
Copy link
Contributor

Second clarification

There are two situations (that I know) in which a sample will be sent for top-up:

  1. The sample didn't reach the target amount of reads (based on the app tag). In this case, the automation checks that the reads are not reached and simply skips the analysis until the sample has reached the desired amount of reads.
  2. The sample got the required amount of reads and it starts the analysis, but during the analysis we realise that it didn't get the expected coverage (or didn't satisfy other pipeline-specific requirements related to sequencing quality). Then it is sent to top-up and the sample/analysis is labelled as analysed/complete (unclear how it works on this level).

The problem described in this issue concerns only the second situation, as in the first one, the sample will be taken by the automation when the desired number of reads is reached. In the second case, the automation will never start again the analysis as it is labelled as already run.

@henrikstranneheim
Copy link
Contributor

Will the automation not already pick this up whem there is new seq data for a sample which is newer than the latest analysis and action is None?

    def _is_latest_analysis_done_on_all_sequences(self, case: Case) -> bool:
        return case.latest_analyzed < case.latest_sequenced

@beatrizsavinhas
Copy link
Contributor

beatrizsavinhas commented Nov 27, 2024

Yes, I was thinking exactly of this @henrikstranneheim!
The only exception I can think of is if the initial analysis fails, and the case was not stored and therefore still has status running in status DB - so the automation won't start it. I think this might be the case with samples that received enough reads but the analysis failed on coverage and was left as failed in trailblazer.

@henrikstranneheim
Copy link
Contributor

But should that case not warrant a manual investigation? It might fail for number of reasons.

@RasmusBurge-CG
Copy link
Contributor Author

Hi!

Yes, @beatrizsavinhas, this would fall under case 2, as stated in the second clarification by @diitaz93, right?

@henrikstranneheim, that’s true. If the investigation reveals a need for a top-up, then the Top-up action could be useful. Do you agree?

There might be a better solution to this. If there’s something I’m unaware of, I’m happy to learn!

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