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

Add automatic QC checks for microSALT #4070

Open
5 tasks
beatrizsavinhas opened this issue Jan 10, 2025 · 1 comment
Open
5 tasks

Add automatic QC checks for microSALT #4070

beatrizsavinhas opened this issue Jan 10, 2025 · 1 comment

Comments

@beatrizsavinhas
Copy link
Contributor

As a production user,
I want all the QC checks to be automatic,
So that we don't have to manually check each case to be delivered.

Work impact

Answer the following questions:

  • Is there currently a workaround for this issue? If so, what is it?
    • No.
  • How much time would be saved by implementing this feature on a weekly basis?
    • Hours per day.
  • How many users are affected by this issue?
    • Production. Customers could get the results faster.
  • Are customers affected by this issue?
    • Yes.

Acceptance Criteria

  • No manual checks of Typing reports in microSALT are needed
    • For samples with verified organisms for typing reference genomes, an error is communicated to the user if a sample has "Data saknas" set as sequence type
    • For samples with verified organisms for typing reference genomes, an error is communicated to the user if a sample has less than seven found loci
  • An error is communicated to the user if a sample is missing from the Microsalt reports
  • Add QC of internal control for microbial preps

Notes

https://github.com/Clinical-Genomics/project-Automatic-Delivery/issues/18

@beatrizsavinhas
Copy link
Contributor Author

beatrizsavinhas commented Jan 10, 2025

Suggested technical refinement

  • Expand the microsalt QC checks currently done on the QC report and add logic for checking the typing report as well.
  1. No manual checks of Typing reports in microSALT are needed
  • Check if reference organism is part of the verified organism list - Get information from organism table in statusDB
  • Add to the logic under MicroSALTQualityController
    • Check if sequence_type in the <lims_proj_id>.json file exist in the dictionary with name blast_pubmlst
    • add sequence_type_exists: bool or equivalent to class SampleQualityResult(BaseModel)
  1. An error is communicated to the user if a sample is missing from the Microsalt reports
  • Check if reference organism is part of the verified organism list - Get information from organism table in statusDB
  • Add to the logic under MicroSALTQualityController
    • Implement logic according to the answer of the questions below.
    • add all_loci_found: bool or equivalent to class SampleQualityResult(BaseModel)
  1. Add QC of internal control for microbial preps
  • Add check for the number of samples in the json file vs the number of samples in the case in statusDB

    • Do not account for cancelled samples in statusDB
  • Under case class CaseQualityResult(BaseModel): add the following or equivalent:

    • "all_samples_have_reads": true,
    • "missing_samples": [sample_id1, sample_id2]
    • add logic, if all_samples_have_reads=FALSE then passes_qc=FALSE
  • Check if the report, logs and logic for the analysis status in Traiblazer is correct according to these changes

  1. Add QC of internal control for microbial preps
    Replicate this mutant function in Microsalt:
    internal_negative_control: Sample = self._get_internal_negative_control_sample_for_case(
    case=case
    )

    When calling this lims api function:
    self.lims.get_internal_negative_control_id_from_sample_in_pool(
    sample_internal_id=sample_internal_id, pooling_step=LimsProcess.COVID_POOLING_STEP
    )
    )

    We need to set the correct pooling_step for microsalt samples which is "CG002 - Normalization of microbial samples for sequencing". Add this as a constant under
    class LimsProcess(StrEnum):

Questions

Some questions we need to investigate to make sure that this technical implementation fulfills the criteria.

  • Investigate if Data saknas is reflected by blast_pubmlst in the json file.
  • Does "thresholds": "Passed" under blast_pubmlst in the json file reflect the found loci?
  • Otherwise perform check on number of files in directory ex. /home/proj/production/microbial/results/ACC16301_2024.12.2_3.10.46/ACC16301A1/blast_search/mlst

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

1 participant