From 441340666a91ebb1a4f343a992a04f939bdd6bc6 Mon Sep 17 00:00:00 2001 From: Marco van Zwetselaar Date: Sat, 21 Dec 2024 04:06:43 +0300 Subject: [PATCH 1/3] Upgrade ResFinder hamronizer to ResFinder 4.6.0 - Now parses the JSON output from ResFinder (4.2.0+) - Integrates ResFinder, PointFinder, and DisinfFinder - Works for both fastq and fasta inputs --- README.md | 2 +- hAMRonization/ResFinderIO.py | 251 +++++++++++++++++++++++++---------- hAMRonization/__init__.py | 4 +- 3 files changed, 184 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index 81aa757..81b2706 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ Currently implemented parsers and the last tool version for which they have been 10. [mykrobe](test/data/raw_outputs/mykrobe/report.json): last updated for v0.8.1 11. [pointfinder](hAMRonization/PointFinderIO.py): last updated for v4.1.0 12. [resfams](hAMRonization/ResFamsIO.py): last updated for hmmer v3.3.2 -13. [resfinder](hAMRonization/ResFinderIO.py): last updated for v4.1.0 +13. [resfinder](hAMRonization/ResFinderIO.py): last updated for v4.6.0 14. [rgi](hAMRonization/RgiIO.py) (includes RGI-BWT) last updated for v5.2.0 15. [srax](hAMRonization/SraxIO.py): last updated for v1.5 16. [srst2](hAMRonization/Srst2IO.py): last updated for v0.2.0 diff --git a/hAMRonization/ResFinderIO.py b/hAMRonization/ResFinderIO.py index 828f51e..be42e1c 100644 --- a/hAMRonization/ResFinderIO.py +++ b/hAMRonization/ResFinderIO.py @@ -1,87 +1,198 @@ #!/usr/bin/env python -import csv +import json from .Interfaces import hAMRonizedResultIterator -from hAMRonization.constants import GENE_PRESENCE +from .hAMRonizedResult import hAMRonizedResult +from hAMRonization.constants import (GENE_PRESENCE, NUCLEOTIDE_VARIANT, AMINO_ACID_VARIANT) +# No required metadata, everything is in the JSON required_metadata = [ - "analysis_software_version", - "reference_database_version", - "input_file_name", ] +# Implement Python omission (why have map but not fold?) +def fold(fun, acc, lst): + """Left fold iterable `lst` onto `acc` by iterating `acc = fun(acc, x)`""" + for x in lst: acc = fun(acc, x) + return acc + +# This class is the parser instantiated by the hAMRonize framework to parse +# ResFinder output. Its parse() method must return a hAMRonizedResultIterator +# whose next() method yields the sequence of hAMRonizedResults. +# The confusing bit is that the parser and iterator classes have been smushed +# into a single abstract base class, forcing our class to be both the creator +# of the iterator and the iterator itself. +# class ResFinderIterator(hAMRonizedResultIterator): """ - Updated for ResFinder v4.1 using the `ResFinder_results_tab.txt` output - file + Updated for ResFinder v4.6.0. Processes the `data_resfinder.json` file + which consolidates output from ResFinder, PointFinder, and DisinfFinder. """ def __init__(self, source, metadata): - metadata["reference_database_name"] = "resfinder" - metadata["analysis_software_name"] = "resfinder" - # even though resfinderv4 runs pointfinder - # parsing mutational resistance requires parsing a different file - # to get mutations (pointfinder) - metadata["genetic_variation_type"] = GENE_PRESENCE - self.metadata = metadata - - self.field_mapping = { - "Resistance gene": "gene_symbol", - "Identity": "sequence_identity", - "Alignment Length/Gene Length": None, - "Position in reference": None, - "Contig": "input_sequence_id", - "Position in contig": None, - "Accession no.": "reference_accession", - "Phenotype": "drug_class", - "Coverage": "coverage_percentage", - # decomposed from Position in contig e.g "10432..11277" - "_start": "input_gene_start", - "_stop": "input_gene_stop", - # infered from Position in contig field - "_strand": "strand_orientation", - # Resistance gene is mapped to both symbol and name - "_gene_name": "gene_name", - # decomposed from Alignment Length/Gene Length e.g 1176/1176 - "_reference_gene_length": "reference_gene_length", - } - - super().__init__(source, self.field_mapping, self.metadata) + + # We don't use metadata or field mapping so can just defer to super, + # which will open source and invoke our parse method with the open stream. + super().__init__(source, dict(), metadata) def parse(self, handle): """ - Read each and return it + Implements abstract method parse which gets called from __init__ with + the opened source in handle, and needs to set self up as an iterator + that yields the list of results. """ - reader = csv.DictReader(handle, delimiter="\t") - for result in reader: - result["_gene_name"] = result["Resistance gene"] - # Removes fields that have NA and NA..NA this is typical in the 4.5.0 resfinder when the --inputfastq is implimented - for field, value in result.items(): - if value == "NA": - result[field] = None - if value == "NA..NA": - result[field] = None - # If result["Position in contig"] == None then make _start, _stop and _strand = None - if result["Position in contig"] != None: - _start, _stop = result["Position in contig"].split("..") - if _start > _stop : - _strand = "-" - else: - _strand = "+" - - result["_start"] = _start - result["_stop"] = _stop - result["_strand"] = _strand - else: - _strand = None - result["_start"] = None - result["_stop"] = None - result["_strand"] = None - - _reference_gene_length = result["Alignment Length/Gene Length"].split("/")[ - 0 - ] - result["_reference_gene_length"] = _reference_gene_length - yield self.hAMRonize(result, self.metadata) - result = {} + + # Result to be returned, with mandatory initialisations of the 9 "positional" args + res = hAMRonizedResult('', '', '', '', '', '', '', '', '') + + # Input data read in ResFinder 4.2+ JSON format. This has three main elements: + # - seq_regions: loci/genes that were found, keying into 0 or more phenotypes + # - seq_variations: mutations that key into a seq_region and 0 or more phenotypes + # - phenotypes: antimicriobals keying back into the above objects + data = json.load(handle) + + # Helpers to fetch database name and version from the JSON data + _dbs = data['databases'] + _unk_db = { 'database_name': "ref-error", 'database_version': "ref-error" } + _get_db_name = lambda ks: _dbs.get(ks[0], _unk_db).get('database_name',"no-name") if ks else "unspecified" + _get_db_ver = lambda ks: _dbs.get(ks[0], _unk_db).get('database_version',"no-version") if ks else "unspecified" + + # Helpers to flip start and end positions and yield strand + _get_start_pos = lambda p0, p1: None if not (type(p0) is int and type(p1) is int) else p0 if p0 <= p1 else p1 + _get_end_pos = lambda p0, p1: None if not (type(p0) is int and type(p1) is int) else p1 if p1 >= p1 else p0 + _get_strand = lambda p0, p1: None if not (type(p0) is int and type(p1) is int) else '+' if p0 <= p1 else '-' + _get_length = lambda p0, p1: None if not (type(p0) is int and type(p1) is int) else abs(p1 - p0) + 1 + _get_var_pos = lambda v: v.get('ref_start_pos', 0) + _empty_to_none = lambda s: s if len(s) else None # turns string '' into None + _round = lambda n, d: None if n is None else round(n, d) + + # Helper to condense notes and PMID references into a single line + def _condense_notes(notes, pmids): + lines = [] + lines += filter(None, notes) + pmids = list(filter(None, pmids)) + if pmids: + lines.append("PMIDs: " + ", ".join(set(pmids))) + return ". ".join(lines) if lines else None + + # Setter for the hAMRonizedResult fields related to genes + def set_shared_fields(r): + """Sets all fields in res that relate to region r. Applies to both gene and mutation results.""" + + # mandatory + res.gene_symbol = r.get('name',"unspecified") + res.gene_name = r.get('name',"unspecified") + res.reference_accession = r.get('ref_acc', r.get('ref_id', r.get('key', "unknown"))) + + # optional + res.coverage_percentage = _round(r.get('coverage'), 1) + res.coverage_depth = None # we may have this for mutations detected from reads + res.coverage_ratio = r.get('coverage')/100.0 + res.input_sequence_id = r.get('query_id') + res.input_gene_length = _get_length(r.get('query_start_pos'), r.get('query_end_pos')) + res.input_gene_start = _get_start_pos(r.get('query_start_pos'), r.get('query_end_pos')) + res.input_gene_stop = _get_end_pos(r.get('query_start_pos'), r.get('query_end_pos')) + res.strand_orientation = _get_strand(r.get('query_start_pos'), r.get('query_end_pos')) + res.predicted_phenotype = _empty_to_none(", ".join(r.get('phenotypes', []))) + res.predicted_phenotype_confidence_level = _condense_notes(r.get('notes'), r.get('pmids')) + res.reference_gene_length = r.get('ref_seq_length') + res.reference_gene_start = r.get('ref_start_pos') + res.reference_gene_stop = r.get('ref_end_pos') + res.resistance_mechanism = None # This is available in phenotypes.txt but not in the JSON + res.sequence_identity = _round(r.get('identity'), 2) + + # Zap these by default, will only be set in seq_variations below + res.amino_acid_mutation = None + res.amino_acid_mutation_interpretation = None + res.nucleotide_mutation = None + res.nucleotide_mutation_interpretation = None + + # Setter for the hAMRonizedResult fields related to mutations + def set_variation_fields(r, vs): + """Sets the mutation-specific fields in res, aggregating from all variations in vs on region r.""" + + # Bags to collect variations, phenotypes and notes across the variations + _aa_vars = list() + _nt_vars = list() + _codon = list() + _phenos = set() + _notes = set() + _pmids = set() + + # Iterate v over the variations in vs that lie on region r in order of their position + # (variation->regions strangely is a list, so we need to check if r.key is in it) + for v in sorted(filter(lambda v: r['key'] in v.get('seq_regions',[]), vs), + key=lambda v: v.get('ref_start_pos', 0)): + + # May need refinement to properly accommodate inserts and deletes, + # though it seems recent Res/PointFinder output uses HGVS coordinates. + _seq_var = v.get('seq_var', '') + if _seq_var.startswith('p'): + res.genetic_variation_type = AMINO_ACID_VARIANT # override default set above + _aa_vars.append(_seq_var) + elif _seq_var: + _nt_vars.append(_seq_var) + + _cod_chg = v.get('codon_change') + if _cod_chg: + _codon.append(v.get('codon_change')) + + # Add the content of the list fields to the bags above + fold(lambda s, e: s.add(e), _phenos, v.get('phenotypes', [])) + fold(lambda s, e: s.add(e), _notes, v.get('notes', [])) + fold(lambda s, e: s.add(e), _pmids, v.get('pmids', [])) + + # We have collected all variations on region r, now collapse into fields on res + res.predicted_phenotype = _empty_to_none(", ".join(filter(None, _phenos))) + res.predicted_phenotype_confidence_level = _condense_notes(_notes, _pmids) + res.amino_acid_mutation = _empty_to_none(", ".join(filter(None, _aa_vars))) + res.nucleotide_mutation = _empty_to_none(", ".join(filter(None, _nt_vars))) + res.nucleotide_mutation_interpretation = ("Codon changes: " + " ".join(_codon)) if _codon else None + + # --- Do the actual work --- # + + # Set the fields that are independent of gene, mutation, phenotype + res.input_file_name = data['software_executions'].copy().popitem()[1]['parameters']['sample_name'] + res.analysis_software_name = data['software_name'] + res.analysis_software_version = data['software_version'] + + # We flatten the ResFinder data graph as follows + # - iterate over all phenotypes p (generally: antimicrobials) that have amr_resistant=true + # - iterate over the seq_regions r referenced by p (generally: resistance genes) + # - for each r report a GENE_PRESENCE + # - group the seq_variations referenced by p by the seq_region r they lie on + # - iterate over the regions r + # - for each r report one AMINO_ACID_VARIANT record, collapsing the seq_variations + for p in filter(lambda d: d.get('amr_resistant', False), data['phenotypes'].values()): + + # Set the fields available on phenotype object + res.drug_class = ", ".join(p.get('amr_classes', [])) + res.antimicrobial_agent = p.get('amr_resistance', "unspecified") + res.reference_database_name = _get_db_name(p.get('ref_database')) + res.reference_database_version = _get_db_ver(p.get('ref_database')) + + # Iterate r over the regions (AMR genes) referenced by p, and yield each in turn + for r in map(lambda k: data['seq_regions'][k], p.get('seq_regions',[])): + + res.genetic_variation_type = GENE_PRESENCE + set_shared_fields(r) + + # Yield a new hAMRonizedResult ours using super's method as that may do the needful + yield self.hAMRonize(None, res.__dict__) + + # Collect the list of seq_variations (if any) referenced from phenotype p, + # and the set of regions that these mutations lie on, so that we iterate + # these regions and "collapse" all mutations for that region onto one record + vs = list(map(lambda k: data['seq_variations'][k], p.get('seq_variations',[]))) + rs = set(fold(lambda a, v: a + v.get('seq_regions',[]), [], vs)) + + # Iterate r over each region referenced by some set of variations, and yield each + for r in map(lambda k: data['seq_regions'][k], rs): + + res.genetic_variation_type = NUCLEOTIDE_VARIANT # default may be overridden + set_shared_fields(r) + set_variation_fields(r, vs) + + # Yield a new hAMRonizedResult ours using super's method as that may do the needful + yield self.hAMRonize(None, res.__dict__) + diff --git a/hAMRonization/__init__.py b/hAMRonization/__init__.py index 8cf0b53..c4b558d 100644 --- a/hAMRonization/__init__.py +++ b/hAMRonization/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -__version__ = "1.1.7" +__version__ = "1.1.8" from hAMRonization import AbricateIO from hAMRonization import AmrFinderPlusIO @@ -47,7 +47,7 @@ "amrfinderplus": "OUTPUT.tsv", "ariba": "OUTDIR/OUTPUT.tsv", "rgi": "OUTPUT.txt or OUTPUT_bwtoutput.gene_mapping_data.txt", - "resfinder": "ResFinder_results_tab.txt", + "resfinder": "data_resfinder.json", "srax": "sraX_detected_ARGs.tsv", "deeparg": "OUTDIR/OUTPUT.mapping.ARG", "kmerresistance": "OUTPUT.res", From b264ce9c2027d013bd070e6b492fa5c5a7d45260 Mon Sep 17 00:00:00 2001 From: Marco van Zwetselaar Date: Sat, 21 Dec 2024 04:27:18 +0300 Subject: [PATCH 2/3] Add unit and integration tests for new ResFinder --- test/.gitignore | 5 + .../dummy/resfinder/ResFinder_results_tab.txt | 2 - test/data/dummy/resfinder/data_resfinder.json | 1 + .../resfinder_inputfastq_inputfasta.txt | 2 - .../raw_outputs/resfinder/data_resfinder.json | 1 + .../resfinder/resfinder_inputfasta_tab.txt | 15 --- .../resfinder_inputfastq_inputfasta.txt | 14 -- .../resfinder/resfinder_inputfastq_tab.txt | 14 -- test/run_integration_test.sh | 15 +-- test/test_parsing_validity.py | 127 +++++++++++++++--- 10 files changed, 118 insertions(+), 78 deletions(-) create mode 100644 test/.gitignore delete mode 100644 test/data/dummy/resfinder/ResFinder_results_tab.txt create mode 100644 test/data/dummy/resfinder/data_resfinder.json delete mode 100644 test/data/dummy/resfinder/resfinder_inputfastq_inputfasta.txt create mode 100644 test/data/raw_outputs/resfinder/data_resfinder.json delete mode 100644 test/data/raw_outputs/resfinder/resfinder_inputfasta_tab.txt delete mode 100644 test/data/raw_outputs/resfinder/resfinder_inputfastq_inputfasta.txt delete mode 100644 test/data/raw_outputs/resfinder/resfinder_inputfastq_tab.txt mode change 100644 => 100755 test/run_integration_test.sh diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 0000000..7f4d623 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,5 @@ +/hamronized_*.json +/hamronized_*.tsv +/summary.html +/summary.json +/summary.tsv diff --git a/test/data/dummy/resfinder/ResFinder_results_tab.txt b/test/data/dummy/resfinder/ResFinder_results_tab.txt deleted file mode 100644 index e5550cd..0000000 --- a/test/data/dummy/resfinder/ResFinder_results_tab.txt +++ /dev/null @@ -1,2 +0,0 @@ -Resistance gene Identity Alignment Length/Gene Length Coverage Position in reference Contig Position in contig Phenotype Accession no. -oqxA 99.58 1176/1176 100.0 1..1176 NZ_LR792628.1 Klebsiella pneumoniae isolate SB5881 chromosome SB5881_omosome 1333608..1334783 Quinolone resistance EU370913 \ No newline at end of file diff --git a/test/data/dummy/resfinder/data_resfinder.json b/test/data/dummy/resfinder/data_resfinder.json new file mode 100644 index 0000000..e23a0ae --- /dev/null +++ b/test/data/dummy/resfinder/data_resfinder.json @@ -0,0 +1 @@ +{"type": "software_result", "databases": {"ResFinder-2.4.0": {"type": "database", "database_name": "ResFinder", "database_version": "2.4.0", "key": "ResFinder-2.4.0", "database_commit": "d1e607b8989260c7b6a3fbce8fa3204ecfc09022"}, "PointFinder-4.1.1": {"type": "database", "database_name": "PointFinder", "database_version": "4.1.1", "key": "PointFinder-4.1.1", "database_commit": "694919f59a38980204009e7ade76bf319cb7df0b"}, "DisinFinder-2.0.1": {"type": "database", "database_name": "DisinFinder", "database_version": "2.0.1", "key": "DisinFinder-2.0.1", "database_commit": "09fc831ad80a1e351b36657b8c9eb89fb4fdbfac"}}, "seq_regions": {"OqxA;;1;;EU370913": {"type": "seq_region", "phenotypes": ["ciprofloxacin", "nalidixic acid", "trimethoprim", "chloramphenicol"], "ref_database": ["ResFinder-2.4.0", "DisinFinder-2.0.1"], "gene": true, "ref_id": "OqxA_1_EU370913", "name": "OqxA", "ref_acc": "EU370913", "identity": 100.0, "alignment_length": 1176, "ref_seq_length": 1176, "ref_start_pos": 1, "ref_end_pos": 1176, "query_id": "contig1", "query_start_pos": 101, "query_end_pos": 1276, "pmids": ["18440636"], "notes": ["Must be in an operon with oqxB,phenotype differs based on genomic location of the operon PMID 25801572,also nitrofurantoin resistance PMID 26552976. Natural in K. pneumoniae"], "coverage": 100.0, "grade": 3, "key": "OqxA;;1;;EU370913"}, "pbp5;;1;;AAK43724.1": {"type": "seq_region", "phenotypes": [], "ref_database": ["PointFinder-4.1.1"], "gene": true, "ref_id": "pbp5_1_AAK43724.1", "name": "pbp5", "ref_acc": "AAK43724.1", "identity": 95.33627884143348, "alignment_length": 2037, "ref_seq_length": 2037, "ref_start_pos": 1, "ref_end_pos": 2037, "query_id": "contig2", "query_start_pos": 64029, "query_end_pos": 66065, "pmids": [], "notes": [], "coverage": 100.0, "grade": 2, "key": "pbp5;;1;;AAK43724.1"}}, "seq_variations": {"pbp5;;1;;AAK43724.1;;24;;a": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.V24A", "ref_codon": "gta", "var_codon": "gca", "codon_change": "gta>gca", "nuc_change": "a", "ref_aa": "v", "var_aa": "a", "ref_start_pos": 24, "ref_end_pos": 24, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_24_a", "key": "pbp5;;1;;AAK43724.1;;24;;a", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;27;;g": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.S27G", "ref_codon": "agt", "var_codon": "ggt", "codon_change": "agt>ggt", "nuc_change": "g", "ref_aa": "s", "var_aa": "g", "ref_start_pos": 27, "ref_end_pos": 27, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_27_g", "key": "pbp5;;1;;AAK43724.1;;27;;g", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;34;;q": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.R34Q", "ref_codon": "cgg", "var_codon": "cag", "codon_change": "cgg>cag", "nuc_change": "q", "ref_aa": "r", "var_aa": "q", "ref_start_pos": 34, "ref_end_pos": 34, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_34_q", "key": "pbp5;;1;;AAK43724.1;;34;;q", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;66;;e": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.G66E", "ref_codon": "gga", "var_codon": "gaa", "codon_change": "gga>gaa", "nuc_change": "e", "ref_aa": "g", "var_aa": "e", "ref_start_pos": 66, "ref_end_pos": 66, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_66_e", "key": "pbp5;;1;;AAK43724.1;;66;;e", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;68;;t": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.A68T", "ref_codon": "gca", "var_codon": "aca", "codon_change": "gca>aca", "nuc_change": "t", "ref_aa": "a", "var_aa": "t", "ref_start_pos": 68, "ref_end_pos": 68, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_68_t", "key": "pbp5;;1;;AAK43724.1;;68;;t", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;85;;d": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.E85D", "ref_codon": "gaa", "var_codon": "gat", "codon_change": "gaa>gat", "nuc_change": "d", "ref_aa": "e", "var_aa": "d", "ref_start_pos": 85, "ref_end_pos": 85, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_85_d", "key": "pbp5;;1;;AAK43724.1;;85;;d", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;100;;q": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.E100Q", "ref_codon": "gag", "var_codon": "cag", "codon_change": "gag>cag", "nuc_change": "q", "ref_aa": "e", "var_aa": "q", "ref_start_pos": 100, "ref_end_pos": 100, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_100_q", "key": "pbp5;;1;;AAK43724.1;;100;;q", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;144;;q": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.K144Q", "ref_codon": "aaa", "var_codon": "caa", "codon_change": "aaa>caa", "nuc_change": "q", "ref_aa": "k", "var_aa": "q", "ref_start_pos": 144, "ref_end_pos": 144, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_144_q", "key": "pbp5;;1;;AAK43724.1;;144;;q", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;172;;a": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.T172A", "ref_codon": "aca", "var_codon": "gca", "codon_change": "aca>gca", "nuc_change": "a", "ref_aa": "t", "var_aa": "a", "ref_start_pos": 172, "ref_end_pos": 172, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_172_a", "key": "pbp5;;1;;AAK43724.1;;172;;a", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;177;;i": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.L177I", "ref_codon": "tta", "var_codon": "ata", "codon_change": "tta>ata", "nuc_change": "i", "ref_aa": "l", "var_aa": "i", "ref_start_pos": 177, "ref_end_pos": 177, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_177_i", "key": "pbp5;;1;;AAK43724.1;;177;;i", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;204;;g": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.D204G", "ref_codon": "gac", "var_codon": "ggc", "codon_change": "gac>ggc", "nuc_change": "g", "ref_aa": "d", "var_aa": "g", "ref_start_pos": 204, "ref_end_pos": 204, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_204_g", "key": "pbp5;;1;;AAK43724.1;;204;;g", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;216;;s": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.A216S", "ref_codon": "gca", "var_codon": "tcc", "codon_change": "gca>tcc", "nuc_change": "s", "ref_aa": "a", "var_aa": "s", "ref_start_pos": 216, "ref_end_pos": 216, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_216_s", "key": "pbp5;;1;;AAK43724.1;;216;;s", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;324;;a": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.T324A", "ref_codon": "aca", "var_codon": "gca", "codon_change": "aca>gca", "nuc_change": "a", "ref_aa": "t", "var_aa": "a", "ref_start_pos": 324, "ref_end_pos": 324, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_324_a", "key": "pbp5;;1;;AAK43724.1;;324;;a", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;496;;k": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.N496K", "ref_codon": "aat", "var_codon": "aaa", "codon_change": "aat>aaa", "nuc_change": "k", "ref_aa": "n", "var_aa": "k", "ref_start_pos": 496, "ref_end_pos": 496, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_496_k", "key": "pbp5;;1;;AAK43724.1;;496;;k", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;499;;t": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.A499T", "ref_codon": "gca", "var_codon": "aca", "codon_change": "gca>aca", "nuc_change": "t", "ref_aa": "a", "var_aa": "t", "ref_start_pos": 499, "ref_end_pos": 499, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_499_t", "key": "pbp5;;1;;AAK43724.1;;499;;t", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;525;;d": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.E525D", "ref_codon": "gag", "var_codon": "gat", "codon_change": "gag>gat", "nuc_change": "d", "ref_aa": "e", "var_aa": "d", "ref_start_pos": 525, "ref_end_pos": 525, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_525_d", "key": "pbp5;;1;;AAK43724.1;;525;;d", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;667;;s": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.P667S", "ref_codon": "ccc", "var_codon": "tcg", "codon_change": "ccc>tcg", "nuc_change": "s", "ref_aa": "p", "var_aa": "s", "ref_start_pos": 667, "ref_end_pos": 667, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_667_s", "key": "pbp5;;1;;AAK43724.1;;667;;s", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}}, "phenotypes": {"gentamicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "gentamicin", "amr_resistance": "gentamicin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "tobramycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "tobramycin", "amr_resistance": "tobramycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "streptomycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "streptomycin", "amr_resistance": "streptomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "amikacin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "amikacin", "amr_resistance": "amikacin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "isepamicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "isepamicin", "amr_resistance": "isepamicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "dibekacin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "dibekacin", "amr_resistance": "dibekacin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "kanamycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "kanamycin", "amr_resistance": "kanamycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "neomycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "neomycin", "amr_resistance": "neomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "lividomycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "lividomycin", "amr_resistance": "lividomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "paromomycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "paromomycin", "amr_resistance": "paromomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ribostamycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ribostamycin", "amr_resistance": "ribostamycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "unknown aminoglycoside": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "unknown aminoglycoside", "amr_resistance": "unknown aminoglycoside", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "butiromycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "butiromycin", "amr_resistance": "butiromycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "butirosin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "butirosin", "amr_resistance": "butirosin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "hygromycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "hygromycin", "amr_resistance": "hygromycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "netilmicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "netilmicin", "amr_resistance": "netilmicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "apramycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "apramycin", "amr_resistance": "apramycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "sisomicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "sisomicin", "amr_resistance": "sisomicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "arbekacin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "arbekacin", "amr_resistance": "arbekacin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "kasugamycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "kasugamycin", "amr_resistance": "kasugamycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "astromicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "astromicin", "amr_resistance": "astromicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "fortimicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "fortimicin", "amr_resistance": "fortimicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "spectinomycin": {"type": "phenotype", "amr_classes": ["aminocyclitol"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "spectinomycin", "amr_resistance": "spectinomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "fluoroquinolone": {"type": "phenotype", "amr_classes": ["quinolone"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "fluoroquinolone", "amr_resistance": "fluoroquinolone", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ciprofloxacin": {"type": "phenotype", "amr_classes": ["quinolone"], "seq_regions": ["OqxA;;1;;EU370913"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "ciprofloxacin", "amr_resistance": "ciprofloxacin", "amr_resistant": true, "amr_species_relevant": true, "grade": 3}, "unknown quinolone": {"type": "phenotype", "amr_classes": ["quinolone"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "unknown quinolone", "amr_resistance": "unknown quinolone", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "nalidixic acid": {"type": "phenotype", "amr_classes": ["quinolone"], "seq_regions": ["OqxA;;1;;EU370913"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "nalidixic acid", "amr_resistance": "nalidixic acid", "amr_resistant": true, "amr_species_relevant": false, "grade": 3}, "amoxicillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "amoxicillin", "amr_resistance": "amoxicillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "amoxicillin+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "amoxicillin+clavulanic acid", "amr_resistance": "amoxicillin+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ampicillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": ["pbp5;;1;;AAK43724.1;;24;;a", "pbp5;;1;;AAK43724.1;;27;;g", "pbp5;;1;;AAK43724.1;;34;;q", "pbp5;;1;;AAK43724.1;;66;;e", "pbp5;;1;;AAK43724.1;;68;;t", "pbp5;;1;;AAK43724.1;;85;;d", "pbp5;;1;;AAK43724.1;;100;;q", "pbp5;;1;;AAK43724.1;;144;;q", "pbp5;;1;;AAK43724.1;;172;;a", "pbp5;;1;;AAK43724.1;;177;;i", "pbp5;;1;;AAK43724.1;;204;;g", "pbp5;;1;;AAK43724.1;;216;;s", "pbp5;;1;;AAK43724.1;;324;;a", "pbp5;;1;;AAK43724.1;;496;;k", "pbp5;;1;;AAK43724.1;;499;;t", "pbp5;;1;;AAK43724.1;;525;;d", "pbp5;;1;;AAK43724.1;;667;;s"], "ref_database": ["PointFinder-4.1.1"], "category": "amr", "key": "ampicillin", "amr_resistance": "ampicillin", "amr_resistant": true, "amr_species_relevant": true, "grade": 3}, "ampicillin+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ampicillin+clavulanic acid", "amr_resistance": "ampicillin+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefepime": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefepime", "amr_resistance": "cefepime", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefixime": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefixime", "amr_resistance": "cefixime", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefotaxime": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefotaxime", "amr_resistance": "cefotaxime", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefoxitin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefoxitin", "amr_resistance": "cefoxitin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ceftazidime": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ceftazidime", "amr_resistance": "ceftazidime", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ertapenem": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ertapenem", "amr_resistance": "ertapenem", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "imipenem": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "imipenem", "amr_resistance": "imipenem", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "meropenem": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "meropenem", "amr_resistance": "meropenem", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "piperacillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "piperacillin", "amr_resistance": "piperacillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "piperacillin+tazobactam": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "piperacillin+tazobactam", "amr_resistance": "piperacillin+tazobactam", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "unknown beta-lactam": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "unknown beta-lactam", "amr_resistance": "unknown beta-lactam", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "aztreonam": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "aztreonam", "amr_resistance": "aztreonam", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefotaxime+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefotaxime+clavulanic acid", "amr_resistance": "cefotaxime+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "temocillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "temocillin", "amr_resistance": "temocillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ticarcillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ticarcillin", "amr_resistance": "ticarcillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ceftazidime+avibactam": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ceftazidime+avibactam", "amr_resistance": "ceftazidime+avibactam", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "penicillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "penicillin", "amr_resistance": "penicillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ceftriaxone": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ceftriaxone", "amr_resistance": "ceftriaxone", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ticarcillin+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ticarcillin+clavulanic acid", "amr_resistance": "ticarcillin+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cephalothin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cephalothin", "amr_resistance": "cephalothin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cephalotin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cephalotin", "amr_resistance": "cephalotin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "piperacillin+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "piperacillin+clavulanic acid", "amr_resistance": "piperacillin+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ceftiofur": {"type": "phenotype", "amr_classes": ["under_development"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ceftiofur", "amr_resistance": "ceftiofur", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "sulfamethoxazole": {"type": "phenotype", "amr_classes": ["folate pathway antagonist"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "sulfamethoxazole", "amr_resistance": "sulfamethoxazole", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "trimethoprim": {"type": "phenotype", "amr_classes": ["folate pathway antagonist"], "seq_regions": ["OqxA;;1;;EU370913"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "trimethoprim", "amr_resistance": "trimethoprim", "amr_resistant": true, "amr_species_relevant": false, "grade": 3}, "fosfomycin": {"type": "phenotype", "amr_classes": ["fosfomycin"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "fosfomycin", "amr_resistance": "fosfomycin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "vancomycin": {"type": "phenotype", "amr_classes": ["glycopeptide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "vancomycin", "amr_resistance": "vancomycin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "teicoplanin": {"type": "phenotype", "amr_classes": ["glycopeptide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "teicoplanin", "amr_resistance": "teicoplanin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "bleomycin": {"type": "phenotype", "amr_classes": ["glycopeptide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "bleomycin", "amr_resistance": "bleomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "lincomycin": {"type": "phenotype", "amr_classes": ["lincosamide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "lincomycin", "amr_resistance": "lincomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "clindamycin": {"type": "phenotype", "amr_classes": ["lincosamide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "clindamycin", "amr_resistance": "clindamycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "dalfopristin": {"type": "phenotype", "amr_classes": ["streptogramin a"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "dalfopristin", "amr_resistance": "dalfopristin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "pristinamycin iia": {"type": "phenotype", "amr_classes": ["streptogramin a"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "pristinamycin iia", "amr_resistance": "pristinamycin iia", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "virginiamycin m": {"type": "phenotype", "amr_classes": ["streptogramin a"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "virginiamycin m", "amr_resistance": "virginiamycin m", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "quinupristin+dalfopristin": {"type": "phenotype", "amr_classes": ["streptogramin a"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "quinupristin+dalfopristin", "amr_resistance": "quinupristin+dalfopristin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "tiamulin": {"type": "phenotype", "amr_classes": ["pleuromutilin"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "tiamulin", "amr_resistance": "tiamulin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "carbomycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "carbomycin", "amr_resistance": "carbomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "erythromycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "erythromycin", "amr_resistance": "erythromycin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "azithromycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "azithromycin", "amr_resistance": "azithromycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "oleandomycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "oleandomycin", "amr_resistance": "oleandomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "spiramycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "spiramycin", "amr_resistance": "spiramycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "tylosin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "tylosin", "amr_resistance": "tylosin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "telithromycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "telithromycin", "amr_resistance": "telithromycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "tetracycline": {"type": "phenotype", "amr_classes": ["tetracycline"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "tetracycline", "amr_resistance": "tetracycline", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "doxycycline": {"type": "phenotype", "amr_classes": ["tetracycline"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "doxycycline", "amr_resistance": "doxycycline", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "minocycline": {"type": "phenotype", "amr_classes": ["tetracycline"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "minocycline", "amr_resistance": "minocycline", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "tigecycline": {"type": "phenotype", "amr_classes": ["tetracycline"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "tigecycline", "amr_resistance": "tigecycline", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "quinupristin": {"type": "phenotype", "amr_classes": ["streptogramin b"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "quinupristin", "amr_resistance": "quinupristin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "pristinamycin ia": {"type": "phenotype", "amr_classes": ["streptogramin b"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "pristinamycin ia", "amr_resistance": "pristinamycin ia", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "virginiamycin s": {"type": "phenotype", "amr_classes": ["streptogramin b"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "virginiamycin s", "amr_resistance": "virginiamycin s", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "linezolid": {"type": "phenotype", "amr_classes": ["oxazolidinone"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "linezolid", "amr_resistance": "linezolid", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "chloramphenicol": {"type": "phenotype", "amr_classes": ["amphenicol"], "seq_regions": ["OqxA;;1;;EU370913"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "chloramphenicol", "amr_resistance": "chloramphenicol", "amr_resistant": true, "amr_species_relevant": true, "grade": 3}, "florfenicol": {"type": "phenotype", "amr_classes": ["amphenicol"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "florfenicol", "amr_resistance": "florfenicol", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "colistin": {"type": "phenotype", "amr_classes": ["polymyxin"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "colistin", "amr_resistance": "colistin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "fusidic acid": {"type": "phenotype", "amr_classes": ["steroid antibacterial"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "fusidic acid", "amr_resistance": "fusidic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "mupirocin": {"type": "phenotype", "amr_classes": ["pseudomonic acid"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "mupirocin", "amr_resistance": "mupirocin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "rifampicin": {"type": "phenotype", "amr_classes": ["rifamycin"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "rifampicin", "amr_resistance": "rifampicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "metronidazole": {"type": "phenotype", "amr_classes": ["nitroimidazole"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "metronidazole", "amr_resistance": "metronidazole", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "narasin": {"type": "phenotype", "amr_classes": ["ionophores"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "narasin", "amr_resistance": "narasin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "salinomycin": {"type": "phenotype", "amr_classes": ["ionophores"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "salinomycin", "amr_resistance": "salinomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "maduramicin": {"type": "phenotype", "amr_classes": ["ionophores"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "maduramicin", "amr_resistance": "maduramicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "formaldehyde": {"type": "phenotype", "amr_classes": ["aldehyde"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "formaldehyde", "amr_resistance": "formaldehyde", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "benzylkonium chloride": {"type": "phenotype", "amr_classes": ["quaternary ammonium compound"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "benzylkonium chloride", "amr_resistance": "benzylkonium chloride", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ethidium bromide": {"type": "phenotype", "amr_classes": ["quaternary ammonium compound"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ethidium bromide", "amr_resistance": "ethidium bromide", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "chlorhexidine": {"type": "phenotype", "amr_classes": ["quaternary ammonium compound"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "chlorhexidine", "amr_resistance": "chlorhexidine", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cetylpyridinium chloride": {"type": "phenotype", "amr_classes": ["quaternary ammonium compound"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cetylpyridinium chloride", "amr_resistance": "cetylpyridinium chloride", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "hydrogen peroxide": {"type": "phenotype", "amr_classes": ["peroxide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "hydrogen peroxide", "amr_resistance": "hydrogen peroxide", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "temperature": {"type": "phenotype", "amr_classes": ["heat"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "temperature", "amr_resistance": "temperature", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}}, "software_executions": {"f97782dacc3494a7a2b7ed9aedd9526bd4510d0c": {"type": "software_exec", "command": "/home/ubuntu/hamronization_wf/.snakemake/conda/893fd3be/bin/run_resfinder.py --acquired --point --disinfectant --species Enterococcus faecium --ignore_missing_species -db_res data/dbs/resfinder_db -db_point data/dbs/pointfinder_db -db_disinf data/dbs/disinfinder_db -ifa zwets/HYBRID/hybrid.fna -j results/HYBRID/resfinder/data_resfinder.json -o results/HYBRID/resfinder", "parameters": {"resfinder_root": "/home/ubuntu/hamronization_wf/.snakemake/conda/893fd3be/lib/python3.12/site-packages/resfinder/", "env_var_file": "/home/ubuntu/hamronization_wf/.snakemake/conda/893fd3be/lib/python3.12/site-packages/resfinder/environment_variables.md", "species_abbr_file": "/home/ubuntu/hamronization_wf/.snakemake/conda/893fd3be/lib/python3.12/site-packages/resfinder/species_abbreviations.md", "outputPath": "/home/ubuntu/hamronization_wf/results/HYBRID/resfinder", "out_json": "/home/ubuntu/hamronization_wf/results/HYBRID/resfinder/data_resfinder.json", "acquired": true, "point": true, "disinf": true, "species": "enterococcus faecium", "inputfastq_1": null, "inputfasta": "/home/ubuntu/hamronization_wf/zwets/HYBRID/hybrid.fna", "outPath_res_blast": "/home/ubuntu/hamronization_wf/results/HYBRID/resfinder/resfinder_blast", "outPath_disinf_blast": "/home/ubuntu/hamronization_wf/results/HYBRID/resfinder/disinfinder_blast", "outPath_point_blast": "/home/ubuntu/hamronization_wf/results/HYBRID/resfinder/pointfinder_blast", "sample_name": "hybrid.fna", "method": "blast", "blast": "blastn", "kma": null, "output_aln": false, "pickle": false, "db_path_res": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db", "db_path_res_kma": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db", "db_config_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/config", "db_notes_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/notes.txt", "db_panels_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/phenotype_panels.txt", "rf_gene_cov": 0.6, "rf_gene_id": 0.8, "rf_overlap": 30, "species_dir": "enterococcus_faecium", "db_path_point_root": "/home/ubuntu/hamronization_wf/data/dbs/pointfinder_db", "db_path_point": "/home/ubuntu/hamronization_wf/data/dbs/pointfinder_db/enterococcus_faecium", "specific_gene": null, "pf_gene_cov": 0.01, "pf_gene_id": 0.8, "unknown_mut": false, "ignore_indels": false, "ignore_stop_codons": false, "db_path_disinf": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db", "db_path_disinf_kma": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db", "db_config_disinf_file": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db/config", "db_notes_disinf_file": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db/notes.txt", "dis_gene_cov": 0.6, "dis_overlap": 30, "dis_gene_id": 0.8, "point_file": "/home/ubuntu/hamronization_wf/data/dbs/pointfinder_db/enterococcus_faecium/phenotypes.txt", "abclassdef_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/antibiotic_classes.txt", "phenotype_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/phenotypes.txt", "disinf_file": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db/phenotypes.txt", "disclassdef_file": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db/disinfectant_classes.txt"}, "key": "f97782dacc3494a7a2b7ed9aedd9526bd4510d0c"}}, "aln_hits": {}, "software_name": "ResFinder", "software_version": "4.6.0", "software_commit": "unknown", "run_date": "2024-12-20", "key": "ResFinder-4.6.0", "provided_species": "enterococcus faecium", "result_summary": "CIP_AMP_CHL"} \ No newline at end of file diff --git a/test/data/dummy/resfinder/resfinder_inputfastq_inputfasta.txt b/test/data/dummy/resfinder/resfinder_inputfastq_inputfasta.txt deleted file mode 100644 index 77a1a72..0000000 --- a/test/data/dummy/resfinder/resfinder_inputfastq_inputfasta.txt +++ /dev/null @@ -1,2 +0,0 @@ -Resistance gene Identity Alignment Length/Gene Length Coverage Position in reference Contig Position in contig Phenotype Accession no. -aph(6)-Id 100.00 837/837 100.0 1..838 NA NA..NA Streptomycin M28829 diff --git a/test/data/raw_outputs/resfinder/data_resfinder.json b/test/data/raw_outputs/resfinder/data_resfinder.json new file mode 100644 index 0000000..5555ab9 --- /dev/null +++ b/test/data/raw_outputs/resfinder/data_resfinder.json @@ -0,0 +1 @@ +{"type": "software_result", "databases": {"ResFinder-2.4.0": {"type": "database", "database_name": "ResFinder", "database_version": "2.4.0", "key": "ResFinder-2.4.0", "database_commit": "d1e607b8989260c7b6a3fbce8fa3204ecfc09022"}, "PointFinder-4.1.1": {"type": "database", "database_name": "PointFinder", "database_version": "4.1.1", "key": "PointFinder-4.1.1", "database_commit": "694919f59a38980204009e7ade76bf319cb7df0b"}, "DisinFinder-2.0.1": {"type": "database", "database_name": "DisinFinder", "database_version": "2.0.1", "key": "DisinFinder-2.0.1", "database_commit": "09fc831ad80a1e351b36657b8c9eb89fb4fdbfac"}}, "seq_regions": {"aac(6')-Ii;;1;;L12710": {"type": "seq_region", "phenotypes": ["gentamicin", "tobramycin", "dibekacin", "netilmicin", "sisomicin"], "ref_database": ["ResFinder-2.4.0"], "gene": true, "ref_id": "aac(6')-Ii_1_L12710", "name": "aac(6')-Ii", "ref_acc": "L12710", "identity": 99.81785063752277, "alignment_length": 549, "ref_seq_length": 549, "ref_start_pos": 1, "ref_end_pos": 549, "query_id": "WGS1_465A.1:16 Enterococcus faecium isolate WGS1-465A Contig_28_112.328", "query_start_pos": 13021, "query_end_pos": 13569, "pmids": ["8239603"], "notes": [""], "coverage": 100.0, "grade": 2, "key": "aac(6')-Ii;;1;;L12710"}, "msr(C);;1;;AY004350": {"type": "seq_region", "phenotypes": ["erythromycin", "telithromycin", "quinupristin", "pristinamycin ia", "virginiamycin s"], "ref_database": ["ResFinder-2.4.0"], "gene": true, "ref_id": "msr(C)_1_AY004350", "name": "msr(C)", "ref_acc": "AY004350", "identity": 98.98580121703854, "alignment_length": 1479, "ref_seq_length": 1479, "ref_start_pos": 1, "ref_end_pos": 1479, "query_id": "WGS1_465A.1:6 Enterococcus faecium isolate WGS1-465A Contig_37_128.085", "query_start_pos": 80332, "query_end_pos": 81810, "pmids": ["11120975", "27006457"], "notes": ["ABC transporter"], "coverage": 100.0, "grade": 2, "key": "msr(C);;1;;AY004350"}, "tet(M);;10;;EU182585": {"type": "seq_region", "phenotypes": ["tetracycline", "doxycycline", "minocycline"], "ref_database": ["ResFinder-2.4.0"], "gene": true, "ref_id": "tet(M)_10_EU182585", "name": "tet(M)", "ref_acc": "EU182585", "identity": 96.45833333333333, "alignment_length": 1920, "ref_seq_length": 1920, "ref_start_pos": 1, "ref_end_pos": 1920, "query_id": "WGS1_465A.1:23 Enterococcus faecium isolate WGS1-465A Contig_5_533.496", "query_start_pos": 2893, "query_end_pos": 4812, "pmids": ["unpublished"], "notes": [""], "coverage": 100.0, "grade": 2, "key": "tet(M);;10;;EU182585"}, "tet(L);;2;;M29725": {"type": "seq_region", "phenotypes": ["tetracycline", "doxycycline"], "ref_database": ["ResFinder-2.4.0"], "gene": true, "ref_id": "tet(L)_2_M29725", "name": "tet(L)", "ref_acc": "M29725", "identity": 100.0, "alignment_length": 1377, "ref_seq_length": 1377, "ref_start_pos": 1, "ref_end_pos": 1377, "query_id": "WGS1_465A.1:23 Enterococcus faecium isolate WGS1-465A Contig_5_533.496", "query_start_pos": 5006, "query_end_pos": 6382, "pmids": ["2438417"], "notes": [""], "coverage": 100.0, "grade": 3, "key": "tet(L);;2;;M29725"}, "gyrA;;1;;CP045012.1": {"type": "seq_region", "phenotypes": [], "ref_database": ["PointFinder-4.1.1"], "gene": true, "ref_id": "gyrA_1_CP045012.1", "name": "gyrA", "ref_acc": "CP045012.1", "identity": 99.95949777237747, "alignment_length": 2469, "ref_seq_length": 2469, "ref_start_pos": 1, "ref_end_pos": 2469, "query_id": "WGS1_465A.1:5 Enterococcus faecium isolate WGS1-465A Contig_24_127.412", "query_start_pos": 24825, "query_end_pos": 27293, "pmids": [], "notes": [], "coverage": 100.0, "grade": 2, "key": "gyrA;;1;;CP045012.1"}, "parC;;1;;LR536658.1": {"type": "seq_region", "phenotypes": [], "ref_database": ["PointFinder-4.1.1"], "gene": true, "ref_id": "parC_1_LR536658.1", "name": "parC", "ref_acc": "LR536658.1", "identity": 99.91820040899796, "alignment_length": 2445, "ref_seq_length": 2445, "ref_start_pos": 1, "ref_end_pos": 2445, "query_id": "WGS1_465A.1:18 Enterococcus faecium isolate WGS1-465A Contig_9_99.8366", "query_start_pos": 11623, "query_end_pos": 14067, "pmids": [], "notes": [], "coverage": 100.0, "grade": 2, "key": "parC;;1;;LR536658.1"}, "pbp5;;1;;AAK43724.1": {"type": "seq_region", "phenotypes": [], "ref_database": ["PointFinder-4.1.1"], "gene": true, "ref_id": "pbp5_1_AAK43724.1", "name": "pbp5", "ref_acc": "AAK43724.1", "identity": 95.33627884143348, "alignment_length": 2037, "ref_seq_length": 2037, "ref_start_pos": 1, "ref_end_pos": 2037, "query_id": "WGS1_465A.1:8 Enterococcus faecium isolate WGS1-465A Contig_36_94.6934", "query_start_pos": 64029, "query_end_pos": 66065, "pmids": [], "notes": [], "coverage": 100.0, "grade": 2, "key": "pbp5;;1;;AAK43724.1"}}, "seq_variations": {"pbp5;;1;;AAK43724.1;;24;;a": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.V24A", "ref_codon": "gta", "var_codon": "gca", "codon_change": "gta>gca", "nuc_change": "a", "ref_aa": "v", "var_aa": "a", "ref_start_pos": 24, "ref_end_pos": 24, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_24_a", "key": "pbp5;;1;;AAK43724.1;;24;;a", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;27;;g": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.S27G", "ref_codon": "agt", "var_codon": "ggt", "codon_change": "agt>ggt", "nuc_change": "g", "ref_aa": "s", "var_aa": "g", "ref_start_pos": 27, "ref_end_pos": 27, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_27_g", "key": "pbp5;;1;;AAK43724.1;;27;;g", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;34;;q": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.R34Q", "ref_codon": "cgg", "var_codon": "cag", "codon_change": "cgg>cag", "nuc_change": "q", "ref_aa": "r", "var_aa": "q", "ref_start_pos": 34, "ref_end_pos": 34, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_34_q", "key": "pbp5;;1;;AAK43724.1;;34;;q", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;66;;e": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.G66E", "ref_codon": "gga", "var_codon": "gaa", "codon_change": "gga>gaa", "nuc_change": "e", "ref_aa": "g", "var_aa": "e", "ref_start_pos": 66, "ref_end_pos": 66, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_66_e", "key": "pbp5;;1;;AAK43724.1;;66;;e", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;68;;t": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.A68T", "ref_codon": "gca", "var_codon": "aca", "codon_change": "gca>aca", "nuc_change": "t", "ref_aa": "a", "var_aa": "t", "ref_start_pos": 68, "ref_end_pos": 68, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_68_t", "key": "pbp5;;1;;AAK43724.1;;68;;t", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;85;;d": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.E85D", "ref_codon": "gaa", "var_codon": "gat", "codon_change": "gaa>gat", "nuc_change": "d", "ref_aa": "e", "var_aa": "d", "ref_start_pos": 85, "ref_end_pos": 85, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_85_d", "key": "pbp5;;1;;AAK43724.1;;85;;d", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;100;;q": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.E100Q", "ref_codon": "gag", "var_codon": "cag", "codon_change": "gag>cag", "nuc_change": "q", "ref_aa": "e", "var_aa": "q", "ref_start_pos": 100, "ref_end_pos": 100, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_100_q", "key": "pbp5;;1;;AAK43724.1;;100;;q", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;144;;q": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.K144Q", "ref_codon": "aaa", "var_codon": "caa", "codon_change": "aaa>caa", "nuc_change": "q", "ref_aa": "k", "var_aa": "q", "ref_start_pos": 144, "ref_end_pos": 144, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_144_q", "key": "pbp5;;1;;AAK43724.1;;144;;q", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;172;;a": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.T172A", "ref_codon": "aca", "var_codon": "gca", "codon_change": "aca>gca", "nuc_change": "a", "ref_aa": "t", "var_aa": "a", "ref_start_pos": 172, "ref_end_pos": 172, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_172_a", "key": "pbp5;;1;;AAK43724.1;;172;;a", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;177;;i": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.L177I", "ref_codon": "tta", "var_codon": "ata", "codon_change": "tta>ata", "nuc_change": "i", "ref_aa": "l", "var_aa": "i", "ref_start_pos": 177, "ref_end_pos": 177, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_177_i", "key": "pbp5;;1;;AAK43724.1;;177;;i", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;204;;g": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.D204G", "ref_codon": "gac", "var_codon": "ggc", "codon_change": "gac>ggc", "nuc_change": "g", "ref_aa": "d", "var_aa": "g", "ref_start_pos": 204, "ref_end_pos": 204, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_204_g", "key": "pbp5;;1;;AAK43724.1;;204;;g", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;216;;s": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.A216S", "ref_codon": "gca", "var_codon": "tcc", "codon_change": "gca>tcc", "nuc_change": "s", "ref_aa": "a", "var_aa": "s", "ref_start_pos": 216, "ref_end_pos": 216, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_216_s", "key": "pbp5;;1;;AAK43724.1;;216;;s", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;324;;a": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.T324A", "ref_codon": "aca", "var_codon": "gca", "codon_change": "aca>gca", "nuc_change": "a", "ref_aa": "t", "var_aa": "a", "ref_start_pos": 324, "ref_end_pos": 324, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_324_a", "key": "pbp5;;1;;AAK43724.1;;324;;a", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;496;;k": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.N496K", "ref_codon": "aat", "var_codon": "aaa", "codon_change": "aat>aaa", "nuc_change": "k", "ref_aa": "n", "var_aa": "k", "ref_start_pos": 496, "ref_end_pos": 496, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_496_k", "key": "pbp5;;1;;AAK43724.1;;496;;k", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;499;;t": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.A499T", "ref_codon": "gca", "var_codon": "aca", "codon_change": "gca>aca", "nuc_change": "t", "ref_aa": "a", "var_aa": "t", "ref_start_pos": 499, "ref_end_pos": 499, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_499_t", "key": "pbp5;;1;;AAK43724.1;;499;;t", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;525;;d": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.E525D", "ref_codon": "gag", "var_codon": "gat", "codon_change": "gag>gat", "nuc_change": "d", "ref_aa": "e", "var_aa": "d", "ref_start_pos": 525, "ref_end_pos": 525, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_525_d", "key": "pbp5;;1;;AAK43724.1;;525;;d", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}, "pbp5;;1;;AAK43724.1;;667;;s": {"type": "seq_variation", "ref_database": "PointFinder-4.1.1", "seq_regions": ["pbp5;;1;;AAK43724.1"], "phenotypes": ["ampicillin"], "seq_var": "p.P667S", "ref_codon": "ccc", "var_codon": "tcg", "codon_change": "ccc>tcg", "nuc_change": "s", "ref_aa": "p", "var_aa": "s", "ref_start_pos": 667, "ref_end_pos": 667, "substitution": true, "deletion": false, "insertion": false, "ref_id": "pbp5;;1;;AAK43724.1_667_s", "key": "pbp5;;1;;AAK43724.1;;667;;s", "pmids": ["25182648"], "notes": ["The nineteen pbp5 mutations must be present simultaneously for resistance phenotype"]}}, "phenotypes": {"gentamicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": ["aac(6')-Ii;;1;;L12710"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "gentamicin", "amr_resistance": "gentamicin", "amr_resistant": true, "amr_species_relevant": true, "grade": 2}, "tobramycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": ["aac(6')-Ii;;1;;L12710"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "tobramycin", "amr_resistance": "tobramycin", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "streptomycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "streptomycin", "amr_resistance": "streptomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "amikacin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "amikacin", "amr_resistance": "amikacin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "isepamicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "isepamicin", "amr_resistance": "isepamicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "dibekacin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": ["aac(6')-Ii;;1;;L12710"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "dibekacin", "amr_resistance": "dibekacin", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "kanamycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "kanamycin", "amr_resistance": "kanamycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "neomycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "neomycin", "amr_resistance": "neomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "lividomycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "lividomycin", "amr_resistance": "lividomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "paromomycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "paromomycin", "amr_resistance": "paromomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ribostamycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ribostamycin", "amr_resistance": "ribostamycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "unknown aminoglycoside": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "unknown aminoglycoside", "amr_resistance": "unknown aminoglycoside", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "butiromycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "butiromycin", "amr_resistance": "butiromycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "butirosin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "butirosin", "amr_resistance": "butirosin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "hygromycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "hygromycin", "amr_resistance": "hygromycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "netilmicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": ["aac(6')-Ii;;1;;L12710"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "netilmicin", "amr_resistance": "netilmicin", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "apramycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "apramycin", "amr_resistance": "apramycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "sisomicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": ["aac(6')-Ii;;1;;L12710"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "sisomicin", "amr_resistance": "sisomicin", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "arbekacin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "arbekacin", "amr_resistance": "arbekacin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "kasugamycin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "kasugamycin", "amr_resistance": "kasugamycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "astromicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "astromicin", "amr_resistance": "astromicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "fortimicin": {"type": "phenotype", "amr_classes": ["aminoglycoside"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "fortimicin", "amr_resistance": "fortimicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "spectinomycin": {"type": "phenotype", "amr_classes": ["aminocyclitol"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "spectinomycin", "amr_resistance": "spectinomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "fluoroquinolone": {"type": "phenotype", "amr_classes": ["quinolone"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "fluoroquinolone", "amr_resistance": "fluoroquinolone", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ciprofloxacin": {"type": "phenotype", "amr_classes": ["quinolone"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ciprofloxacin", "amr_resistance": "ciprofloxacin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "unknown quinolone": {"type": "phenotype", "amr_classes": ["quinolone"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "unknown quinolone", "amr_resistance": "unknown quinolone", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "nalidixic acid": {"type": "phenotype", "amr_classes": ["quinolone"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "nalidixic acid", "amr_resistance": "nalidixic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "amoxicillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "amoxicillin", "amr_resistance": "amoxicillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "amoxicillin+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "amoxicillin+clavulanic acid", "amr_resistance": "amoxicillin+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ampicillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": ["pbp5;;1;;AAK43724.1;;24;;a", "pbp5;;1;;AAK43724.1;;27;;g", "pbp5;;1;;AAK43724.1;;34;;q", "pbp5;;1;;AAK43724.1;;66;;e", "pbp5;;1;;AAK43724.1;;68;;t", "pbp5;;1;;AAK43724.1;;85;;d", "pbp5;;1;;AAK43724.1;;100;;q", "pbp5;;1;;AAK43724.1;;144;;q", "pbp5;;1;;AAK43724.1;;172;;a", "pbp5;;1;;AAK43724.1;;177;;i", "pbp5;;1;;AAK43724.1;;204;;g", "pbp5;;1;;AAK43724.1;;216;;s", "pbp5;;1;;AAK43724.1;;324;;a", "pbp5;;1;;AAK43724.1;;496;;k", "pbp5;;1;;AAK43724.1;;499;;t", "pbp5;;1;;AAK43724.1;;525;;d", "pbp5;;1;;AAK43724.1;;667;;s"], "ref_database": ["PointFinder-4.1.1"], "category": "amr", "key": "ampicillin", "amr_resistance": "ampicillin", "amr_resistant": true, "amr_species_relevant": true, "grade": 3}, "ampicillin+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ampicillin+clavulanic acid", "amr_resistance": "ampicillin+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefepime": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefepime", "amr_resistance": "cefepime", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefixime": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefixime", "amr_resistance": "cefixime", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefotaxime": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefotaxime", "amr_resistance": "cefotaxime", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefoxitin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefoxitin", "amr_resistance": "cefoxitin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ceftazidime": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ceftazidime", "amr_resistance": "ceftazidime", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ertapenem": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ertapenem", "amr_resistance": "ertapenem", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "imipenem": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "imipenem", "amr_resistance": "imipenem", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "meropenem": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "meropenem", "amr_resistance": "meropenem", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "piperacillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "piperacillin", "amr_resistance": "piperacillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "piperacillin+tazobactam": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "piperacillin+tazobactam", "amr_resistance": "piperacillin+tazobactam", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "unknown beta-lactam": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "unknown beta-lactam", "amr_resistance": "unknown beta-lactam", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "aztreonam": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "aztreonam", "amr_resistance": "aztreonam", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cefotaxime+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cefotaxime+clavulanic acid", "amr_resistance": "cefotaxime+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "temocillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "temocillin", "amr_resistance": "temocillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ticarcillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ticarcillin", "amr_resistance": "ticarcillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ceftazidime+avibactam": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ceftazidime+avibactam", "amr_resistance": "ceftazidime+avibactam", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "penicillin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "penicillin", "amr_resistance": "penicillin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ceftriaxone": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ceftriaxone", "amr_resistance": "ceftriaxone", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ticarcillin+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ticarcillin+clavulanic acid", "amr_resistance": "ticarcillin+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cephalothin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cephalothin", "amr_resistance": "cephalothin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cephalotin": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cephalotin", "amr_resistance": "cephalotin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "piperacillin+clavulanic acid": {"type": "phenotype", "amr_classes": ["beta-lactam"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "piperacillin+clavulanic acid", "amr_resistance": "piperacillin+clavulanic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ceftiofur": {"type": "phenotype", "amr_classes": ["under_development"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ceftiofur", "amr_resistance": "ceftiofur", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "sulfamethoxazole": {"type": "phenotype", "amr_classes": ["folate pathway antagonist"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "sulfamethoxazole", "amr_resistance": "sulfamethoxazole", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "trimethoprim": {"type": "phenotype", "amr_classes": ["folate pathway antagonist"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "trimethoprim", "amr_resistance": "trimethoprim", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "fosfomycin": {"type": "phenotype", "amr_classes": ["fosfomycin"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "fosfomycin", "amr_resistance": "fosfomycin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "vancomycin": {"type": "phenotype", "amr_classes": ["glycopeptide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "vancomycin", "amr_resistance": "vancomycin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "teicoplanin": {"type": "phenotype", "amr_classes": ["glycopeptide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "teicoplanin", "amr_resistance": "teicoplanin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "bleomycin": {"type": "phenotype", "amr_classes": ["glycopeptide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "bleomycin", "amr_resistance": "bleomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "lincomycin": {"type": "phenotype", "amr_classes": ["lincosamide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "lincomycin", "amr_resistance": "lincomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "clindamycin": {"type": "phenotype", "amr_classes": ["lincosamide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "clindamycin", "amr_resistance": "clindamycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "dalfopristin": {"type": "phenotype", "amr_classes": ["streptogramin a"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "dalfopristin", "amr_resistance": "dalfopristin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "pristinamycin iia": {"type": "phenotype", "amr_classes": ["streptogramin a"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "pristinamycin iia", "amr_resistance": "pristinamycin iia", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "virginiamycin m": {"type": "phenotype", "amr_classes": ["streptogramin a"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "virginiamycin m", "amr_resistance": "virginiamycin m", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "quinupristin+dalfopristin": {"type": "phenotype", "amr_classes": ["streptogramin a"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "quinupristin+dalfopristin", "amr_resistance": "quinupristin+dalfopristin", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "tiamulin": {"type": "phenotype", "amr_classes": ["pleuromutilin"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "tiamulin", "amr_resistance": "tiamulin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "carbomycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "carbomycin", "amr_resistance": "carbomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "erythromycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": ["msr(C);;1;;AY004350"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "erythromycin", "amr_resistance": "erythromycin", "amr_resistant": true, "amr_species_relevant": true, "grade": 2}, "azithromycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "azithromycin", "amr_resistance": "azithromycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "oleandomycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "oleandomycin", "amr_resistance": "oleandomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "spiramycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "spiramycin", "amr_resistance": "spiramycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "tylosin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "tylosin", "amr_resistance": "tylosin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "telithromycin": {"type": "phenotype", "amr_classes": ["macrolide"], "seq_regions": ["msr(C);;1;;AY004350"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "telithromycin", "amr_resistance": "telithromycin", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "tetracycline": {"type": "phenotype", "amr_classes": ["tetracycline"], "seq_regions": ["tet(M);;10;;EU182585", "tet(L);;2;;M29725"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "tetracycline", "amr_resistance": "tetracycline", "amr_resistant": true, "amr_species_relevant": true, "grade": 3}, "doxycycline": {"type": "phenotype", "amr_classes": ["tetracycline"], "seq_regions": ["tet(M);;10;;EU182585", "tet(L);;2;;M29725"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "doxycycline", "amr_resistance": "doxycycline", "amr_resistant": true, "amr_species_relevant": false, "grade": 3}, "minocycline": {"type": "phenotype", "amr_classes": ["tetracycline"], "seq_regions": ["tet(M);;10;;EU182585"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "minocycline", "amr_resistance": "minocycline", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "tigecycline": {"type": "phenotype", "amr_classes": ["tetracycline"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "tigecycline", "amr_resistance": "tigecycline", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "quinupristin": {"type": "phenotype", "amr_classes": ["streptogramin b"], "seq_regions": ["msr(C);;1;;AY004350"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "quinupristin", "amr_resistance": "quinupristin", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "pristinamycin ia": {"type": "phenotype", "amr_classes": ["streptogramin b"], "seq_regions": ["msr(C);;1;;AY004350"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "pristinamycin ia", "amr_resistance": "pristinamycin ia", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "virginiamycin s": {"type": "phenotype", "amr_classes": ["streptogramin b"], "seq_regions": ["msr(C);;1;;AY004350"], "seq_variations": [], "ref_database": ["ResFinder-2.4.0"], "category": "amr", "key": "virginiamycin s", "amr_resistance": "virginiamycin s", "amr_resistant": true, "amr_species_relevant": false, "grade": 2}, "linezolid": {"type": "phenotype", "amr_classes": ["oxazolidinone"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "linezolid", "amr_resistance": "linezolid", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "chloramphenicol": {"type": "phenotype", "amr_classes": ["amphenicol"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "chloramphenicol", "amr_resistance": "chloramphenicol", "amr_resistant": false, "amr_species_relevant": true, "grade": 0}, "florfenicol": {"type": "phenotype", "amr_classes": ["amphenicol"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "florfenicol", "amr_resistance": "florfenicol", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "colistin": {"type": "phenotype", "amr_classes": ["polymyxin"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "colistin", "amr_resistance": "colistin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "fusidic acid": {"type": "phenotype", "amr_classes": ["steroid antibacterial"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "fusidic acid", "amr_resistance": "fusidic acid", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "mupirocin": {"type": "phenotype", "amr_classes": ["pseudomonic acid"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "mupirocin", "amr_resistance": "mupirocin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "rifampicin": {"type": "phenotype", "amr_classes": ["rifamycin"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "rifampicin", "amr_resistance": "rifampicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "metronidazole": {"type": "phenotype", "amr_classes": ["nitroimidazole"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "metronidazole", "amr_resistance": "metronidazole", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "narasin": {"type": "phenotype", "amr_classes": ["ionophores"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "narasin", "amr_resistance": "narasin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "salinomycin": {"type": "phenotype", "amr_classes": ["ionophores"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "salinomycin", "amr_resistance": "salinomycin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "maduramicin": {"type": "phenotype", "amr_classes": ["ionophores"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "maduramicin", "amr_resistance": "maduramicin", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "formaldehyde": {"type": "phenotype", "amr_classes": ["aldehyde"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "formaldehyde", "amr_resistance": "formaldehyde", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "benzylkonium chloride": {"type": "phenotype", "amr_classes": ["quaternary ammonium compound"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "benzylkonium chloride", "amr_resistance": "benzylkonium chloride", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "ethidium bromide": {"type": "phenotype", "amr_classes": ["quaternary ammonium compound"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "ethidium bromide", "amr_resistance": "ethidium bromide", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "chlorhexidine": {"type": "phenotype", "amr_classes": ["quaternary ammonium compound"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "chlorhexidine", "amr_resistance": "chlorhexidine", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "cetylpyridinium chloride": {"type": "phenotype", "amr_classes": ["quaternary ammonium compound"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "cetylpyridinium chloride", "amr_resistance": "cetylpyridinium chloride", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "hydrogen peroxide": {"type": "phenotype", "amr_classes": ["peroxide"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "hydrogen peroxide", "amr_resistance": "hydrogen peroxide", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}, "temperature": {"type": "phenotype", "amr_classes": ["heat"], "seq_regions": [], "seq_variations": [], "ref_database": [], "category": "amr", "key": "temperature", "amr_resistance": "temperature", "amr_resistant": false, "amr_species_relevant": false, "grade": 0}}, "software_executions": {"092ee996264c76ba39099df2e4253f0d8ad05d4b": {"type": "software_exec", "command": "/home/ubuntu/hamronization_wf/.snakemake/conda/893fd3be/bin/run_resfinder.py --acquired --point --disinfectant --species Enterococcus faecium --ignore_missing_species -db_res data/dbs/resfinder_db -db_point data/dbs/pointfinder_db -db_disinf data/dbs/disinfinder_db -ifa zwets/WGS1/WGS1_465A.fna -j results/WGS1_465A/resfinder/data_resfinder.json -o results/WGS1_465A/resfinder", "parameters": {"resfinder_root": "/home/ubuntu/hamronization_wf/.snakemake/conda/893fd3be/lib/python3.12/site-packages/resfinder/", "env_var_file": "/home/ubuntu/hamronization_wf/.snakemake/conda/893fd3be/lib/python3.12/site-packages/resfinder/environment_variables.md", "species_abbr_file": "/home/ubuntu/hamronization_wf/.snakemake/conda/893fd3be/lib/python3.12/site-packages/resfinder/species_abbreviations.md", "outputPath": "/home/ubuntu/hamronization_wf/results/WGS1_465A/resfinder", "out_json": "/home/ubuntu/hamronization_wf/results/WGS1_465A/resfinder/data_resfinder.json", "acquired": true, "point": true, "disinf": true, "species": "enterococcus faecium", "inputfastq_1": null, "inputfasta": "/home/ubuntu/hamronization_wf/zwets/WGS1/WGS1_465A.fna", "outPath_res_blast": "/home/ubuntu/hamronization_wf/results/WGS1_465A/resfinder/resfinder_blast", "outPath_disinf_blast": "/home/ubuntu/hamronization_wf/results/WGS1_465A/resfinder/disinfinder_blast", "outPath_point_blast": "/home/ubuntu/hamronization_wf/results/WGS1_465A/resfinder/pointfinder_blast", "sample_name": "resfinder_report.fna", "method": "blast", "blast": "blastn", "kma": null, "output_aln": false, "pickle": false, "db_path_res": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db", "db_path_res_kma": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db", "db_config_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/config", "db_notes_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/notes.txt", "db_panels_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/phenotype_panels.txt", "rf_gene_cov": 0.6, "rf_gene_id": 0.8, "rf_overlap": 30, "species_dir": "enterococcus_faecium", "db_path_point_root": "/home/ubuntu/hamronization_wf/data/dbs/pointfinder_db", "db_path_point": "/home/ubuntu/hamronization_wf/data/dbs/pointfinder_db/enterococcus_faecium", "specific_gene": null, "pf_gene_cov": 0.01, "pf_gene_id": 0.8, "unknown_mut": false, "ignore_indels": false, "ignore_stop_codons": false, "db_path_disinf": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db", "db_path_disinf_kma": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db", "db_config_disinf_file": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db/config", "db_notes_disinf_file": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db/notes.txt", "dis_gene_cov": 0.6, "dis_overlap": 30, "dis_gene_id": 0.8, "point_file": "/home/ubuntu/hamronization_wf/data/dbs/pointfinder_db/enterococcus_faecium/phenotypes.txt", "abclassdef_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/antibiotic_classes.txt", "phenotype_file": "/home/ubuntu/hamronization_wf/data/dbs/resfinder_db/phenotypes.txt", "disinf_file": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db/phenotypes.txt", "disclassdef_file": "/home/ubuntu/hamronization_wf/data/dbs/disinfinder_db/disinfectant_classes.txt"}, "key": "092ee996264c76ba39099df2e4253f0d8ad05d4b"}}, "aln_hits": {}, "software_name": "ResFinder", "software_version": "4.6.0", "software_commit": "unknown", "run_date": "2024-12-18", "key": "ResFinder-4.6.0", "provided_species": "enterococcus faecium", "result_summary": "GEN_AMP_ERY_TET"} diff --git a/test/data/raw_outputs/resfinder/resfinder_inputfasta_tab.txt b/test/data/raw_outputs/resfinder/resfinder_inputfasta_tab.txt deleted file mode 100644 index e0861c9..0000000 --- a/test/data/raw_outputs/resfinder/resfinder_inputfasta_tab.txt +++ /dev/null @@ -1,15 +0,0 @@ -Resistance gene Identity Alignment Length/Gene Length Coverage Position in reference Contig Position in contig Phenotype Accession no. -aph(6)-Id 100.00 837/837 100.0 1..837 CCI165_S85_contig_59 length 7808 coverage 252.0 normalized_cov 1.38 2438..3274 Streptomycin M28829 -aph(3'')-Ib 100.00 803/804 99.87562189054727 2..804 CCI165_S85_contig_59 length 7808 coverage 252.0 normalized_cov 1.38 3274..4076 Streptomycin AF024602 -aph(3'')-Ib 99.88 804/804 100.0 1..804 CCI165_S85_contig_59 length 7808 coverage 252.0 normalized_cov 1.38 3274..4077 Streptomycin AF321551 -aph(3'')-Ib 99.88 804/804 100.0 1..804 CCI165_S85_contig_59 length 7808 coverage 252.0 normalized_cov 1.38 3274..4077 Streptomycin AF313472 -aph(3'')-Ib 99.88 804/804 100.0 1..804 CCI165_S85_contig_59 length 7808 coverage 252.0 normalized_cov 1.38 3274..4077 Streptomycin AF321550 -aadA1 100.00 792/792 100.0 1..792 CCI165_S85_contig_74 length 3262 coverage 232.9 normalized_cov 1.28 451..1242 Spectinomycin, Streptomycin JX185132 -blaOKP-B-17 100.00 860/861 99.88385598141696 1..860 CCI165_S85_contig_2 length 348456 coverage 150.2 normalized_cov 0.82 263329..264188 Unknown Beta-lactam AM850919 -fosA 93.81 420/420 100.0 1..420 CCI165_S85_contig_13 length 151149 coverage 198.6 normalized_cov 1.09 127705..128124 Fosfomycin ACZD01000244 -OqxB 95.40 3153/3153 100.0 1..3153 CCI165_S85_contig_8 length 181163 coverage 173.9 normalized_cov 0.95 45285..48437 Chloramphenicol, Nalidixic acid, Ciprofloxacin, Trimethoprim EU370913 -OqxA 93.62 1176/1176 100.0 1..1176 CCI165_S85_contig_8 length 181163 coverage 173.9 normalized_cov 0.95 44086..45261 Chloramphenicol, Nalidixic acid, Ciprofloxacin, Trimethoprim EU370913 -sul2 100.00 816/816 100.0 1..816 CCI165_S85_contig_63 length 5843 coverage 215.4 normalized_cov 1.18 4351..5166 Sulfamethoxazole AY034138 -dfrA1 99.79 474/474 100.0 1..474 CCI165_S85_contig_74 length 3262 coverage 232.9 normalized_cov 1.28 1335..1808 Trimethoprim AF203818 -dfrA1 99.79 474/474 100.0 1..474 CCI165_S85_contig_74 length 3262 coverage 232.9 normalized_cov 1.28 1335..1808 Trimethoprim AJ238350 -dfrA1 99.79 474/474 100.0 1..474 CCI165_S85_contig_74 length 3262 coverage 232.9 normalized_cov 1.28 1335..1808 Trimethoprim X00926 diff --git a/test/data/raw_outputs/resfinder/resfinder_inputfastq_inputfasta.txt b/test/data/raw_outputs/resfinder/resfinder_inputfastq_inputfasta.txt deleted file mode 100644 index d55c916..0000000 --- a/test/data/raw_outputs/resfinder/resfinder_inputfastq_inputfasta.txt +++ /dev/null @@ -1,14 +0,0 @@ -Resistance gene Identity Alignment Length/Gene Length Coverage Position in reference Contig Position in contig Phenotype Accession no. -aph(6)-Id 100.00 837/837 100.0 1..838 NA NA..NA Streptomycin M28829 -aph(3'')-Ib 93.78 804/804 93.78 1..805 NA NA..NA Streptomycin AF321550 -aadA1 100.00 792/792 100.0 1..793 NA NA..NA Spectinomycin, Streptomycin JX185132 -aph(3'')-Ib 99.88 803/804 99.88 2..805 NA NA..NA Streptomycin AF024602 -aph(3'')-Ib 82.71 667/804 82.96 1..668 NA NA..NA Streptomycin AF321551 -blaOKP-B-17 99.88 861/861 100.0 1..862 NA NA..NA Unknown Beta-lactam AM850919 -fosA5 93.33 420/420 100.0 1..421 NA NA..NA Fosfomycin EU195449 -fosA 93.57 420/420 100.0 1..421 NA NA..NA Fosfomycin AFBO01000747 -fosA 93.81 420/420 100.0 1..421 NA NA..NA Fosfomycin ACZD01000244 -OqxA 93.62 1176/1176 100.0 1..1177 NA NA..NA Chloramphenicol, Nalidixic acid, Ciprofloxacin, Trimethoprim EU370913 -OqxB 95.40 3153/3153 100.0 1..3154 NA NA..NA Chloramphenicol, Nalidixic acid, Ciprofloxacin, Trimethoprim EU370913 -sul2 100.00 816/816 100.0 1..817 NA NA..NA Sulfamethoxazole AY034138 -dfrA1 96.41 458/474 96.62 1..459 NA NA..NA Trimethoprim EU089668 diff --git a/test/data/raw_outputs/resfinder/resfinder_inputfastq_tab.txt b/test/data/raw_outputs/resfinder/resfinder_inputfastq_tab.txt deleted file mode 100644 index d55c916..0000000 --- a/test/data/raw_outputs/resfinder/resfinder_inputfastq_tab.txt +++ /dev/null @@ -1,14 +0,0 @@ -Resistance gene Identity Alignment Length/Gene Length Coverage Position in reference Contig Position in contig Phenotype Accession no. -aph(6)-Id 100.00 837/837 100.0 1..838 NA NA..NA Streptomycin M28829 -aph(3'')-Ib 93.78 804/804 93.78 1..805 NA NA..NA Streptomycin AF321550 -aadA1 100.00 792/792 100.0 1..793 NA NA..NA Spectinomycin, Streptomycin JX185132 -aph(3'')-Ib 99.88 803/804 99.88 2..805 NA NA..NA Streptomycin AF024602 -aph(3'')-Ib 82.71 667/804 82.96 1..668 NA NA..NA Streptomycin AF321551 -blaOKP-B-17 99.88 861/861 100.0 1..862 NA NA..NA Unknown Beta-lactam AM850919 -fosA5 93.33 420/420 100.0 1..421 NA NA..NA Fosfomycin EU195449 -fosA 93.57 420/420 100.0 1..421 NA NA..NA Fosfomycin AFBO01000747 -fosA 93.81 420/420 100.0 1..421 NA NA..NA Fosfomycin ACZD01000244 -OqxA 93.62 1176/1176 100.0 1..1177 NA NA..NA Chloramphenicol, Nalidixic acid, Ciprofloxacin, Trimethoprim EU370913 -OqxB 95.40 3153/3153 100.0 1..3154 NA NA..NA Chloramphenicol, Nalidixic acid, Ciprofloxacin, Trimethoprim EU370913 -sul2 100.00 816/816 100.0 1..817 NA NA..NA Sulfamethoxazole AY034138 -dfrA1 96.41 458/474 96.62 1..459 NA NA..NA Trimethoprim EU089668 diff --git a/test/run_integration_test.sh b/test/run_integration_test.sh old mode 100644 new mode 100755 index 6dff8e3..28445a6 --- a/test/run_integration_test.sh +++ b/test/run_integration_test.sh @@ -1,7 +1,6 @@ #!/bin/bash set -e - hamronize tbprofiler data/raw_outputs/tbprofiler/tbprofiler.json --format json --output hamronized_tbprofiler.json hamronize tbprofiler data/raw_outputs/tbprofiler/tbprofiler.json --format tsv --output hamronized_tbprofiler.tsv @@ -24,17 +23,9 @@ hamronize rgi --input_file_name rgi_bwt_report --analysis_software_version rgi_b # test multi-report usage hamronize rgi --input_file_name rgi_report --analysis_software_version rgi_v1 --reference_database_version card_v1 data/raw_outputs/rgi/rgi.txt data/raw_outputs/rgibwt/Kp11_bwtoutput.gene_mapping_data.txt --output hamronized_rgi_and_rgibwt.tsv -hamronize resfinder --input_file_name resfinder_report --analysis_software_version resfinder_v4 --reference_database_version resfinder_db_v1 data/raw_outputs/resfinder/ResFinder_results_tab.txt --format json --output hamronized_resfinder.json -hamronize resfinder --input_file_name resfinder_report --analysis_software_version resfinder_v4 --reference_database_version resfinder_db_v1 data/raw_outputs/resfinder/ResFinder_results_tab.txt --format tsv --output hamronized_resfinder.tsv - -hamronize resfinder --input_file_name resfinder_report --analysis_software_version resfinder_v4.5 --reference_database_version resfinder_db_v1 data/raw_outputs/resfinder/resfinder_inputfasta_tab.txt --format json --output hamronized_resfinder_inputfasta.json -hamronize resfinder --input_file_name resfinder_report --analysis_software_version resfinder_v4.5 --reference_database_version resfinder_db_v1 data/raw_outputs/resfinder/resfinder_inputfasta_tab.txt --format tsv --output hamronized_resfinder_inputfasta.tsv - -hamronize resfinder --input_file_name resfinder_report --analysis_software_version resfinder_v4.5 --reference_database_version resfinder_db_v1 data/raw_outputs/resfinder/resfinder_inputfastq_tab.txt --format json --output hamronized_resfinder_inputfastq.json -hamronize resfinder --input_file_name resfinder_report --analysis_software_version resfinder_v4.5 --reference_database_version resfinder_db_v1 data/raw_outputs/resfinder/resfinder_inputfastq_tab.txt --format tsv --output hamronized_resfinder_inputfastq.tsv - -hamronize resfinder --input_file_name resfinder_report --analysis_software_version resfinder_v4.5 --reference_database_version resfinder_db_v1 data/raw_outputs/resfinder/resfinder_inputfastq_inputfasta.txt --format json --output hamronized_resfinder_inputfastq_inputfastq.json -hamronize resfinder --input_file_name resfinder_report --analysis_software_version resfinder_v4.5 --reference_database_version resfinder_db_v1 data/raw_outputs/resfinder/resfinder_inputfastq_inputfasta.txt --format tsv --output hamronized_resfinder_inputfastq_inputfasta.tsv +# ResFinder needs no metadata as it fetches everything (including input file, software and database version) from the JSON data +hamronize resfinder data/raw_outputs/resfinder/data_resfinder.json --format json --output hamronized_resfinder.json +hamronize resfinder data/raw_outputs/resfinder/data_resfinder.json --format tsv --output hamronized_resfinder.tsv hamronize pointfinder --input_file_name pointfinder_report --analysis_software_version resfinder_v4 --reference_database_version pointfinder_db_v1 data/raw_outputs/pointfinder/PointFinder_results.txt --format json --output hamronized_pointfinder.json hamronize pointfinder --input_file_name pointfinder_report --analysis_software_version resfinder_v4 --reference_database_version pointfinder_db_v1 data/raw_outputs/pointfinder/PointFinder_results.txt --format tsv --output hamronized_pointfinder.tsv diff --git a/test/test_parsing_validity.py b/test/test_parsing_validity.py index 9ad42db..7e81c52 100644 --- a/test/test_parsing_validity.py +++ b/test/test_parsing_validity.py @@ -318,32 +318,121 @@ def test_pointfinder(): assert result.nucleotide_mutation == "GGT -> GAT" assert result.amino_acid_mutation == "p.G81D" -def test_resfinder_fastq(): +def test_resfinder(): metadata = { - "analysis_software_version": "4.5.0", - "reference_database_version": "2021-02-01", - "input_file_name": "Dummy", } parsed_report = hAMRonization.parse( - "data/dummy/resfinder/resfinder_inputfastq_inputfasta.txt", metadata, "resfinder" + "data/dummy/resfinder/data_resfinder.json", metadata, "resfinder" ) + # The report has 4 gene presence entries (for one gene) and 1 mutation set + seen_genes = 0 + seen_variants = 0 + for result in parsed_report: - # assert mandatory fields - assert result.input_file_name == "Dummy" - assert result.gene_symbol == "aph(6)-Id" - assert result.gene_name == "aph(6)-Id" - assert result.reference_database_name == "resfinder" - assert result.reference_database_version == "2021-02-01" - assert result.reference_accession == "M28829" - assert result.analysis_software_name == "resfinder" - assert result.analysis_software_version == "4.5.0" - assert result.genetic_variation_type == "gene_presence_detected" - assert result.coverage_percentage == 100 - assert result.drug_class == "Streptomycin" - assert result.reference_gene_length == 837 - assert result.sequence_identity == 100 + # Test the global mandatory metadata + assert result.input_file_name == "hybrid" + assert result.analysis_software_name == "ResFinder" + assert result.analysis_software_version == "4.6.0" + + # Check the 4 gene presence results + if result.genetic_variation_type == "gene_presence_detected": + seen_genes += 1 + + # it reports these 4 agents separately (even if all on one gene) + assert (result.antimicrobial_agent, result.drug_class) in [ + ('ciprofloxacin', 'quinolone'), + ('nalidixic acid', 'quinolone'), + ('trimethoprim', 'folate pathway antagonist'), + ('chloramphenicol', 'amphenicol') ] + + # assert mandatory fields (5) + assert result.gene_symbol == "OqxA" + assert result.gene_name == "OqxA" + assert result.reference_database_name == "ResFinder" + assert result.reference_database_version == "2.4.0" + assert result.reference_accession == "EU370913" + + # optional fields (13) + assert result.predicted_phenotype == "ciprofloxacin, nalidixic acid, trimethoprim, chloramphenicol" + assert result.predicted_phenotype_confidence_level == "Must be in an operon with oqxB,phenotype differs based on genomic location of the operon PMID 25801572,also nitrofurantoin resistance PMID 26552976. Natural in K. pneumoniae. PMIDs: 18440636" + assert result.coverage_percentage == 100.0 + assert result.coverage_ratio == 1.0 + assert result.input_sequence_id == "contig1" + assert result.input_gene_length == 1176 + assert result.input_gene_start == 101 + assert result.input_gene_stop == 1276 + assert result.strand_orientation == '+' + assert result.reference_gene_length == 1176 + assert result.reference_gene_start == 1 + assert result.reference_gene_stop == 1176 + assert result.sequence_identity == 100.0 + + # not set (12) + assert result.coverage_depth is None + assert result.input_protein_length is None + assert result.input_protein_start is None + assert result.input_protein_stop is None + assert result.reference_protein_length is None + assert result.reference_protein_start is None + assert result.reference_protein_stop is None + assert result.resistance_mechanism is None + assert result.amino_acid_mutation is None + assert result.amino_acid_mutation_interpretation is None + assert result.nucleotide_mutation is None + assert result.nucleotide_mutation_interpretation is None + + # Check the one variation result + elif result.genetic_variation_type == "protein_variant_detected": + seen_variants += 1 + + # assert mandatory fields (5) + assert result.gene_symbol == "pbp5" + assert result.gene_name == "pbp5" + assert result.reference_database_name == "PointFinder" + assert result.reference_database_version == "4.1.1" + assert result.reference_accession == "AAK43724.1" + + # optional fields (14) + assert result.antimicrobial_agent == "ampicillin" + assert result.drug_class == "beta-lactam" + assert result.predicted_phenotype == "ampicillin" + assert result.predicted_phenotype_confidence_level == "The nineteen pbp5 mutations must be present simultaneously for resistance phenotype. PMIDs: 25182648" + assert result.coverage_percentage == 100.0 + assert result.coverage_ratio == 1.0 + assert result.input_sequence_id == "contig2" + assert result.input_gene_length == 2037 + assert result.input_gene_start == 64029 + assert result.input_gene_stop == 66065 + assert result.strand_orientation == '+' + assert result.reference_gene_length == 2037 + assert result.reference_gene_start == 1 + assert result.reference_gene_stop == 2037 + assert result.sequence_identity == 95.34 + + # mutation fields (2) + assert result.amino_acid_mutation == "p.V24A, p.S27G, p.R34Q, p.G66E, p.A68T, p.E85D, p.E100Q, p.K144Q, p.T172A, p.L177I, p.D204G, p.A216S, p.T324A, p.N496K, p.A499T, p.E525D, p.P667S" + assert result.nucleotide_mutation is None + assert result.nucleotide_mutation_interpretation == "Codon changes: gta>gca agt>ggt cgg>cag gga>gaa gca>aca gaa>gat gag>cag aaa>caa aca>gca tta>ata gac>ggc gca>tcc aca>gca aat>aaa gca>aca gag>gat ccc>tcg" + + # not set (10) + assert result.coverage_depth is None + assert result.input_protein_length is None + assert result.input_protein_start is None + assert result.input_protein_stop is None + assert result.reference_protein_length is None + assert result.reference_protein_start is None + assert result.reference_protein_stop is None + assert result.resistance_mechanism is None + assert result.amino_acid_mutation_interpretation is None + + else: + assert result.genetic_variation_type == False # just to stop + + # Check that we saw all + assert seen_genes == 4 + assert seen_variants == 1 def test_rgi_variants(): metadata = { From 7335521aa53618086736ab7f919670868e3bd957 Mon Sep 17 00:00:00 2001 From: Marco van Zwetselaar Date: Sat, 21 Dec 2024 05:07:34 +0300 Subject: [PATCH 3/3] Change formatting to match project style --- hAMRonization/ResFinderIO.py | 94 ++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 36 deletions(-) diff --git a/hAMRonization/ResFinderIO.py b/hAMRonization/ResFinderIO.py index be42e1c..052d06d 100644 --- a/hAMRonization/ResFinderIO.py +++ b/hAMRonization/ResFinderIO.py @@ -9,12 +9,6 @@ required_metadata = [ ] -# Implement Python omission (why have map but not fold?) -def fold(fun, acc, lst): - """Left fold iterable `lst` onto `acc` by iterating `acc = fun(acc, x)`""" - for x in lst: acc = fun(acc, x) - return acc - # This class is the parser instantiated by the hAMRonize framework to parse # ResFinder output. Its parse() method must return a hAMRonizedResultIterator @@ -51,41 +45,27 @@ def parse(self, handle): # - phenotypes: antimicriobals keying back into the above objects data = json.load(handle) - # Helpers to fetch database name and version from the JSON data + # Helpers to fetch database names and versions from the JSON data _dbs = data['databases'] - _unk_db = { 'database_name': "ref-error", 'database_version': "ref-error" } - _get_db_name = lambda ks: _dbs.get(ks[0], _unk_db).get('database_name',"no-name") if ks else "unspecified" - _get_db_ver = lambda ks: _dbs.get(ks[0], _unk_db).get('database_version',"no-version") if ks else "unspecified" - - # Helpers to flip start and end positions and yield strand - _get_start_pos = lambda p0, p1: None if not (type(p0) is int and type(p1) is int) else p0 if p0 <= p1 else p1 - _get_end_pos = lambda p0, p1: None if not (type(p0) is int and type(p1) is int) else p1 if p1 >= p1 else p0 - _get_strand = lambda p0, p1: None if not (type(p0) is int and type(p1) is int) else '+' if p0 <= p1 else '-' - _get_length = lambda p0, p1: None if not (type(p0) is int and type(p1) is int) else abs(p1 - p0) + 1 - _get_var_pos = lambda v: v.get('ref_start_pos', 0) - _empty_to_none = lambda s: s if len(s) else None # turns string '' into None - _round = lambda n, d: None if n is None else round(n, d) - - # Helper to condense notes and PMID references into a single line - def _condense_notes(notes, pmids): - lines = [] - lines += filter(None, notes) - pmids = list(filter(None, pmids)) - if pmids: - lines.append("PMIDs: " + ", ".join(set(pmids))) - return ". ".join(lines) if lines else None + _unk_db = {'database_name': "ref-error", 'database_version': "ref-error"} + + def _get_db_name(keys): + return _dbs.get(keys[0], _unk_db).get('database_name', "no-name") if keys else "unspecified" + + def _get_db_ver(keys): + return _dbs.get(keys[0], _unk_db).get('database_version', "no-version") if keys else "unspecified" # Setter for the hAMRonizedResult fields related to genes def set_shared_fields(r): """Sets all fields in res that relate to region r. Applies to both gene and mutation results.""" # mandatory - res.gene_symbol = r.get('name',"unspecified") - res.gene_name = r.get('name',"unspecified") + res.gene_symbol = r.get('name', "unspecified") + res.gene_name = r.get('name', "unspecified") res.reference_accession = r.get('ref_acc', r.get('ref_id', r.get('key', "unknown"))) # optional - res.coverage_percentage = _round(r.get('coverage'), 1) + res.coverage_percentage = _safe_round(r.get('coverage'), 1) res.coverage_depth = None # we may have this for mutations detected from reads res.coverage_ratio = r.get('coverage')/100.0 res.input_sequence_id = r.get('query_id') @@ -99,7 +79,7 @@ def set_shared_fields(r): res.reference_gene_start = r.get('ref_start_pos') res.reference_gene_stop = r.get('ref_end_pos') res.resistance_mechanism = None # This is available in phenotypes.txt but not in the JSON - res.sequence_identity = _round(r.get('identity'), 2) + res.sequence_identity = _safe_round(r.get('identity'), 2) # Zap these by default, will only be set in seq_variations below res.amino_acid_mutation = None @@ -121,7 +101,7 @@ def set_variation_fields(r, vs): # Iterate v over the variations in vs that lie on region r in order of their position # (variation->regions strangely is a list, so we need to check if r.key is in it) - for v in sorted(filter(lambda v: r['key'] in v.get('seq_regions',[]), vs), + for v in sorted(filter(lambda v: r['key'] in v.get('seq_regions', []), vs), key=lambda v: v.get('ref_start_pos', 0)): # May need refinement to properly accommodate inserts and deletes, @@ -172,7 +152,7 @@ def set_variation_fields(r, vs): res.reference_database_version = _get_db_ver(p.get('ref_database')) # Iterate r over the regions (AMR genes) referenced by p, and yield each in turn - for r in map(lambda k: data['seq_regions'][k], p.get('seq_regions',[])): + for r in map(lambda k: data['seq_regions'][k], p.get('seq_regions', [])): res.genetic_variation_type = GENE_PRESENCE set_shared_fields(r) @@ -183,8 +163,8 @@ def set_variation_fields(r, vs): # Collect the list of seq_variations (if any) referenced from phenotype p, # and the set of regions that these mutations lie on, so that we iterate # these regions and "collapse" all mutations for that region onto one record - vs = list(map(lambda k: data['seq_variations'][k], p.get('seq_variations',[]))) - rs = set(fold(lambda a, v: a + v.get('seq_regions',[]), [], vs)) + vs = list(map(lambda k: data['seq_variations'][k], p.get('seq_variations', []))) + rs = set(fold(lambda a, v: a + v.get('seq_regions', []), [], vs)) # Iterate r over each region referenced by some set of variations, and yield each for r in map(lambda k: data['seq_regions'][k], rs): @@ -196,3 +176,45 @@ def set_variation_fields(r, vs): # Yield a new hAMRonizedResult ours using super's method as that may do the needful yield self.hAMRonize(None, res.__dict__) + +# Miscellaneous little helper functions to keep the above uncluttered + +def _get_start_pos(p0, p1): + return None if not (type(p0) is int and type(p1) is int) else p0 if p0 <= p1 else p1 + + +def _get_end_pos(p0, p1): + return None if not (type(p0) is int and type(p1) is int) else p1 if p1 >= p1 else p0 + + +def _get_strand(p0, p1): + return None if not (type(p0) is int and type(p1) is int) else '+' if p0 <= p1 else '-' + + +def _get_length(p0, p1): + return None if not (type(p0) is int and type(p1) is int) else abs(p1 - p0) + 1 + + +def _safe_round(n, d): + return None if n is None else round(n, d) + + +def _empty_to_none(s): + return s if len(s) else None + + +def _condense_notes(notes, pmids): + """Helper to condense notes and PMID references into a single line""" + lines = [] + lines += filter(None, notes) + pmids = list(filter(None, pmids)) + if pmids: + lines.append("PMIDs: " + ", ".join(set(pmids))) + return ". ".join(lines) if lines else None + + +def fold(fun, acc, lst): # Python's missing function (why have map but not fold?) + """Left fold iterable `lst` onto `acc` by iterating `acc = fun(acc, x)`""" + for x in lst: + acc = fun(acc, x) + return acc