Skip to contents

This function imports processed EBI-processed AMRFinderPlus genotyping results. The expected input is genotype data retrieved from the EBI AMR Portal FTP site either directly or via the function download_ebi(). Note that files downloaded from the EBI AMR Portal web browser are formatted differently and can be imported using import_amrfp_ebi_web.

Usage

import_amrfp_ebi_ftp(input_table)

Arguments

input_table

R object or file path for the input EBI genotype table (R object, or file path to a TSV or CSV file).

Value

A tibble containing the processed AMR elements, with harmonised gene names, drug agents, and drug classes. The output retains the original columns from the AMRFinderPlus table along with the newly mapped variables.

Details

These data are pre-processed by EBI to match NCBI class/subclass to CARD's antibiotic resistance ontology (ARO), however for consistency this function will re-process the data to generate drug_agent and drug_class fields consistent with the import_amrfp() function (the EBI fields antibiotic* are also retained). Note several AMRfinderplus fields are excluded from EBI files, including hierarchy node, method, percent identity and coverage; therefore unlike the import_amrfp() function, this function cannot assign variation type or node.

The function performs the following steps:

  • Reads the EBI-processed genotype table.

  • Maps AMRFinderPlus subclasses to standardised drug agent and drug class names using amrfp_drugs (EBI-mappings are retained in antibiotic* fields.)

  • Converts drug agent names to the ab class from the AMR package. This processing ensures compatibility with downstream AMR analysis workflows.

Examples

if (FALSE) { # \dontrun{
# Download quinolone-related genotype data for E. coli, from EBI
ebi_geno_raw <- download_ebi(
  data = "genotype", species = "Escherichia coli",
  geno_subclass = "QUINOLONE"
)

# Format the file for import
ebi_geno <- import_amrfp_ebi_ftp(ebi_geno_raw)
} # }