Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
islean committed Jan 28, 2025
1 parent 35eac2e commit a4230e2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions cg/store/crud/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -1618,8 +1618,12 @@ def _get_related_samples_query(
prep_categories: list[SeqLibraryPrepCategory],
collaborators: set[Customer],
) -> Query:
"""Returns a sample query with the same subject_id, tumour status and within the collaborators of the given
sample and within the given list of prep categories."""
"""
Returns a sample query with the same subject_id, tumour status and within the collaborators of the given
sample and within the given list of prep categories.
Raises:
CgDataError if the number of samples matching the criteria is not 1
"""

sample_application_version_query: Query = self._get_join_sample_application_version_query()

Expand Down Expand Up @@ -1658,6 +1662,9 @@ def get_uploaded_related_dna_cases(self, rna_case: Case) -> list[Case]:
4. The DNA sample found in 3. should also:
1. Have an application within a DNA prep category
2. Belong to a customer within the provided collaboration
Raises:
CgDataError if no related DNA cases are found
"""

related_dna_cases: list[Case] = []
Expand Down Expand Up @@ -1730,7 +1737,7 @@ def get_related_dna_cases_with_samples(self, rna_case: Case) -> list[RNADNAColle
The cases are bundled by the DNA sample found in 3.
"""
collaborators = rna_case.customer.collaborators
collaborators: set[Customer] = rna_case.customer.collaborators
collaborator_ids: list[int] = [collaborator.id for collaborator in collaborators]
rna_dna_collections: list[RNADNACollection] = []
for sample in rna_case.samples:
Expand Down

0 comments on commit a4230e2

Please sign in to comment.