Skip to content

Commit

Permalink
Fix(rna-upload) (#4046)(patch)
Browse files Browse the repository at this point in the history
### Fixed

- Use correct customer when uploading RNA-omics results to scout
  • Loading branch information
Vince-janv authored Jan 2, 2025
1 parent c7824d3 commit dde0b85
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cg/meta/upload/scout/uploadscoutapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,10 @@ def upload_omics_sample_id_to_scout(
)

def upload_rna_fraser_outrider_to_scout(
self, dry_run: bool, case_id: str, rna_dna_collections: list[RNADNACollection], cust_id: str
self,
dry_run: bool,
case_id: str,
rna_dna_collections: list[RNADNACollection],
) -> None:
"""Upload omics fraser and outrider file for a case to Scout."""
status_db: Store = self.status_db
Expand Down Expand Up @@ -430,7 +433,7 @@ def upload_rna_fraser_outrider_to_scout(
outrider_file_path=rna_outrider.full_path,
case_id=dna_case_id,
customer_case_name=customer_case.name,
cust_id=cust_id,
cust_id=customer_case.customer.internal_id,
)
for upload_statement in self.get_rna_fraser_outrider_upload_summary(rna_dna_collections):
LOG.info(upload_statement)
Expand All @@ -441,7 +444,6 @@ def upload_rna_genome_build_to_scout(
dry_run: bool,
rna_case: str,
rna_dna_collections: list[RNADNACollection],
cust_id: str,
) -> None:
"""Upload RNA genome built for a RNA/DNA case to Scout."""
status_db: Store = self.status_db
Expand All @@ -463,7 +465,7 @@ def upload_rna_genome_build_to_scout(
self.scout_api.upload_rna_genome_build(
case_id=dna_case_id,
customer_case_name=customer_case.name,
cust_id=cust_id,
cust_id=customer_case.customer.internal_id,
rna_genome_build=rna_genome_build,
)

Expand Down Expand Up @@ -614,21 +616,18 @@ def upload_rna_omics_to_scout(self, dry_run: bool, case_id: str) -> None:
status_db: Store = self.status_db
rna_case = status_db.get_case_by_internal_id(case_id)
rna_dna_collections: list[RNADNACollection] = self.create_rna_dna_collections(rna_case)
cust_id: str = rna_case.customer.internal_id
self.upload_omics_sample_id_to_scout(
dry_run=dry_run, rna_dna_collections=rna_dna_collections
)
self.upload_rna_fraser_outrider_to_scout(
dry_run=dry_run,
case_id=case_id,
rna_dna_collections=rna_dna_collections,
cust_id=cust_id,
)
self.upload_rna_genome_build_to_scout(
dry_run=dry_run,
rna_case=rna_case,
rna_dna_collections=rna_dna_collections,
cust_id=cust_id,
)
self.load_rna_variant_outlier_to_scout(
dry_run=dry_run, rna_dna_collections=rna_dna_collections
Expand Down

0 comments on commit dde0b85

Please sign in to comment.