-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove sequencing QC calculations in /orders endpoint (#3403)
- Loading branch information
Showing
4 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,5 @@ | ||
from cg.apps.tb.dto.summary_response import AnalysisSummary | ||
from cg.services.sequencing_qc_service import SequencingQCService | ||
from cg.store.models import Case, Order | ||
|
||
|
||
def _get_analysis_map(analysis_summaries: list[AnalysisSummary]) -> dict: | ||
return {summary.order_id: summary for summary in analysis_summaries} | ||
|
||
|
||
def _is_case_failed_sequencing_qc(case: Case) -> bool: | ||
return case.are_all_samples_sequenced and not SequencingQCService.case_pass_sequencing_qc(case) | ||
|
||
|
||
def get_cases_failed_sequencing_qc_count(order: Order, cases_to_exclude: list[str]) -> int: | ||
cases: list[Case] = order.cases | ||
return sum( | ||
1 | ||
for case in cases | ||
if _is_case_failed_sequencing_qc(case) and case.internal_id not in cases_to_exclude | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters