
Import EBI-processed AMRFinderPlus Genotypes from Web
Source:R/import_geno.R
import_amrfp_ebi_web.RdThis function imports EBI-processed AMRFinderPlus genotyping results. The expected input is genotype data downloaded from the EBI AMR Portal web browser.
Note that files downloaded from the EBI AMR Portal FTP site, either directly or via the function download_ebi(), are formatted differently and can be imported using import_amrfp_ebi_ftp.
Value
A data frame with the processed genotype data, with harmonised gene names, mapped drug agents, and drug classes which can be used for other functions of the ARMgen package. The output retains the original columns from the AMRFinderPlus table along with the newly mapped variables:
id: The sample identifier (character).marker: The name of the genotype marker as it appears in the input (e.g.gyrA_S83F) (character).gene: The gene identifier (character).mutation: The mutation detected within the gene, converted to HGVS nomenclature syntax (e.g.Ser83Phe) (character).drug_class: Name of the antibiotic group associated with the genotype marker, compatible with AMR pkg (character).drug: Name of the specific antibiotic associated with the genotype marker, compatible with AMR pkg (ab). ValueNAis assigned when the markers are annotated with a class only and not a specific antibiotic. ... Other fields specific to the input file
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 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 inantibiotic*fields.)Converts drug agent names to the
abclass from the AMR package. This processing ensures compatibility with downstream AMR analysis workflows.