phc-ingestion 0.10.4__tar.gz → 0.10.5__tar.gz

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.
Files changed (65) hide show
  1. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/PKG-INFO +1 -1
  2. phc-ingestion-0.10.5/ingestion/nebula/constants.py +7 -0
  3. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nebula/manifest_assembler.py +20 -11
  4. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/pyproject.toml +1 -1
  5. phc-ingestion-0.10.4/ingestion/nebula/constants.py +0 -1
  6. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/PYPI.md +0 -0
  7. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/__init__.py +0 -0
  8. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/__init__.py +0 -0
  9. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/process.py +0 -0
  10. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/__init__.py +0 -0
  11. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/cnv.py +0 -0
  12. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/detect_genome_ref.py +0 -0
  13. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/hla.py +0 -0
  14. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/ihc.py +0 -0
  15. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/interpretation.py +0 -0
  16. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/json.py +0 -0
  17. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/metadata.py +0 -0
  18. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/specimen_details.py +0 -0
  19. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/structural.py +0 -0
  20. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/tests.py +0 -0
  21. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/tmb.py +0 -0
  22. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/tsv.py +0 -0
  23. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/caris/util/vcf.py +0 -0
  24. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/foundation/__init__.py +0 -0
  25. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/foundation/process.py +0 -0
  26. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/foundation/util/__init__.py +0 -0
  27. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/foundation/util/cnv.py +0 -0
  28. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/foundation/util/fnv.py +0 -0
  29. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/foundation/util/ga4gh.py +0 -0
  30. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/foundation/util/interpretation.py +0 -0
  31. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/foundation/util/vcf_etl.py +0 -0
  32. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/generic/__init__.py +0 -0
  33. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/generic/process.py +0 -0
  34. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/generic/utils.py +0 -0
  35. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nebula/__init__.py +0 -0
  36. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nebula/process.py +0 -0
  37. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/__init__.py +0 -0
  38. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/process.py +0 -0
  39. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/alteration_table.py +0 -0
  40. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/interpretation.py +0 -0
  41. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/manifest_helpers.py +0 -0
  42. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/nextgen_specific_genes.py +0 -0
  43. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/pre_filter_somatic_vcf.py +0 -0
  44. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/process_cnv.py +0 -0
  45. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/process_manifest.py +0 -0
  46. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/process_structural.py +0 -0
  47. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/process_vcf.py +0 -0
  48. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/nextgen/util/types.py +0 -0
  49. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/resources/GRCh37_map.csv.gz +0 -0
  50. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/resources/GRCh38_map.csv.gz +0 -0
  51. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/shared_util/__init__.py +0 -0
  52. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/shared_util/coords_to_genes.py +0 -0
  53. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/shared_util/ga4gh.py +0 -0
  54. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/shared_util/gene_to_coords.py +0 -0
  55. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/shared_util/lambda_client.py +0 -0
  56. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/shared_util/open_maybe_gzipped.py +0 -0
  57. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/shared_util/tar.py +0 -0
  58. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/shared_util/types.py +0 -0
  59. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/vcf_standardization/Variant.py +0 -0
  60. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/vcf_standardization/__init__.py +0 -0
  61. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/vcf_standardization/standardize.py +0 -0
  62. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/vcf_standardization/util/__init__.py +0 -0
  63. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/vcf_standardization/util/af_helpers.py +0 -0
  64. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/vcf_standardization/util/dp_helpers.py +0 -0
  65. {phc-ingestion-0.10.4 → phc-ingestion-0.10.5}/ingestion/vcf_standardization/util/read_write.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phc-ingestion
3
- Version: 0.10.4
3
+ Version: 0.10.5
4
4
  Summary: Functions for LifeOmic PHC genomic ingestions
5
5
  License: MIT
6
6
  Author-email: LifeOmic Development <development@lifeomic.com>
@@ -0,0 +1,7 @@
1
+ NEBULA_TEST_TYPE = "WGS-30x"
2
+ DATASET_SYSTEM = "http://lifeomic.com/fhir/dataset"
3
+ NEBULA_KIT_ID_SYSTEM = "http://lifeomic.com/fhir/nebula-kit-id"
4
+ BODY_SITE_SYSTEM = "http://lifeomic.com/fhir/sequence-body-site"
5
+ NEBULA_BODY_SITE = "Buccal Swab"
6
+ INDICATION_SYSTEM = "http://lifeomic.com/fhir/sequence-indication"
7
+ NEBULA_INDICATION = "Genetic Health Screening"
@@ -1,6 +1,14 @@
1
1
  from typing import Optional, TypedDict, Any
2
2
  from datetime import datetime
3
3
  from ingestion.shared_util.lambda_client import LambdaClient
4
+ from ingestion.nebula.constants import (
5
+ DATASET_SYSTEM,
6
+ NEBULA_KIT_ID_SYSTEM,
7
+ BODY_SITE_SYSTEM,
8
+ INDICATION_SYSTEM,
9
+ NEBULA_BODY_SITE,
10
+ NEBULA_INDICATION,
11
+ )
4
12
 
5
13
 
6
14
  class HumanName(TypedDict):
@@ -57,8 +65,8 @@ class ManifestAssembler:
57
65
  def __fetch_patient_by_kit_id(self) -> Optional[Patient]:
58
66
  path = f"/{self.account_id}/dstu3/Patient"
59
67
  params = {
60
- "_tag": f"http://lifeomic.com/fhir/dataset|{self.project_id}",
61
- "identifier": f"http://lifeomic.com/fhir/nebula-kit-id|{self.kit_id}",
68
+ "_tag": f"{DATASET_SYSTEM}|{self.project_id}",
69
+ "identifier": f"{NEBULA_KIT_ID_SYSTEM}|{self.kit_id}",
62
70
  }
63
71
 
64
72
  response = self.client.invoke(path, "get", None, params)
@@ -80,7 +88,7 @@ class ManifestAssembler:
80
88
 
81
89
  try:
82
90
  return self.client.invoke(path, "get")
83
- except RuntimeError as e:
91
+ except RuntimeError:
84
92
  return None
85
93
 
86
94
  def __extract_identifier_from_resource(self, resource: Resource | None) -> str:
@@ -121,7 +129,7 @@ class ManifestAssembler:
121
129
  raise RuntimeError(f"Patient with kit id {self.kit_id} not found")
122
130
  patient_birth_date = patient.get("birthDate")
123
131
  if not patient_birth_date:
124
- raise RuntimeError(f"Patient birth date is a required to create a manifest")
132
+ raise RuntimeError("Patient birth date is a required to create a manifest")
125
133
 
126
134
  organization: Organization | None = self.__fetch_resource_by_type_and_reference(
127
135
  "Organization", patient.get("managingOrganization")
@@ -139,14 +147,15 @@ class ManifestAssembler:
139
147
  return {
140
148
  "name": "Nebula",
141
149
  "indexedDate": datetime.now().strftime("%Y-%m-%d"),
142
- "reference": "GRCh38", # TODO: Get from project?
150
+ "reference": "GRCh38",
151
+ "patientId": patient.get("id"),
143
152
  "mrn": patient.get("id"),
144
- "bodySite": "Buccal Swab",
145
- "bodySiteDisplay": "Buccal Swab",
146
- "bodySiteSystem": "http://lifeomic.com/fhir/sequence-body-site",
147
- "indicationSystem": "http://lifeomic.com/fhir/sequence-indication",
148
- "indication": "Genetic Health Screening",
149
- "indicationDisplay": "Genetic Health Screening",
153
+ "bodySite": NEBULA_BODY_SITE,
154
+ "bodySiteDisplay": NEBULA_BODY_SITE,
155
+ "bodySiteSystem": BODY_SITE_SYSTEM,
156
+ "indicationSystem": INDICATION_SYSTEM,
157
+ "indication": NEBULA_INDICATION,
158
+ "indicationDisplay": NEBULA_INDICATION,
150
159
  "patientInfo": {
151
160
  "lastName": patient_info.get("lastName"),
152
161
  "dob": datetime.fromisoformat(patient_birth_date).strftime("%Y-%m-%d"),
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "phc-ingestion"
3
- version = "0.10.4"
3
+ version = "0.10.5"
4
4
  description = "Functions for LifeOmic PHC genomic ingestions"
5
5
  authors = [
6
6
  { name = "LifeOmic Development", email = "development@lifeomic.com" },
@@ -1 +0,0 @@
1
- NEBULA_TEST_TYPE = "WGS-30x"
File without changes