phc-ingestion 0.8.24__tar.gz → 0.8.25__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 (59) hide show
  1. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/PKG-INFO +1 -1
  2. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/pre_filter_somatic_vcf.py +8 -4
  3. phc-ingestion-0.8.25/ingestion/shared_util/open_maybe_gzipped.py +8 -0
  4. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/pyproject.toml +1 -1
  5. phc-ingestion-0.8.24/ingestion/shared_util/open_maybe_gzipped.py +0 -5
  6. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/PYPI.md +0 -0
  7. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/__init__.py +0 -0
  8. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/__init__.py +0 -0
  9. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/process.py +0 -0
  10. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/__init__.py +0 -0
  11. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/cnv.py +0 -0
  12. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/detect_genome_ref.py +0 -0
  13. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/ga4gh.py +0 -0
  14. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/hla.py +0 -0
  15. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/ihc.py +0 -0
  16. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/interpretation.py +0 -0
  17. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/json.py +0 -0
  18. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/metadata.py +0 -0
  19. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/specimen_details.py +0 -0
  20. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/structural.py +0 -0
  21. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/tar.py +0 -0
  22. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/tests.py +0 -0
  23. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/tmb.py +0 -0
  24. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/tsv.py +0 -0
  25. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/caris/util/vcf.py +0 -0
  26. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/foundation/__init__.py +0 -0
  27. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/foundation/process.py +0 -0
  28. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/foundation/util/__init__.py +0 -0
  29. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/foundation/util/cnv.py +0 -0
  30. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/foundation/util/fnv.py +0 -0
  31. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/foundation/util/ga4gh.py +0 -0
  32. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/foundation/util/interpretation.py +0 -0
  33. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/foundation/util/vcf_etl.py +0 -0
  34. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/generic/__init__.py +0 -0
  35. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/generic/process.py +0 -0
  36. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/generic/utils.py +0 -0
  37. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/__init__.py +0 -0
  38. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/process.py +0 -0
  39. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/alteration_table.py +0 -0
  40. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/interpretation.py +0 -0
  41. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/manifest_helpers.py +0 -0
  42. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/process_cnv.py +0 -0
  43. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/process_manifest.py +0 -0
  44. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/process_structural.py +0 -0
  45. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/process_vcf.py +0 -0
  46. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/nextgen/util/types.py +0 -0
  47. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/resources/GRCh37_map.csv.gz +0 -0
  48. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/resources/GRCh38_map.csv.gz +0 -0
  49. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/shared_util/__init__.py +0 -0
  50. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/shared_util/coords_to_genes.py +0 -0
  51. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/shared_util/gene_to_coords.py +0 -0
  52. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/shared_util/types.py +0 -0
  53. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/vcf_standardization/Variant.py +0 -0
  54. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/vcf_standardization/__init__.py +0 -0
  55. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/vcf_standardization/standardize.py +0 -0
  56. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/vcf_standardization/util/__init__.py +0 -0
  57. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/vcf_standardization/util/af_helpers.py +0 -0
  58. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/ingestion/vcf_standardization/util/dp_helpers.py +0 -0
  59. {phc-ingestion-0.8.24 → phc-ingestion-0.8.25}/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.8.24
3
+ Version: 0.8.25
4
4
  Summary: Functions for LifeOmic PHC genomic ingestions
5
5
  License: MIT
6
6
  Author-email: LifeOmic Development <development@lifeomic.com>
@@ -1,6 +1,7 @@
1
- import gzip
2
1
  from logging import Logger
3
2
 
3
+ from ingestion.shared_util.open_maybe_gzipped import open_maybe_gzipped
4
+
4
5
 
5
6
  def build_variant_key_from_vcf_line(line: str) -> str:
6
7
  split_line = line.strip().split("\t")
@@ -22,12 +23,12 @@ def pre_filter_somatic_vcf(
22
23
  log.info("Pre-filtering somatic VCF file")
23
24
 
24
25
  valid_variant_keys = set()
25
- with gzip.open(somatic_vcf_snv_file, "rt") as f:
26
+ with open_maybe_gzipped(somatic_vcf_snv_file, "rt") as f:
26
27
  for line in f:
27
28
  if line.startswith("#"):
28
29
  continue
29
30
  valid_variant_keys.add(build_variant_key_from_vcf_line(line))
30
- with gzip.open(somatic_vcf_indel_file, "rt") as f:
31
+ with open_maybe_gzipped(somatic_vcf_indel_file, "rt") as f:
31
32
  for line in f:
32
33
  if line.startswith("#"):
33
34
  continue
@@ -36,7 +37,10 @@ def pre_filter_somatic_vcf(
36
37
  log.info(f"Found {len(valid_variant_keys)} valid variants")
37
38
 
38
39
  output_vcf_path = f"{working_dir}/filtered_somatic.vcf.gz"
39
- with gzip.open(somatic_vcf_file, "rt") as f, gzip.open(output_vcf_path, "wt") as w:
40
+ with (
41
+ open_maybe_gzipped(somatic_vcf_file, "rt") as f,
42
+ open_maybe_gzipped(output_vcf_path, "wt") as w,
43
+ ):
40
44
  for line in f:
41
45
  if line.startswith("#"):
42
46
  w.write(line)
@@ -0,0 +1,8 @@
1
+ import gzip
2
+ from typing import cast, TextIO
3
+
4
+
5
+ def open_maybe_gzipped(filename: str, mode: str = "rt") -> TextIO:
6
+ return cast(
7
+ TextIO, gzip.open(filename, mode) if filename.endswith(".gz") else open(filename, mode)
8
+ )
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "phc-ingestion"
3
- version = "0.8.24"
3
+ version = "0.8.25"
4
4
  description = "Functions for LifeOmic PHC genomic ingestions"
5
5
  authors = [
6
6
  { name = "LifeOmic Development", email = "development@lifeomic.com" },
@@ -1,5 +0,0 @@
1
- import gzip
2
-
3
-
4
- def open_maybe_gzipped(filename: str, mode: str = "rt"):
5
- return gzip.open(filename, mode) if filename.endswith(".gz") else open(filename, mode)
File without changes