phc-ingestion 0.9.2__py3-none-any.whl → 0.9.3__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.
- ingestion/nebula/__init__.py +1 -0
- ingestion/nebula/process.py +46 -0
- {phc_ingestion-0.9.2.dist-info → phc_ingestion-0.9.3.dist-info}/METADATA +1 -1
- {phc_ingestion-0.9.2.dist-info → phc_ingestion-0.9.3.dist-info}/RECORD +5 -3
- {phc_ingestion-0.9.2.dist-info → phc_ingestion-0.9.3.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from ingestion.nebula.process import process
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from ingestion.vcf_standardization.standardize import standardize_vcf
|
|
4
|
+
from lifeomic_logging import scoped_logger
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def process(vcf_file: str, source_file_id: str, out_path: str, case_id: str) -> dict:
|
|
8
|
+
with scoped_logger(__name__) as log:
|
|
9
|
+
# TODO: do we need to take in + process the manifest file here?
|
|
10
|
+
|
|
11
|
+
# Process VCF
|
|
12
|
+
base_vcf_file = os.path.basename(vcf_file)
|
|
13
|
+
vcf_out = base_vcf_file.replace(".vcf", ".modified.vcf")
|
|
14
|
+
vcf_final = base_vcf_file.replace(".vcf", ".modified.nrm.filtered.vcf")
|
|
15
|
+
if not vcf_final.endswith(".gz"):
|
|
16
|
+
vcf_final = vcf_final + ".gz"
|
|
17
|
+
|
|
18
|
+
# Assuming Nebula VCFs are germline
|
|
19
|
+
sample_name = f"germline_{case_id}"
|
|
20
|
+
vcf_line_count = standardize_vcf(
|
|
21
|
+
vcf_file, vcf_out, out_path, sample_name, log, compression=True
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
# Create a basic manifest for the Nebula VCF
|
|
25
|
+
manifest = {
|
|
26
|
+
"testType": "Nebula",
|
|
27
|
+
"sourceFileId": source_file_id,
|
|
28
|
+
"reference": "GRCh38", # Assuming GRCh38, adjust as needed
|
|
29
|
+
"resources": [{"fileName": f".lifeomic/nebula/{case_id}/{base_vcf_file}"}],
|
|
30
|
+
"files": [
|
|
31
|
+
{
|
|
32
|
+
"fileName": f".lifeomic/nebula/{case_id}/{vcf_final}",
|
|
33
|
+
"sequenceType": "germline",
|
|
34
|
+
"type": "shortVariant",
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
case_metadata = {
|
|
40
|
+
"test_type": "Nebula",
|
|
41
|
+
"vcf_line_count": vcf_line_count,
|
|
42
|
+
"case_id": case_id,
|
|
43
|
+
"germline_genome_reference": manifest["reference"],
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return case_metadata, manifest
|
|
@@ -28,6 +28,8 @@ ingestion/foundation/util/vcf_etl.py,sha256=ZBrX1XGRz-ymLUEiVcjjqmPZPb-AfD9On8Uk
|
|
|
28
28
|
ingestion/generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
ingestion/generic/process.py,sha256=ZaVnZ_gx9faDUsuresI1A0oCegTa-dPQT7DBFMeZGyY,1777
|
|
30
30
|
ingestion/generic/utils.py,sha256=1MEIru7uq38IjUdL8lcHqDH0oTki9uWrz1f2e-pmRoU,2814
|
|
31
|
+
ingestion/nebula/__init__.py,sha256=VauK-rup_N8ZXVohx3HYqHX_PE_WoPyMUhdv2R7al4o,45
|
|
32
|
+
ingestion/nebula/process.py,sha256=Ss2hReq9dAYFcBC4r89RYKcdE6cdUNXvgH2VMBijJPM,1687
|
|
31
33
|
ingestion/nextgen/__init__.py,sha256=7LQ-h_Bvc5P1QcHMdzsqi1Qm4fTJn04-ozar2ty9wSc,59
|
|
32
34
|
ingestion/nextgen/process.py,sha256=5Z0RfclwTAYZruGDiLPutjPCYFh1DJpoWY9dnttghT4,3993
|
|
33
35
|
ingestion/nextgen/util/alteration_table.py,sha256=JTWBL1Fqj_pGsH5vwuVEnCUJle2wOBk6VYImHYCF9vg,6129
|
|
@@ -54,6 +56,6 @@ ingestion/vcf_standardization/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
|
54
56
|
ingestion/vcf_standardization/util/af_helpers.py,sha256=dpTzoeIQVeBRt0ETF3a9rp5ojZqznHg4x_hCZ8OPcOg,1061
|
|
55
57
|
ingestion/vcf_standardization/util/dp_helpers.py,sha256=Nq8oLOLObu4_pv16qwwgpALRlUoJVCULrd9cFOD-eoI,823
|
|
56
58
|
ingestion/vcf_standardization/util/read_write.py,sha256=x3Pf6Dq8tmolblbCS5CrNmrcHS3FGfqBSFpFgvFGC4g,2526
|
|
57
|
-
phc_ingestion-0.9.
|
|
58
|
-
phc_ingestion-0.9.
|
|
59
|
-
phc_ingestion-0.9.
|
|
59
|
+
phc_ingestion-0.9.3.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
|
|
60
|
+
phc_ingestion-0.9.3.dist-info/METADATA,sha256=BeKjYNu_HC4PvcMS57E38mys7Q2gvpcrDTvaI0vvdPs,572
|
|
61
|
+
phc_ingestion-0.9.3.dist-info/RECORD,,
|
|
File without changes
|