Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.12.12, 3.13.11, 3.14.2]
python-version: [3.10.20, 3.11.15, 3.12.13, 3.13.13, 3.14.4]

steps:
- uses: actions/checkout@v2
Expand Down
22 changes: 10 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# base image
FROM python:3.9-alpine
FROM docker.io/library/python:3.14.4-alpine3.23

# metadata
LABEL base.image="python:3.9"
LABEL software="hAMRonization"
ARG SOFTWARE_VERSION=unspecified
LABEL software_version=$SOFTWARE_VERSION
LABEL description="Tool to identify resistance genes using the CARD database"
LABEL website="https://github.com/pha4ge/hAMRonization"
LABEL documentation="https://github.com/pha4ge/hAMRonization/blob/master/README.md"
LABEL license="https://github.com/pha4ge/hAMRonization/blob/master/LICENSE.txt"
LABEL org.opencontainers.image.version=1.2.1
LABEL org.opencontainers.image.base.name="docker.io/library/python:3.14.4-alpine3.23"
LABEL org.opencontainers.image.base.digest="sha256:105efb1f600e4e5d216985f6eeda0ed853ff9b38e65877039781f448ed677a0f"
LABEL org.opencontainers.image.title="hAMRronization"
LABEL org.opencontainers.image.title="Parse multiple Antimicrobial Resistance Analysis Reports into a common data structure"
LABEL org.opencontainers.image.source="https://github.com/pha4ge/hAMRonization"
LABEL org.opencontainers.image.documentation="https://github.com/pha4ge/hAMRonization/blob/master/README.md"
LABEL org.opencontainers.image.licenses="LGPL-3.0-only"
LABEL org.opencontainers.image.authors="Finlay Maguire <finlaymaguire@gmail.com>, Marco van Zwetselaar <io@zwets.it>"
LABEL tags="Genomics"

# maintainer
MAINTAINER Finlay Maguire <finlaymaguire@gmail.com>

# add bash so Nextflow can run the container
RUN apk add --no-cache bash && rm -rf /var/cache/apk/*

Expand Down
2 changes: 1 addition & 1 deletion hAMRonization/Interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def write(
# to get first result to build csvwriter
try:
first_result = next(self)
fieldnames = [f.name for f in dataclasses.fields(type(first_result))]
fieldnames = [f.name for f in dataclasses.fields(type(first_result))]
writer = csv.DictWriter(
out_fh,
delimiter="\t",
Expand Down
2 changes: 1 addition & 1 deletion hAMRonization/ResFinderIO.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def set_variation_fields(r, vs):
and p.get('amr_resistant', False), data['phenotypes'].values()):
amr_cls.update(p.get('amr_classes', []))
amr_res.add(p.get('amr_resistance', "unspecified"))
vs_dict[v['key']] = v # need to do this in inner loop but dups will squish
vs_dict[v['key']] = v # need to do this in inner loop but dups will squish

# If we collected variants with resistant phenotypes then emit a record
if vs_dict:
Expand Down
2 changes: 1 addition & 1 deletion hAMRonization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

__version__ = "1.2.0"
__version__ = "1.2.1"

from hAMRonization import AbricateIO
from hAMRonization import AmrFinderPlusIO
Expand Down
2 changes: 1 addition & 1 deletion hAMRonization/hamronize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import hAMRonization

Expand Down
5 changes: 5 additions & 0 deletions hAMRonization/summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,11 @@ def summarize_reports(report_paths, summary_type, output_path=None):
file=sys.stderr,
)

# prevent columns of int type to be converted to float if they have NA values
# Fixes: https://github.com/zwets/hAMRonization/issues/1
# See: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.convert_dtypes.html
combined_reports = combined_reports.convert_dtypes()

# sort records by input_file_name, tool_config i.e. toolname, version,
# db_name, db_versions, and then within that by gene_symbol
combined_reports = combined_reports.sort_values(
Expand Down
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
download_url=f"https://github.com/pha4ge/archive/v{version}.tar.gz",
keywords=["Genomics", "Antimicrobial resistance", "Antibiotic",
"Standardization"],
python_requires='>=3.7',
python_requires='>=3.10',
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=['pandas'],
Expand All @@ -40,9 +40,11 @@
"Operating System :: POSIX",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Intended Audience :: Science/Research",
"Intended Audience :: Healthcare Industry",
"Topic :: Scientific/Engineering :: Bio-Informatics"
Expand Down
Loading