Skip to content

Commit

Permalink
AmrFinderPlus upgrade: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zwets committed Dec 28, 2024
1 parent a789de8 commit 5a6d274
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions test/data/dummy/amrfinderplus/report.tsv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Protein identifier Contig id Start Stop Strand Gene symbol Sequence name Scope Element type Element subtype Class Subclass Method Target length Reference sequence length % Coverage of reference sequence % Identity to reference sequence Alignment length Accession of closest sequence Name of closest sequence HMM id HMM description
NA NZ_LR792628.1 1333611 1334783 - oqxA multidrug efflux RND transporter periplasmic adaptor subunit OqxA core AMR AMR PHENICOL/QUINOLONE PHENICOL/QUINOLONE BLASTX 391 391 100 99.49 391 WP_002914189.1 multidrug efflux RND transporter periplasmic adaptor subunit OqxA NF000272.1 multidrug efflux RND transporter periplasmic adaptor subunit OqxA
Protein id Contig id Start Stop Strand Element symbol Element name Scope Type Subtype Class Subclass Method Target length Reference sequence length % Coverage of reference % Identity to reference Alignment length Closest reference accession Closest reference name HMM accession HMM description
NA NZ_LR792628.1 1333611 1334783 - oqxA multidrug efflux RND transporter periplasmic adaptor subunit OqxA core AMR AMR PHENICOL/QUINOLONE PHENICOL/QUINOLONE BLASTX 391 391 100.00 99.49 391 WP_002914189.1 multidrug efflux RND transporter periplasmic adaptor subunit OqxA NA NA
4 changes: 2 additions & 2 deletions test/data/raw_outputs/amrfinderplus/afp_non_coding.tsv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Name Protein identifier Contig id Start Stop Strand Gene symbol Sequence name Scope Element type Element subtype Class Subclass Method Target length Reference sequence length % Coverage of reference sequence % Identity to reference sequence Alignment length Accession of closest sequence Name of closest sequence HMM id HMM description
DAWXTK010000082_noncoding_test NA DAWXTK010000082.1:68-2970 1 2903 + 23S_A2062G Neisseria gonorrhoeae azithromycin resistant 23S core AMR POINT MACROLIDE AZITHROMYCIN POINTN 2903 2910 100.00 99.35 2910 NC_002946.2:1119158-1116249 23S ribosomal RNA NA NA
Protein id Contig id Start Stop Strand Element symbol Element name Scope Type Subtype Class Subclass Method Target length Reference sequence length % Coverage of reference % Identity to reference Alignment length Closest reference accession Closest reference name HMM accession HMM description
NA DAWXTK010000082.1:68-2970 1 2903 + 23S_A2059G Neisseria gonorrhoeae azithromycin resistant 23S core AMR POINT MACROLIDE AZITHROMYCIN POINTN 2903 2910 100.00 99.35 2910 NC_002946.2:1119158-1116249 23S ribosomal RNA NA NA
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Protein identifier Contig id Start Stop Strand Gene symbol Sequence name Scope Element type Element subtype Class Subclass Method Target length Reference sequence length % Coverage of reference sequence % Identity to reference sequence Alignment length Accession of closest sequence Name of closest sequence HMM id HMM description
Protein id Contig id Start Stop Strand Element symbol Element name Scope Type Subtype Class Subclass Method Target length Reference sequence length % Coverage of reference % Identity to reference Alignment length Closest reference accession Closest reference name HMM accession HMM description Hierarchy node
178 changes: 89 additions & 89 deletions test/data/raw_outputs/amrfinderplus/report_nucleotide.tsv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/data/raw_outputs/amrfinderplus/report_protein.tsv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Protein identifier Contig id Start Stop Strand Gene symbol Sequence name Scope Element type Element subtype Class Subclass Method Target length Reference sequence length % Coverage of reference sequence % Identity to reference sequence Alignment length Accession of closest sequence Name of closest sequence HMM id HMM description
Protein id Contig id Start Stop Strand Element symbol Element name Scope Type Subtype Class Subclass Method Target length Reference sequence length % Coverage of reference % Identity to reference Alignment length Closest reference accession Closest reference name HMM accession HMM description
blaTEM-156 contig01 101 961 + blaTEM-156 class A beta-lactamase TEM-156 core AMR AMR BETA-LACTAM BETA-LACTAM ALLELEP 286 286 100.00 100.00 286 WP_061158039.1 class A beta-lactamase TEM-156 NF000531.2 TEM family class A beta-lactamase
blaPDC-114_blast contig02 1 1191 + blaPDC PDC family class C beta-lactamase core AMR AMR BETA-LACTAM CEPHALOSPORIN BLASTP 397 397 100.00 99.75 397 WP_061189306.1 class C beta-lactamase PDC-114 NF000422.6 PDC family class C beta-lactamase
blaOXA-436_partial contig03 101 802 + blaOXA OXA-48 family class D beta-lactamase core AMR AMR BETA-LACTAM BETA-LACTAM PARTIALP 233 265 87.92 100.00 233 WP_058842180.1 OXA-48 family carbapenem-hydrolyzing class D beta-lactamase OXA-436 NF012161.0 class D beta-lactamase
Expand Down
8 changes: 4 additions & 4 deletions test/run_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ hamronize abricate data/raw_outputs/abricate/report.tsv --reference_database_ver
hamronize ariba data/raw_outputs/ariba/report.tsv --reference_database_version db_v_1 --reference_database_name dbname --input_file_name ariba_report --analysis_software_version ariba_v1 --format json --output hamronized_ariba.json
hamronize ariba data/raw_outputs/ariba/report.tsv --reference_database_version db_v_1 --reference_database_name dbname --input_file_name ariba_report --analysis_software_version ariba_v1 --format tsv --output hamronized_ariba.tsv

hamronize amrfinderplus --input_file_name amrfinderplus_nucleotide_report --analysis_software_version AFP_nt_v1 --reference_database_version db_v_1 data/raw_outputs/amrfinderplus/report_nucleotide.tsv --format json --output hamronized_amrfinderplus_nt.json
hamronize amrfinderplus --input_file_name amrfinderplus_nucleotide_report --analysis_software_version AFP_nt_v1 --reference_database_version db_v_1 data/raw_outputs/amrfinderplus/report_nucleotide.tsv --format tsv --output hamronized_amrfinderplus_nt.tsv
hamronize amrfinderplus --input_file_name amrfinderplus_protein_report --analysis_software_version AFP_aa_v1 --reference_database_version db_v_1 data/raw_outputs/amrfinderplus/report_protein.tsv --format json --output hamronized_amrfinderplus_aa.json
hamronize amrfinderplus --input_file_name amrfinderplus_protein_report --analysis_software_version AFP_aa_v1 --reference_database_version db_v_1 data/raw_outputs/amrfinderplus/report_protein.tsv --format tsv --output hamronized_amrfinderplus_aa.tsv
hamronize amrfinderplus --input_file_name afp_nt_report --analysis_software_version AFP4 --reference_database_version v4 data/raw_outputs/amrfinderplus/report_nucleotide.tsv --format json --output hamronized_amrfinderplus_nt.json
hamronize amrfinderplus --input_file_name afp_nt_report --analysis_software_version AFP4 --reference_database_version v4 data/raw_outputs/amrfinderplus/report_nucleotide.tsv --format tsv --output hamronized_amrfinderplus_nt.tsv
hamronize amrfinderplus --input_file_name afp_aa_report --analysis_software_version AFP4 --reference_database_version v4 data/raw_outputs/amrfinderplus/report_protein.tsv --format json --output hamronized_amrfinderplus_aa.json
hamronize amrfinderplus --input_file_name afp_aa_report --analysis_software_version AFP4 --reference_database_version v4 data/raw_outputs/amrfinderplus/report_protein.tsv --format tsv --output hamronized_amrfinderplus_aa.tsv

hamronize rgi --input_file_name rgi_report --analysis_software_version rgi_v1 --reference_database_version card_v1 data/raw_outputs/rgi/rgi.txt --format json --output hamronized_rgi.json
hamronize rgi --input_file_name rgi_report --analysis_software_version rgi_v1 --reference_database_version card_v1 data/raw_outputs/rgi/rgi.txt --format tsv --output hamronized_rgi.tsv
Expand Down
8 changes: 4 additions & 4 deletions test/test_parsing_validity.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def test_abricate():

def test_amrfinderplus():
metadata = {
"analysis_software_version": "3.6.10",
"reference_database_version": "2019-Jul-28",
"analysis_software_version": "4.0.3",
"reference_database_version": "2024-12-18.1",
"input_file_name": "Dummy",
}
parsed_report = hAMRonization.parse(
Expand All @@ -81,10 +81,10 @@ def test_amrfinderplus():
== "multidrug efflux RND transporter periplasmic adaptor subunit OqxA"
)
assert result.reference_database_name == "NCBI Reference Gene Database"
assert result.reference_database_version == "2019-Jul-28"
assert result.reference_database_version == "2024-12-18.1"
assert result.reference_accession == "WP_002914189.1"
assert result.analysis_software_name == "amrfinderplus"
assert result.analysis_software_version == "3.6.10"
assert result.analysis_software_version == "4.0.3"
assert result.genetic_variation_type == "gene_presence_detected"

# optional fields - present in dummy dataset
Expand Down

0 comments on commit 5a6d274

Please sign in to comment.