Skip to content

Commit

Permalink
Add genotype analysis loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ahdamin committed Dec 13, 2024
1 parent a45c267 commit 8f4d056
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion genotype_api/database/crud/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ def _get_samples_with_analyses_and_genotypes() -> Query:
return (
select(Sample)
.distinct()
.options(selectinload(Sample.analyses).selectinload(Analysis.genotypes))
.options(
selectinload(Sample.analyses)
.selectinload(Analysis.genotypes)
.selectinload(Genotype.analysis)
)
.join(Analysis, Analysis.sample_id == Sample.id)
)

Expand Down

0 comments on commit 8f4d056

Please sign in to comment.