From da4b3d7f26ee10dcabfe7dfe1ebb8bdf5f350d3d Mon Sep 17 00:00:00 2001 From: JeremyWesthead Date: Wed, 9 Oct 2024 10:01:21 +0100 Subject: [PATCH 1/3] bump: grump 0.2.2 --- gnomonicus/gnomonicus_lib.py | 6 ++++-- setup.cfg | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gnomonicus/gnomonicus_lib.py b/gnomonicus/gnomonicus_lib.py index ba457f9..9a147b6 100644 --- a/gnomonicus/gnomonicus_lib.py +++ b/gnomonicus/gnomonicus_lib.py @@ -50,6 +50,8 @@ def parse_grumpy_evidence(evidence: grumpy.VCFRow) -> dict: Returns: dict: Parsed evidence """ + print(evidence, type(evidence), dir(evidence)) + print(evidence.position) ev = {} for key, value in evidence.fields.items(): item: list[int | float | None] | int | float | None = [] @@ -135,7 +137,7 @@ def populateVariants( vals["nucleotide_index"].append(variant.nucleotide_index) vals["indel_length"].append(variant.indel_length) vals["indel_nucleotides"].append(variant.indel_nucleotides) - vals["vcf_evidence"].append(json.dumps(parse_grumpy_evidence(variant.evidence))) + vals["vcf_evidence"].append(json.dumps(parse_grumpy_evidence(sample.get_vcf_row(variant.evidence)))) vals["vcf_idx"].append(variant.vcf_idx) vals["gene"].append(variant.gene_name) vals["gene_position"].append(variant.gene_position) @@ -146,7 +148,7 @@ def populateVariants( vals["nucleotide_index"].append(variant.nucleotide_index) vals["indel_length"].append(variant.indel_length) vals["indel_nucleotides"].append(variant.indel_nucleotides) - vals["vcf_evidence"].append(json.dumps(parse_grumpy_evidence(variant.evidence))) + vals["vcf_evidence"].append(json.dumps(parse_grumpy_evidence(sample.get_vcf_row(variant.evidence)))) vals["vcf_idx"].append(variant.vcf_idx) vals["gene"].append(variant.gene_name) vals["gene_position"].append(variant.gene_position) diff --git a/setup.cfg b/setup.cfg index f923a80..dc0a8fe 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = gnomonicus -version = 3.0.0 +version = 3.0.2 author = Philip W Fowler, Jeremy Westhead author_email = philip.fowler@ndm.ox.ac.uk description = Python code to integrate results of tb-pipeline and provide an antibiogram, mutations and variants @@ -17,9 +17,9 @@ packages = find: python_requires = >=3.10 install_requires = gumpy>=1.3.8 - bio-grumpy>=0.2.0 + bio-grumpy>=0.2.2 piezo>=0.8.4 - vcf_subset>=1.1.2 + vcf_subset>=2.0.0 numpy pandas recursive_diff From c51259df2c57cc3f9808f93afa5077169993425b Mon Sep 17 00:00:00 2001 From: JeremyWesthead Date: Wed, 9 Oct 2024 10:01:34 +0100 Subject: [PATCH 2/3] style: appease pc --- gnomonicus/gnomonicus_lib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gnomonicus/gnomonicus_lib.py b/gnomonicus/gnomonicus_lib.py index 9a147b6..052c8a1 100644 --- a/gnomonicus/gnomonicus_lib.py +++ b/gnomonicus/gnomonicus_lib.py @@ -137,7 +137,9 @@ def populateVariants( vals["nucleotide_index"].append(variant.nucleotide_index) vals["indel_length"].append(variant.indel_length) vals["indel_nucleotides"].append(variant.indel_nucleotides) - vals["vcf_evidence"].append(json.dumps(parse_grumpy_evidence(sample.get_vcf_row(variant.evidence)))) + vals["vcf_evidence"].append( + json.dumps(parse_grumpy_evidence(sample.get_vcf_row(variant.evidence))) + ) vals["vcf_idx"].append(variant.vcf_idx) vals["gene"].append(variant.gene_name) vals["gene_position"].append(variant.gene_position) @@ -148,7 +150,9 @@ def populateVariants( vals["nucleotide_index"].append(variant.nucleotide_index) vals["indel_length"].append(variant.indel_length) vals["indel_nucleotides"].append(variant.indel_nucleotides) - vals["vcf_evidence"].append(json.dumps(parse_grumpy_evidence(sample.get_vcf_row(variant.evidence)))) + vals["vcf_evidence"].append( + json.dumps(parse_grumpy_evidence(sample.get_vcf_row(variant.evidence))) + ) vals["vcf_idx"].append(variant.vcf_idx) vals["gene"].append(variant.gene_name) vals["gene_position"].append(variant.gene_position) From 6485e1460f45ad86583422cc1bc3cf3702f109fd Mon Sep 17 00:00:00 2001 From: JeremyWesthead Date: Wed, 9 Oct 2024 10:04:08 +0100 Subject: [PATCH 3/3] fix: clean up --- gnomonicus/gnomonicus_lib.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/gnomonicus/gnomonicus_lib.py b/gnomonicus/gnomonicus_lib.py index 052c8a1..c95d55d 100644 --- a/gnomonicus/gnomonicus_lib.py +++ b/gnomonicus/gnomonicus_lib.py @@ -50,8 +50,6 @@ def parse_grumpy_evidence(evidence: grumpy.VCFRow) -> dict: Returns: dict: Parsed evidence """ - print(evidence, type(evidence), dir(evidence)) - print(evidence.position) ev = {} for key, value in evidence.fields.items(): item: list[int | float | None] | int | float | None = []