Skip to content

Commit

Permalink
Merge pull request #74 from oxfordmmm/gumpy-1.3.2
Browse files Browse the repository at this point in the history
bump: use gumpy 1.3.2
  • Loading branch information
JeremyWesthead authored Jun 28, 2024
2 parents b0e0e17 + 52d2183 commit acbbd54
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions gnomonicus/gnomonicus_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,11 @@ def minority_population_variants(
gene_name.append(gene)
g_pos = diff.get_gene_pos(gene, idx, variant)
gene_pos.append(g_pos)
if diff.genome1.genes[gene]["codes_protein"] and g_pos > 0:
if (
diff.genome1.genes[gene]["codes_protein"]
and g_pos is not None
and g_pos > 0
):
# Get codon idx
nc_idx = diff.genome1.stacked_nucleotide_index[
diff.genome1.stacked_gene_name == gene
Expand Down Expand Up @@ -785,7 +789,11 @@ def minority_population_variants(
g_pos = diff.get_gene_pos(gene, idx, variant)
gene_pos.append(g_pos)

if diff.genome1.genes[gene]["codes_protein"] and g_pos > 0:
if (
diff.genome1.genes[gene]["codes_protein"]
and g_pos is not None
and g_pos > 0
):
# Get codon idx
nc_idx = diff.genome1.stacked_nucleotide_index[
diff.genome1.stacked_gene_name == gene
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = gnomonicus
version = 2.6.4
version = 2.6.5
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
Expand All @@ -16,7 +16,7 @@ package_dir =
packages = find:
python_requires = >=3.10
install_requires =
gumpy>=1.3.1
gumpy>=1.3.2
piezo>=0.8.3
vcf_subset>=1.1.2
numpy
Expand Down
Binary file modified tests/test-cases/TEST-DNA-no-overlap.gbk.pkl
Binary file not shown.
Binary file modified tests/test-cases/TEST-DNA.gbk.pkl
Binary file not shown.

0 comments on commit acbbd54

Please sign in to comment.