cg 83.12.0__py3-none-any.whl → 83.13.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cg/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
1
  __title__ = "cg"
2
- __version__ = "83.12.0"
2
+ __version__ = "83.13.0"
cg/server/admin.py CHANGED
@@ -112,12 +112,6 @@ def view_pacbio_sample_sequencing_metrics_link(unused1, unused2, model, unused3)
112
112
  )
113
113
 
114
114
 
115
- def is_external_application(unused1, unused2, model, unused3):
116
- """column formatter to open this view"""
117
- del unused1, unused2, unused3
118
- return model.application_version.application.is_external if model.application_version else ""
119
-
120
-
121
115
  def view_order_types(unused1, unused2, model, unused3):
122
116
  del unused1, unused2, unused3
123
117
  order_type_list = "<br>".join(model.order_types)
@@ -736,10 +730,36 @@ class PoolView(BaseView):
736
730
  class SampleView(BaseView):
737
731
  """Admin view for Model.Sample"""
738
732
 
739
- column_exclude_list = [
740
- "age_at_sampling",
741
- "_phenotype_groups",
742
- "_phenotype_terms",
733
+ column_list = [
734
+ "application_version",
735
+ "customer",
736
+ "organism",
737
+ "invoice",
738
+ "is_cancelled",
739
+ "capture_kit",
740
+ "comment",
741
+ "control",
742
+ "created_at",
743
+ "delivered_at",
744
+ "downsampled_to",
745
+ "from_sample",
746
+ "internal_id",
747
+ "is_tumour",
748
+ "loqusdb_id",
749
+ "name",
750
+ "no_invoice",
751
+ "order",
752
+ "ordered_at",
753
+ "original_ticket",
754
+ "prepared_at",
755
+ "priority",
756
+ "reads",
757
+ "hifi_yield",
758
+ "last_sequenced_at",
759
+ "received_at",
760
+ "reference_genome",
761
+ "sex",
762
+ "subject_id",
743
763
  ]
744
764
  column_default_sort = ("created_at", True)
745
765
  column_editable_list = [
@@ -759,7 +779,6 @@ class SampleView(BaseView):
759
779
  column_formatters = {
760
780
  "application_version": view_application_link_via_application_version,
761
781
  "customer": view_customer_link,
762
- "is_external": is_external_application,
763
782
  "internal_id": view_case_sample_link,
764
783
  "invoice": InvoiceView.view_invoice_link,
765
784
  "original_ticket": view_ticket_link,
cg/store/models.py CHANGED
@@ -761,6 +761,13 @@ class Sample(Base, PriorityMixin):
761
761
  def __str__(self) -> str:
762
762
  return f"{self.internal_id} ({self.name})"
763
763
 
764
+ @property
765
+ def hifi_yield(self) -> int | None:
766
+ if self._sample_run_metrics and getattr(self._sample_run_metrics[0], "hifi_yield", False):
767
+ return sum(metric.hifi_yield for metric in self._sample_run_metrics) # type: ignore
768
+ else:
769
+ return None
770
+
764
771
  @property
765
772
  def archive_location(self) -> str:
766
773
  """Returns the data_archive_location if the customer linked to the sample."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cg
3
- Version: 83.12.0
3
+ Version: 83.13.0
4
4
  Summary: Clinical Genomics command center
5
5
  Requires-Python: >=3.11,<3.13
6
6
  Classifier: Programming Language :: Python
@@ -1,4 +1,4 @@
1
- cg/__init__.py,sha256=QYeMJF37x9RzmsTZYc1lCpGDCLcZnJkcVPsodSKqAXg,41
1
+ cg/__init__.py,sha256=mLKK3VZwghkAhxMaIze9zQ4Dy66UhzH--J8yymzr7g0,41
2
2
  cg/apps/__init__.py,sha256=pYf0vxo4iYQqURzFRYzqpOCdV8Cm9MWx0GHvJOz0EMg,315
3
3
  cg/apps/coverage/__init__.py,sha256=dJtsmNf8tODE2-VEomMIoYA7ugLYZAk_upsfOQCZeF8,27
4
4
  cg/apps/coverage/api.py,sha256=e_ozC3QeNKoEfpjjMaL-XjeBLtz-JySWccrtw0E9mLM,2940
@@ -467,7 +467,7 @@ cg/resources/rnafusion_bundle_filenames.yaml,sha256=hoXuTobKbjH7W7dld87rSF7X0r4K
467
467
  cg/resources/taxprofiler_bundle_filenames.yaml,sha256=AULMEAYkMzADYUtVtuSmBj7UaAIlLGRDyBMEOO0xWz8,2871
468
468
  cg/resources/tomte_bundle_filenames.yaml,sha256=lFxk9GssmCyKBUn5lbRBtBS9FS9cABaoVzb-e2zrJac,4144
469
469
  cg/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
470
- cg/server/admin.py,sha256=m3Wnj02wOk98ozcb-s5A7TH2VyNj_34griSG4JF53ts,29592
470
+ cg/server/admin.py,sha256=FbvMTtkodpDmaKCFqTRWLz4XohZPT8Gpvy2U8LKW-do,29849
471
471
  cg/server/app.py,sha256=WEULzx5JeC0aJHag3Vltzopd8r7tgHPr_1nbytS-AI8,6975
472
472
  cg/server/app_config.py,sha256=8DaNtYtdp6A29FAuTFX-Lk7SLv7Zx-_f57ZU0-T_3ZI,1403
473
473
  cg/server/auto.py,sha256=5DqokNScv483imZTvOYrJo6wV9-P7ZGnJaaHnfnNJLs,57
@@ -904,7 +904,7 @@ cg/store/filters/status_panel_filters.py,sha256=qMYhIsrF9G3mjCvL9b9O2l_cmD3SfPWh
904
904
  cg/store/filters/status_pool_filters.py,sha256=XcYqe2z5k_q09xpp4cleDMQ4Q3o2y7UPCkB0QUkl1ck,4308
905
905
  cg/store/filters/status_sample_filters.py,sha256=mRpt_ik7niMjBo9K7pP8cmdfDMdr0B3I6Tt2MWXkLoc,9656
906
906
  cg/store/filters/status_user_filters.py,sha256=sMwKeWqgEtqv8gyhbN_Uf5huPUxbOt5qEqMWVu67Zys,1328
907
- cg/store/models.py,sha256=HUwzqktZ-Fil7QTGwLJl7LSOb_nty1oJnIUA_euqKFQ,42985
907
+ cg/store/models.py,sha256=MsKSG9UBiXySCEsODMRDmntjpjkVCd_rlRpqTEw2TZ8,43274
908
908
  cg/store/store.py,sha256=mz1TfKPlanH2uQyhZdwe_8VKg0IdFolmromKLu668IY,630
909
909
  cg/utils/__init__.py,sha256=gGjdV2l_hfWFCTybU6dwDk_FcItM88EIHNPaX6g1qUk,30
910
910
  cg/utils/calculations.py,sha256=zLVJO6nNw6n7AW7fHZI56UnQ23lqJrShB4Hh2ow6-TQ,349
@@ -923,7 +923,7 @@ cg/utils/flask/enum.py,sha256=xwNVtFPkSzoloJctLHu7obRyxcng1GJrhkeYkqwf9tw,1052
923
923
  cg/utils/mapping.py,sha256=oZpZW2kgsbtAP2FZ7RtRPELiEE1zZk_nAGisHGtCOUo,491
924
924
  cg/utils/time.py,sha256=_VOglhrFEZ5cwHK1U1g36SdwzB7UvV-Nvlt4ymuZUho,1501
925
925
  cg/utils/utils.py,sha256=RciI_UhWcnG_pMZrmQZ1ZYb-O1N0DweTYMmhE0SIRgQ,1410
926
- cg-83.12.0.dist-info/METADATA,sha256=4Ls745EkqqjabAwLXfK_pmPH-N6SZfd8mYaTdGOxfy4,4940
927
- cg-83.12.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
928
- cg-83.12.0.dist-info/entry_points.txt,sha256=q5f47YQQGltzK_xnIq1mDopRXXEItr85Xe1BCtG-Wts,39
929
- cg-83.12.0.dist-info/RECORD,,
926
+ cg-83.13.0.dist-info/METADATA,sha256=gjplstDx2j_y2q1p0zfebH7ryAK12WFYCUqEgosrxl0,4940
927
+ cg-83.13.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
928
+ cg-83.13.0.dist-info/entry_points.txt,sha256=q5f47YQQGltzK_xnIq1mDopRXXEItr85Xe1BCtG-Wts,39
929
+ cg-83.13.0.dist-info/RECORD,,
File without changes