Skip to content

Commit

Permalink
Merge pull request #971 from populationgenomics/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
EddieLF authored Oct 1, 2024
2 parents 422516c + f1eba97 commit 1f5a978
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions db/python/layers/project_insights.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,19 @@ def get_sg_web_report_links(
if stripy_report.outlier_loci
else None
),
'timestamp_completed': stripy_report.timestamp_completed.isoformat(),
'timestamp_completed': stripy_report.timestamp_completed.isoformat()
if stripy_report.timestamp_completed
else None,
}

if mito_report := sequencing_group_mito_reports.get(report_key):
report_links['mito'] = {
'url': self.get_report_url(
project.name, sequencing_group_id, mito_report.output, 'MitoReport'
),
'timestamp_completed': mito_report.timestamp_completed.isoformat(),
'timestamp_completed': mito_report.timestamp_completed.isoformat()
if mito_report.timestamp_completed
else None,
}

return report_links
Expand Down Expand Up @@ -705,6 +709,7 @@ async def _latest_es_indices_by_project_id_and_seq_type_and_stage(
JSON_UNQUOTE(JSON_EXTRACT(meta, '$.stage')) as stage
FROM analysis
WHERE type='es-index'
AND status='COMPLETED'
GROUP BY project, JSON_EXTRACT(meta, '$.sequencing_type'), JSON_EXTRACT(meta, '$.stage')
) max_timestamps ON a.project = max_timestamps.project
AND a.timestamp_completed = max_timestamps.max_timestamp
Expand Down Expand Up @@ -829,6 +834,7 @@ async def _details_stripy_reports(
FROM analysis a
LEFT JOIN analysis_sequencing_group asg on asg.analysis_id=a.id
WHERE type='web'
AND status='COMPLETED'
AND project IN :projects
AND JSON_EXTRACT(meta, '$.stage') = 'Stripy'
GROUP BY asg.sequencing_group_id
Expand Down Expand Up @@ -875,6 +881,7 @@ async def _details_mito_reports(
FROM analysis a
LEFT JOIN analysis_sequencing_group asg on asg.analysis_id=a.id
WHERE type='web'
AND status='COMPLETED'
AND project IN :projects
AND JSON_EXTRACT(meta, '$.stage') = 'MitoReport'
GROUP BY asg.sequencing_group_id
Expand Down

0 comments on commit 1f5a978

Please sign in to comment.