phc-ingestion 0.10.8__tar.gz → 0.10.10__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 (64) hide show
  1. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/PKG-INFO +1 -1
  2. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nebula/manifest_assembler.py +7 -23
  3. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nebula/process.py +3 -0
  4. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/pyproject.toml +1 -1
  5. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/PYPI.md +0 -0
  6. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/__init__.py +0 -0
  7. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/__init__.py +0 -0
  8. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/process.py +0 -0
  9. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/__init__.py +0 -0
  10. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/cnv.py +0 -0
  11. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/detect_genome_ref.py +0 -0
  12. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/hla.py +0 -0
  13. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/ihc.py +0 -0
  14. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/interpretation.py +0 -0
  15. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/json.py +0 -0
  16. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/metadata.py +0 -0
  17. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/specimen_details.py +0 -0
  18. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/structural.py +0 -0
  19. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/tests.py +0 -0
  20. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/tmb.py +0 -0
  21. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/tsv.py +0 -0
  22. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/vcf.py +0 -0
  23. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/__init__.py +0 -0
  24. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/process.py +0 -0
  25. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/__init__.py +0 -0
  26. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/cnv.py +0 -0
  27. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/fnv.py +0 -0
  28. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/ga4gh.py +0 -0
  29. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/interpretation.py +0 -0
  30. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/vcf_etl.py +0 -0
  31. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/generic/__init__.py +0 -0
  32. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/generic/process.py +0 -0
  33. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/generic/utils.py +0 -0
  34. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nebula/__init__.py +0 -0
  35. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nebula/constants.py +0 -0
  36. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/__init__.py +0 -0
  37. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/process.py +0 -0
  38. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/alteration_table.py +0 -0
  39. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/interpretation.py +0 -0
  40. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/manifest_helpers.py +0 -0
  41. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/nextgen_specific_genes.py +0 -0
  42. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/pre_filter_somatic_vcf.py +0 -0
  43. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/process_cnv.py +0 -0
  44. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/process_manifest.py +0 -0
  45. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/process_structural.py +0 -0
  46. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/process_vcf.py +0 -0
  47. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/types.py +0 -0
  48. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/resources/GRCh37_map.csv.gz +0 -0
  49. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/resources/GRCh38_map.csv.gz +0 -0
  50. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/__init__.py +0 -0
  51. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/coords_to_genes.py +0 -0
  52. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/ga4gh.py +0 -0
  53. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/gene_to_coords.py +0 -0
  54. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/lambda_client.py +0 -0
  55. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/open_maybe_gzipped.py +0 -0
  56. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/tar.py +0 -0
  57. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/types.py +0 -0
  58. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/Variant.py +0 -0
  59. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/__init__.py +0 -0
  60. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/standardize.py +0 -0
  61. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/__init__.py +0 -0
  62. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/af_helpers.py +0 -0
  63. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/dp_helpers.py +0 -0
  64. {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/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.8
3
+ Version: 0.10.10
4
4
  Summary: Functions for LifeOmic PHC genomic ingestions
5
5
  License: MIT
6
6
  Author-email: LifeOmic Development <development@lifeomic.com>
@@ -37,7 +37,7 @@ class Patient(Resource):
37
37
  gender: str | None
38
38
  birthDate: str | None
39
39
  managingOrganization: Reference | None
40
- generalPractitioner: Reference | None
40
+ generalPractitioner: list[Reference] | None
41
41
 
42
42
 
43
43
  class Organization(Resource):
@@ -103,22 +103,11 @@ class ManifestAssembler:
103
103
  identifiers = resource.get("identifier", [])
104
104
  return identifiers[0].get("value", "") if identifiers else ""
105
105
 
106
- def __extract_id_from_reference(self, reference: Reference | None) -> str:
107
- if not reference:
108
- return ""
109
-
110
- ref_string = reference.get("reference")
111
- if not ref_string:
112
- return ""
113
-
106
+ def __extract_id_from_reference(self, reference: Reference) -> str:
107
+ ref_string = reference.get("reference", "")
114
108
  parts = ref_string.split("/")
115
109
  return parts[1] if len(parts) > 1 else parts[0]
116
110
 
117
- def __extract_id_from_reference_list(self, references: list[Reference] | None) -> str:
118
- if not references or len(references) == 0:
119
- return ""
120
- return self.__extract_id_from_reference(references[0])
121
-
122
111
  def __extract_elation_mrn(self, patient: Patient) -> str:
123
112
  identifier = next(
124
113
  (
@@ -160,20 +149,15 @@ class ManifestAssembler:
160
149
  raise RuntimeError(f"Patient with kit id {self.kit_id} not found")
161
150
  patient_birth_date = patient.get("birthDate")
162
151
  if not patient_birth_date:
163
- raise RuntimeError("Patient birth date is a required to create a manifest")
152
+ raise RuntimeError("Patient birth date is required to create a manifest")
164
153
 
165
154
  organization: Organization | None = self.__fetch_resource_by_type_and_reference(
166
155
  "Organization", patient.get("managingOrganization")
167
156
  )
168
157
 
169
- # Handle generalPractitioner as a list
170
- general_practitioner: Practitioner | None = None
171
- general_practitioner_refs: list[Reference] = patient.get("generalPractitioner", [])
172
- if general_practitioner_refs:
173
- general_practitioner = self.__fetch_resource_by_type_and_reference(
174
- "Practitioner",
175
- {"reference": self.__extract_id_from_reference_list(general_practitioner_refs)},
176
- )
158
+ general_practitioner: Practitioner | None = self.__fetch_resource_by_type_and_reference(
159
+ "Practitioner", next(iter(patient.get("generalPractitioner", [])), None)
160
+ )
177
161
 
178
162
  patient_info = self.__parse_human_name(patient.get("name"))
179
163
  practitioner_info = self.__parse_human_name(
@@ -1,6 +1,7 @@
1
1
  import os
2
2
 
3
3
  from ingestion.nebula.constants import NEBULA_TEST_TYPE
4
+ from ingestion.shared_util.ga4gh import create_yaml
4
5
  from ingestion.vcf_standardization.standardize import standardize_vcf
5
6
  from lifeomic_logging import scoped_logger
6
7
  from ingestion.nebula.manifest_assembler import ManifestAssembler
@@ -43,6 +44,8 @@ def process(vcf_file, out_path, file_name, source_file_id, ingestion_id, account
43
44
  }
44
45
  ]
45
46
 
47
+ create_yaml(manifest, file_name)
48
+
46
49
  # Hard-code genome reference for Nebula VCFs
47
50
  genome_reference = "GRCh38"
48
51
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "phc-ingestion"
3
- version = "0.10.8"
3
+ version = "0.10.10"
4
4
  description = "Functions for LifeOmic PHC genomic ingestions"
5
5
  authors = [
6
6
  { name = "LifeOmic Development", email = "development@lifeomic.com" },
File without changes