hAMRonization 1.1.4__tar.gz → 1.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {hAMRonization-1.1.4 → hamronization-1.1.7}/PKG-INFO +3 -2
  2. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/ResFinderIO.py +22 -7
  3. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/__init__.py +1 -1
  4. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization.egg-info/PKG-INFO +3 -2
  5. {hAMRonization-1.1.4 → hamronization-1.1.7}/test/test_parsing_validity.py +21 -6
  6. {hAMRonization-1.1.4 → hamronization-1.1.7}/LICENSE.txt +0 -0
  7. {hAMRonization-1.1.4 → hamronization-1.1.7}/README.md +0 -0
  8. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/AbricateIO.py +0 -0
  9. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/AmrFinderPlusIO.py +0 -0
  10. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/AmrPlusPlusIO.py +0 -0
  11. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/AribaIO.py +0 -0
  12. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/CSStarIO.py +0 -0
  13. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/DeepArgIO.py +0 -0
  14. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/FARGeneIO.py +0 -0
  15. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/GrootIO.py +0 -0
  16. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/Interfaces.py +0 -0
  17. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/KmerResistanceIO.py +0 -0
  18. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/MykrobeIO.py +0 -0
  19. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/PointFinderIO.py +0 -0
  20. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/ResFamsIO.py +0 -0
  21. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/RgiIO.py +0 -0
  22. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/SraxIO.py +0 -0
  23. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/Srst2IO.py +0 -0
  24. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/StarAmrIO.py +0 -0
  25. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/TBProfilerIO.py +0 -0
  26. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/constants.py +0 -0
  27. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/hAMRonizedResult.py +0 -0
  28. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/hamronize.py +0 -0
  29. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization/summarize.py +0 -0
  30. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization.egg-info/SOURCES.txt +0 -0
  31. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization.egg-info/dependency_links.txt +0 -0
  32. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization.egg-info/entry_points.txt +0 -0
  33. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization.egg-info/requires.txt +0 -0
  34. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization.egg-info/top_level.txt +0 -0
  35. {hAMRonization-1.1.4 → hamronization-1.1.7}/hAMRonization.egg-info/zip-safe +0 -0
  36. {hAMRonization-1.1.4 → hamronization-1.1.7}/setup.cfg +0 -0
  37. {hAMRonization-1.1.4 → hamronization-1.1.7}/setup.py +0 -0
  38. {hAMRonization-1.1.4 → hamronization-1.1.7}/test/test_interfaces.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hAMRonization
3
- Version: 1.1.4
3
+ Version: 1.1.7
4
4
  Summary: Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification
5
5
  Home-page: https://github.com/pha4ge/hAMRonization
6
- Download-URL: https://github.com/pha4ge/archive/v1.1.4.tar.gz
6
+ Download-URL: https://github.com/pha4ge/archive/v1.1.7.tar.gz
7
7
  Author: Finlay Maguire
8
8
  Author-email: finlaymaguire@gmail.com
9
9
  License: LGPLv3
@@ -25,6 +25,7 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
25
25
  Requires-Python: >=3.7
26
26
  Description-Content-Type: text/markdown
27
27
  License-File: LICENSE.txt
28
+ Requires-Dist: pandas
28
29
 
29
30
  ![Python package](https://github.com/pha4ge/hAMRonization/workflows/test_package/badge.svg)
30
31
  [![DOI](https://zenodo.org/badge/248040662.svg)](https://zenodo.org/badge/latestdoi/248040662)
@@ -56,14 +56,29 @@ class ResFinderIterator(hAMRonizedResultIterator):
56
56
  reader = csv.DictReader(handle, delimiter="\t")
57
57
  for result in reader:
58
58
  result["_gene_name"] = result["Resistance gene"]
59
- _start, _stop = result["Position in contig"].split("..")
60
- if _start > _stop:
61
- _strand = "-"
59
+ # Removes fields that have NA and NA..NA this is typical in the 4.5.0 resfinder when the --inputfastq is implimented
60
+ for field, value in result.items():
61
+ if value == "NA":
62
+ result[field] = None
63
+ if value == "NA..NA":
64
+ result[field] = None
65
+ # If result["Position in contig"] == None then make _start, _stop and _strand = None
66
+ if result["Position in contig"] != None:
67
+ _start, _stop = result["Position in contig"].split("..")
68
+ if _start > _stop :
69
+ _strand = "-"
70
+ else:
71
+ _strand = "+"
72
+
73
+ result["_start"] = _start
74
+ result["_stop"] = _stop
75
+ result["_strand"] = _strand
62
76
  else:
63
- _strand = "+"
64
- result["_start"] = _start
65
- result["_stop"] = _stop
66
- result["_strand"] = _strand
77
+ _strand = None
78
+ result["_start"] = None
79
+ result["_stop"] = None
80
+ result["_strand"] = None
81
+
67
82
  _reference_gene_length = result["Alignment Length/Gene Length"].split("/")[
68
83
  0
69
84
  ]
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python
2
2
 
3
- __version__ = "1.1.4"
3
+ __version__ = "1.1.7"
4
4
 
5
5
  from hAMRonization import AbricateIO
6
6
  from hAMRonization import AmrFinderPlusIO
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hAMRonization
3
- Version: 1.1.4
3
+ Version: 1.1.7
4
4
  Summary: Tool to convert and summarize AMR gene detection outputs using the hAMRonization specification
5
5
  Home-page: https://github.com/pha4ge/hAMRonization
6
- Download-URL: https://github.com/pha4ge/archive/v1.1.4.tar.gz
6
+ Download-URL: https://github.com/pha4ge/archive/v1.1.7.tar.gz
7
7
  Author: Finlay Maguire
8
8
  Author-email: finlaymaguire@gmail.com
9
9
  License: LGPLv3
@@ -25,6 +25,7 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
25
25
  Requires-Python: >=3.7
26
26
  Description-Content-Type: text/markdown
27
27
  License-File: LICENSE.txt
28
+ Requires-Dist: pandas
28
29
 
29
30
  ![Python package](https://github.com/pha4ge/hAMRonization/workflows/test_package/badge.svg)
30
31
  [![DOI](https://zenodo.org/badge/248040662.svg)](https://zenodo.org/badge/latestdoi/248040662)
@@ -292,7 +292,7 @@ def test_kmerresistance():
292
292
  assert result.reference_gene_stop is None
293
293
 
294
294
 
295
- def test_resfinder():
295
+ def test_pointfinder():
296
296
  metadata = {
297
297
  "analysis_software_version": "4.1.0",
298
298
  "reference_database_version": "2021-02-01",
@@ -318,17 +318,32 @@ def test_resfinder():
318
318
  assert result.nucleotide_mutation == "GGT -> GAT"
319
319
  assert result.amino_acid_mutation == "p.G81D"
320
320
 
321
-
322
- def test_pointfinder():
321
+ def test_resfinder_fastq():
323
322
  metadata = {
324
- "analysis_software_version": "4.1.0",
325
- "reference_database_version": "2019-Jul-28",
323
+ "analysis_software_version": "4.5.0",
324
+ "reference_database_version": "2021-02-01",
326
325
  "input_file_name": "Dummy",
327
326
  }
328
327
  parsed_report = hAMRonization.parse(
329
- "data/dummy/resfinder/ResFinder_results_tab.txt", metadata, "resfinder"
328
+ "data/dummy/resfinder/resfinder_inputfastq_inputfasta.txt", metadata, "resfinder"
330
329
  )
331
330
 
331
+ for result in parsed_report:
332
+ # assert mandatory fields
333
+ assert result.input_file_name == "Dummy"
334
+ assert result.gene_symbol == "aph(6)-Id"
335
+ assert result.gene_name == "aph(6)-Id"
336
+ assert result.reference_database_name == "resfinder"
337
+ assert result.reference_database_version == "2021-02-01"
338
+ assert result.reference_accession == "M28829"
339
+ assert result.analysis_software_name == "resfinder"
340
+ assert result.analysis_software_version == "4.5.0"
341
+ assert result.genetic_variation_type == "gene_presence_detected"
342
+ assert result.coverage_percentage == 100
343
+ assert result.drug_class == "Streptomycin"
344
+ assert result.reference_gene_length == 837
345
+ assert result.sequence_identity == 100
346
+
332
347
 
333
348
  def test_rgi_variants():
334
349
  metadata = {
File without changes
File without changes
File without changes
File without changes