# How to Detect Functional Genes in Long-Read Metagenomes: A Guide to Antibiotic Resistance and Virulence Factor Annotation

Long-read metagenomic sequencing produces reads that can span entire genes, operons, and mobile genetic elements, making it a practical option for detecting antibiotic resistance genes (ARGs) and virulence factors in complex microbial communities. This article explains how to build a functional gene annotation workflow for long-read data, with specific attention to ARG detection, mobile genetic element context, and the practical decisions that determine whether results are trustworthy. The workflow described here uses CARD, ResFinder, and VFDB as primary reference databases, with long-read-specific considerations for gene context and horizontal transfer risk assessment.

## The Structural Limitation of Short Reads for Functional Gene Detection

Short-read metagenomics has been the standard approach for profiling ARGs and virulence factors, but it carries a structural limitation. When a sequencing platform produces reads of 150 base pairs, the assembly process must reconstruct genes from fragments that may not span the full coding sequence. This creates uncertainty about whether a detected gene is complete, whether it is functional, and critically, where it is located in the genome.

The location of an ARG matters for risk assessment. A resistance gene located on the chromosome of a commensal bacterium poses a different threat than the same gene carried on a conjugative plasmid that can move between species. Short reads frequently cannot resolve this distinction because the gene and its flanking context are separated across different assembly contigs. Long-read platforms such as Oxford Nanopore and PacBio produce reads that routinely span 10 kilobases or more, which means a single read can cover an entire ARG plus its neighboring genes, insertion sequences, and plasmid replication machinery.

The practical consequence is that long-read data allows researchers to answer questions that short-read data cannot. You can determine whether an ARG is plasmid-associated, whether it is flanked by transposases or integrases, and whether it shares a genetic neighborhood with other resistance genes. This contextual information is essential for understanding mobility potential and for making decisions about intervention strategies in agricultural or clinical settings.

## At a Glance: Workflow Components and Decision Points

| Workflow Component | Primary Options | Key Decision Point | Data Output |
| --- | --- | --- | --- |
| Base calling and quality control | Guppy, Dorado, pbccs | Choose accuracy mode based on tolerance for errors in gene boundary detection | High-quality FASTQ files with quality scores |
| Read filtering | Filtlong, NanoFilt, chopper | Set minimum length threshold above target gene length to preserve full-gene reads | Filtered read set with length and quality metrics |
| ARG annotation | CARD, ResFinder | Select database version and match criteria (strict vs. relaxed) | Gene identity, coverage, and predicted resistance phenotype |
| Virulence factor annotation | VFDB | Choose core vs. full dataset based on sample type | Virulence gene identity and completeness |
| Mobile genetic element context | Plasmid databases, ISfinder, MOB-suite | Determine whether ARGs are co-located with MGE markers | Mobility potential classification for each ARG |
| Host assignment | Kraken2, Minimap2 against reference genomes | Confirm taxonomic assignment using read-level evidence | Host taxon for each functional gene |

## Core Principles of Functional Gene Annotation in Long-Read Metagenomes

### Reference Database Selection and Version Control

The choice of reference database determines what an annotation pipeline can detect. CARD (Comprehensive Antibiotic Resistance Database) organizes resistance genes by their mechanism of action and includes information about the antibiotics they confer resistance to. ResFinder focuses specifically on acquired resistance genes and includes curated entries for clinically relevant determinants. VFDB (Virulence Factor Database) catalogs genes associated with bacterial pathogenicity, including adhesins, toxins, and secretion systems.

Each database has a different update cycle and curation philosophy. CARD is updated regularly and includes both resistance genes and their associated mutations. ResFinder is maintained with a focus on acquired genes that can be detected by sequence similarity. VFDB provides a core dataset of experimentally verified virulence factors and a full dataset that includes predicted genes. You should record the database version and download date in your analysis log because database updates can change annotation results for the same input data.

The NCBI maintains a range of sequence databases and analysis services that can supplement these specialized resources, particularly for confirming gene identity through BLAST searches against the non-redundant nucleotide database. Cross-referencing annotations against NCBI resources can help resolve ambiguous matches, especially for genes that are not well represented in the specialized databases.

### Long-Read Error Profiles and Their Impact on Gene Detection

Long-read sequencing platforms have error profiles that differ substantially from short-read platforms. Oxford Nanopore sequencing produces reads with error rates that vary by base caller and chemistry version, with insertion and deletion errors being more common than substitution errors. PacBio HiFi reads have lower error rates but are shorter than Nanopore reads.

These error profiles matter for functional gene annotation because frameshift errors can disrupt open reading frame prediction. A single base deletion within a coding sequence can shift the reading frame and cause the gene prediction algorithm to miss the complete gene or to predict a truncated protein. This is a particular concern for Nanopore data, where homopolymer regions are prone to insertion and deletion errors.

Practical mitigation strategies include using error-corrected reads for gene prediction, applying base callers that model homopolymer errors, and using annotation tools that tolerate small indels when matching against reference databases. Some pipelines perform a polishing step after assembly to correct residual errors before gene annotation. The tradeoff is computational cost, but for functional gene detection, the investment is usually justified because a single frameshift can produce a false negative result.

### Gene Completeness and Functional Inference

Detecting a partial match to a resistance gene is not the same as detecting a functional resistance determinant. A read that covers only 60 percent of a beta-lactamase gene may produce a positive database match, but you cannot conclude that the organism carries a functional resistance gene. The gene may be truncated, interrupted by an insertion sequence, or present as a pseudogene.

Long reads help with this problem because they can span complete genes. When you annotate a long-read metagenome, you should report the fraction of each gene that is covered by reads and the identity percentage against the reference sequence. A common threshold is to require at least 90 percent coverage and 80 percent identity for a confident functional gene call, but these thresholds should be adjusted based on your research question and the error rate of your sequencing platform.

For clinical or agricultural decision-making, the consequences of false positives and false negatives differ. A false positive ARG call could lead to unnecessary treatment changes or biosecurity measures. A false negative could allow a resistant organism to go undetected. Your threshold choices should reflect which error type is more costly in your context.

## Practical Workflow for ARG and Virulence Factor Annotation

### Step 1: Input Data Preparation and Quality Assessment

The workflow begins with raw sequencing data in FASTQ format. Before any annotation step, you should assess read quality using tools that report length distributions, quality scores, and estimated error rates. For Nanopore data, you should also check the number of reads that pass the sequencing platform's internal quality filter.

Read length filtering is particularly important for functional gene annotation. If your target genes are typically 800 to 1,500 base pairs long, you should filter out reads shorter than this range because they cannot span a complete gene. However, be aware that aggressive length filtering reduces the depth of coverage for shorter genes and may bias your results toward longer genes.

The Galaxy Training Network provides accessible tutorials for quality assessment and read processing that can help you establish a reproducible workflow, particularly if you are working in a setting where command-line tools are not yet familiar. These tutorials cover the practical steps of data preparation and can be adapted to long-read data.

### Step 2: Read Alignment or Assembly

You have two main options for analyzing long-read metagenomes: read-based annotation and assembly-based annotation.

Read-based annotation aligns individual reads directly against reference databases. This approach preserves the long-read context because each read is treated as a unit. If a single read covers both an ARG and a transposase gene, you can detect the co-location directly from the read alignment. The disadvantage is that read-based methods are sensitive to sequencing errors and may miss genes that are split across multiple reads.

Assembly-based annotation first assembles reads into contigs, then annotates the contigs. Assembly can produce longer contiguous sequences that represent complete genes and operons, but metagenomic assembly is complicated by the varying abundance of different organisms in the sample. Highly abundant organisms assemble well, while low-abundance organisms may produce fragmented assemblies. The choice between read-based and assembly-based approaches depends on your sample complexity and your specific research question.

For ARG detection in complex samples, a hybrid approach often works well. Run read-based annotation for sensitivity, then use assembly-based annotation to confirm gene context and completeness. The read-based results tell you what genes are present, and the assembly-based results tell you where they are located and whether they are likely functional.

### Step 3: ARG Annotation with CARD and ResFinder

CARD provides a curated collection of resistance genes organized by resistance mechanism. The database includes information about the antibiotics affected, the resistance mechanism, and the gene family. When you run CARD annotation on long-read data, you should use the resistance gene identifier tool, which matches your sequences against the database and reports the best hits.

ResFinder is specifically designed for detecting acquired resistance genes and includes a curated set of genes that are known to confer resistance. The ResFinder database is updated regularly and includes genes from both Gram-positive and Gram-negative bacteria. For long-read data, ResFinder can be run in a mode that accepts longer query sequences, which is appropriate for reads or contigs that span complete genes.

Both databases will produce a table of matches with identity percentages and coverage values. You should treat these tables as preliminary results that require manual review. A match with 100 percent identity and full coverage is a confident call. A match with 95 percent identity and 80 percent coverage may represent a novel variant of a known gene, which could be functionally significant but requires additional verification.

### Step 4: Virulence Factor Annotation with VFDB

VFDB contains experimentally verified virulence factors from bacterial pathogens. The core dataset includes genes with direct experimental evidence of involvement in virulence, while the full dataset includes predicted virulence genes that have not been experimentally confirmed.

For agricultural samples, the choice between core and full VFDB datasets depends on your question. If you are assessing the pathogenic potential of a specific organism, the core dataset provides higher confidence. If you are screening for novel virulence determinants, the full dataset may be more appropriate, but you should expect a higher false positive rate.

Virulence factor annotation on long-read data follows the same principles as ARG annotation. You align reads or contigs against the VFDB sequences, identify matches above your identity and coverage thresholds, and then examine the context of each match. The long-read advantage is that you can determine whether a virulence gene is located in a pathogenicity island or is flanked by mobile genetic elements, which provides information about its potential for horizontal transfer.

### Step 5: Mobile Genetic Element Context Analysis

The key advantage of long-read metagenomics for functional gene annotation is the ability to determine genomic context. When you identify an ARG, you should immediately ask what genes are nearby. The presence of transposases, integrases, or plasmid replication genes in the flanking sequence indicates mobility potential.

A study of wastewater treatment plants applied long-read nanopore sequencing to profile ARGs and their neighboring genes across five plants on three continents. The researchers quantified the percentage of ARGs with mobility potential by identifying ARGs located on plasmids or co-located with mobile genetic element hallmark genes. This analysis revealed that the abundance of plasmid-associated ARGs decreased during activated sludge treatment at four of the five plants, while the host phyla for chromosomal ARGs remained relatively consistent. The study concluded that the activated sludge process acted as a barrier against the proliferation of most ARGs, while those that persisted or increased warranted further attention.

This type of context analysis requires annotation tools that can identify mobile genetic element genes. Options include ISfinder for insertion sequences, MOB-suite for plasmid typing, and general annotation tools that search against databases of transposases and integrases. The output is a classification of each ARG as chromosomal, plasmid-associated, or MGE-associated, which directly informs risk assessment.

### Step 6: Host Assignment and Taxonomic Context

Knowing which organism carries an ARG is as important as knowing the gene is present. Long reads can be assigned to taxonomic groups using tools such as Kraken2 or by aligning reads against reference genomes. The long-read advantage is that a single read can contain both taxonomic marker information and the ARG sequence, allowing direct host assignment.

A wastewater surveillance study comparing long-read and short-read metagenomics found that long-read sequencing revealed a wider range of ARG hosts compared to short-read metagenomics. However, the ARG host range detected by long-read metagenomics represented only a subset of the hosts detected by epicPCR, a targeted method that physically links ARGs to their host cells. This finding highlights an important limitation: even long-read metagenomics may miss ARG-host linkages for low-abundance organisms.

For host assignment, you should report the taxonomic level at which you are confident. Species-level assignment requires high sequence similarity to a reference genome. Genus-level or phylum-level assignment may be more appropriate for novel organisms. A study of laying hen feces found that ARGs from Proteobacteria were commonly located on plasmids, while ARGs in Firmicutes were usually carried on chromosomes, demonstrating that host taxonomy and gene location are linked.

## Options and Tradeoffs in Long-Read Functional Annotation

### Sequencing Platform Choice: Nanopore vs. PacBio

Oxford Nanopore and PacBio offer different tradeoffs for functional gene annotation. Nanopore devices are portable, relatively inexpensive, and can produce very long reads, but the raw read accuracy is lower. PacBio HiFi reads have higher accuracy but are shorter and require more expensive instrumentation.

For ARG detection, the accuracy difference matters primarily for gene boundary prediction and frameshift detection. A study comparing target-enriched long-read sequencing (TELSeq) to non-enriched PacBio and short-read Illumina sequencing found that TELSeq achieved much higher ARG recovery and sensitivity across diverse metagenomes. The long reads generated by TELSeq enabled identification of mobile genetic elements and cargo genes flanking low-abundance ARGs, indicating that these ARGs could be transferred across bacterial taxa via horizontal gene transfer.

If you have access to both platforms, consider using Nanopore for initial screening and PacBio HiFi for confirmation of critical findings. If you have only one platform, adjust your analysis thresholds to account for the platform's error profile.

### Target Enrichment vs. Shotgun Sequencing

Standard shotgun metagenomic sequencing sequences all DNA in a sample, which means that low-abundance ARGs may be missed because they represent a tiny fraction of the total reads. Target enrichment methods such as TELSeq use hybridization probes to capture ARG sequences before sequencing, dramatically increasing the sensitivity for these genes.

The TELSeq study demonstrated that this approach can recover more than 1,000-fold more ARG sequences than non-enriched sequencing, revealing an extensive resistome profile comprising many low-abundance ARGs, including some with public health importance. The tradeoff is that target enrichment requires additional laboratory steps and may introduce bias by preferentially capturing sequences similar to the probe set.

For agricultural samples where you are specifically interested in ARGs, target enrichment may be worth the additional cost. For broader microbiome characterization where ARGs are one of many questions, shotgun sequencing with long reads provides more general information.

### Database Choice and Match Criteria

The choice between CARD and ResFinder is not either-or. These databases have different strengths, and using both provides complementary information. CARD includes resistance genes with their mechanisms and associated mutations, which is useful for understanding the functional significance of a detected gene. ResFinder focuses on acquired genes and is particularly useful for detecting genes that are known to spread horizontally.

Match criteria should be set based on your research question. For surveillance purposes where you want to detect any potential resistance gene, use relaxed criteria with lower identity thresholds. For clinical or regulatory decisions where false positives are costly, use strict criteria with high identity and coverage requirements.

The EMBL-EBI training resources provide guidance on sequence similarity searching and database use that can help you understand the implications of different match criteria. These resources are particularly useful for researchers who are new to functional gene annotation.

## Records and Measurements for Reproducible Analysis

### Analysis Log Requirements

Reproducibility in bioinformatics requires more than saving your scripts. You must document the version of every tool and database used, the parameters applied, and the date of each analysis run. This documentation allows you to reproduce your results and to understand why results may differ when databases are updated.

A minimal analysis log should include:

- Sequencing platform and base caller version
- Quality filtering parameters and the number of reads retained at each step
- Database names and version numbers for CARD, ResFinder, and VFDB
- Identity and coverage thresholds for gene matching
- Assembly tool and parameters if assembly was performed
- Taxonomic classification tool and database version

The nf-core documentation provides standards for reproducible pipeline usage that can serve as a model for structuring your analysis workflow. Even if you do not use nf-core pipelines directly, the documentation describes the metadata and parameter recording practices that support reproducibility.

### Quality Metrics to Report

For each functional gene annotation result, you should report:

- Gene name and database identifier
- Percent identity to the reference sequence
- Percent coverage of the reference gene
- Read depth or coverage at the gene locus
- Genomic context (chromosomal, plasmid, or MGE-associated)
- Host taxon if assignment was possible

These metrics allow readers of your results to assess the confidence of each annotation. A gene with 100 percent identity, full coverage, and high read depth is a confident call. A gene with 95 percent identity and partial coverage may be a novel variant or a partial sequence and should be interpreted with caution.

### Handling Database Updates

Reference databases are updated regularly, and these updates can change your results. A gene that was not detected with an older database version may be detected with a newer version that includes additional reference sequences. Conversely, a gene that was detected with an older version may be removed or reclassified in a newer version.

To manage this issue, record the exact database version and download date in your analysis log. If you need to compare results across studies, use the same database version for all samples. If you are publishing results, include the database versions in your methods section so that other researchers can reproduce your analysis.

## Common Failure Patterns and How to Avoid Them

### Failure Pattern 1: Frameshift Errors Leading to False Negatives

The most common failure in long-read ARG annotation is missing genes because sequencing errors disrupt open reading frames. This is particularly problematic for Nanopore data, where insertion and deletion errors in homopolymer regions can shift the reading frame.

Mitigation: Use error-corrected reads for annotation, apply base callers that model homopolymer errors, and use annotation tools that tolerate small indels. If you are using assembly-based annotation, consider polishing the assembly before gene prediction.

### Failure Pattern 2: Overly Relaxed Match Criteria Producing False Positives

Using low identity thresholds to avoid missing genes can produce false positive calls. A match at 70 percent identity may represent a distantly related gene with different function, or it may be a spurious match to a non-coding region.

Mitigation: Report results at multiple identity thresholds and require high coverage for confident calls. For critical decisions, manually inspect the alignment between your sequence and the reference gene.

### Failure Pattern 3: Ignoring Genomic Context

An ARG annotation without context information is of limited value for risk assessment. A gene that is always chromosomal in your samples has different implications than a gene that is frequently plasmid-associated.

Mitigation: Always examine the flanking sequences of annotated ARGs. Use mobile genetic element databases to identify transposases, integrases, and plasmid replication genes in the neighborhood of each ARG.

### Failure Pattern 4: Database Version Confusion

Comparing results across studies that used different database versions can produce misleading conclusions. A gene that appears to be newly emerging may simply be newly added to the database.

Mitigation: Standardize on a database version for each project and record the version in all outputs. When comparing with published studies, check which database version they used.

### Failure Pattern 5: Insufficient Read Depth for Low-Abundance Genes

Long-read sequencing produces fewer reads than short-read sequencing for the same cost, which means that low-abundance organisms may be missed entirely. An ARG carried by an organism at 0.1 percent abundance may not produce enough reads for confident detection.

Mitigation: Consider target enrichment for ARG-specific questions, increase sequencing depth, or use complementary methods such as epicPCR for host detection. The wastewater study found that long-read metagenomics detected a subset of the ARG hosts detected by epicPCR, indicating that untargeted metagenomics has sensitivity limits.

## Limitations of Long-Read Functional Gene Annotation

### Sensitivity Limits for Low-Abundance Genes

Long-read metagenomics has lower sensitivity than short-read metagenomics for detecting low-abundance genes because the number of reads produced is lower. The wastewater surveillance study found that long-read metagenomics detected a wider range of ARG hosts than short-read metagenomics, but the host range was still a subset of what epicPCR detected. This means that some ARG-host linkages will be missed by any metagenomic approach.

### Database Completeness and Bias

All reference databases are incomplete. CARD, ResFinder, and VFDB contain curated genes that have been discovered and characterized, but the full diversity of resistance genes and virulence factors in environmental and agricultural samples is unknown. Novel genes that do not match any database entry will be missed.

The databases also have taxonomic bias. Genes from well-studied pathogens are overrepresented, while genes from environmental organisms are underrepresented. This bias affects detection sensitivity across different sample types.

### Context Resolution Limits

While long reads provide better context information than short reads, they do not always resolve the full genomic context. A read may span an ARG and a transposase, but the complete plasmid or integrative conjugative element may be larger than any single read. Assembly can help, but complex repeat structures may prevent complete assembly.

### Computational Requirements

Long-read metagenomic analysis requires substantial computational resources, particularly for assembly and taxonomic classification. The error correction and polishing steps are computationally intensive. Researchers working with limited computing resources may need to use cloud-based platforms or the Galaxy platform, which provides accessible workflows for bioinformatics analysis.

## Welfare and Safety Context for Agricultural Applications

### Antimicrobial Resistance as a One Health Issue

Antimicrobial resistance in agricultural settings is a One Health concern because resistance genes can move between animals, humans, and the environment. The gut microbiome of food-producing animals can serve as a reservoir for antimicrobial resistance genes, and these genes can be transferred to human pathogens through various pathways.

A review of the gut as a reservoir for antimicrobial resistance emphasizes that disruption of the microbiome can lead to colonization by pathogenic organisms and that the gut serves as a reservoir for beta-lactam and plasmid-mediated quinolone resistance. Long-read sequencing technologies are discussed as tools to detect and understand antimicrobial resistance genes within the gut microbiome.

For farmers and veterinarians, this means that monitoring ARGs in livestock feces, wastewater, and surrounding environments provides information about the resistance burden in the agricultural system. A study of laying hen feces found that animal feces were an important reservoir for the enrichment and maintenance of ARGs, with highly active insertion sequences contributing to the prevalence of many resistance genes. The study also found that small high-copy plasmids played a significant role in the dissemination of several ARGs, including floR and tet(L), which could disturb the compositions of fecal ARGs.

### Biosecurity Decision Making

The results of functional gene annotation can inform biosecurity decisions. If long-read analysis reveals that a specific ARG is frequently associated with mobile genetic elements in your samples, this indicates a higher risk of horizontal gene transfer. If the same ARG is always chromosomal, the risk of spread to other organisms is lower.

The wastewater treatment study found that the activated sludge process acted as a barrier against the proliferation of most ARGs, while those that persisted or increased warranted further attention. This type of finding can guide decisions about treatment efficacy and the need for additional intervention.

### Professional Escalation Criteria

When should you escalate findings to a veterinarian, public health official, or regulatory body? The following criteria suggest that professional consultation is warranted:

- Detection of an ARG that confers resistance to critically important antimicrobials, particularly if the gene is plasmid-associated
- Detection of a novel ARG variant with high similarity to a clinically important resistance gene
- Detection of the same ARG across multiple samples or multiple farms, suggesting dissemination
- Detection of ARGs in organisms that are known human or animal pathogens
- Evidence of ARG co-location with multiple mobile genetic elements, indicating high mobility potential

These criteria are not regulatory requirements but represent prudent practice for managing antimicrobial resistance risks in agricultural settings.

## Practical Implementation Steps for a Farm or Laboratory Setting

### Step 1: Define Your Surveillance Question

Before collecting samples or running analyses, define what you need to know. Are you monitoring for specific resistance genes of concern? Are you assessing the overall resistance burden in your operation? Are you investigating a suspected resistance outbreak? Your question determines your sampling strategy, sequencing approach, and analysis priorities.

### Step 2: Establish a Sampling Protocol

Consistent sampling is essential for meaningful surveillance. Define sample types (feces, wastewater, soil, feed), sampling locations, sampling frequency, and sample size. Record the date, location, and any relevant management information for each sample. The wastewater treatment study collected influent and effluent samples across multiple plants, which allowed comparison of ARG profiles before and after treatment.

### Step 3: Select Sequencing and Analysis Approach

Based on your question and resources, choose between Nanopore and PacBio sequencing, between shotgun and target-enriched approaches, and between read-based and assembly-based analysis. Document your choices and the rationale for each decision.

### Step 4: Run the Annotation Pipeline

Execute the workflow described above, starting with quality assessment and proceeding through ARG annotation, virulence factor annotation, mobile genetic element context analysis, and host assignment. Record all parameters and database versions.

### Step 5: Interpret Results in Context

Interpret your annotation results in the context of your farm or laboratory operations. A resistance gene that is common in your samples may reflect normal environmental background or may indicate a specific problem such as overuse of a particular antibiotic class. The study of laying hen feces found that the distribution pattern of chromosomal ARGs was more strongly associated with fecal microbial communities than plasmid-mediated ARGs, suggesting that different ARG types have different ecological drivers.

### Step 6: Report and Act

Prepare a report that includes the annotation results, quality metrics, and interpretation. Share the report with relevant stakeholders, including farm managers, veterinarians, and public health officials as appropriate. Use the results to inform management decisions such as antibiotic use policies, biosecurity measures, and treatment protocols.

## A Decision Framework for Assigning Mobility Risk to Detected ARGs

Identifying an ARG in a long-read metagenome is only the first step. The practical value of that detection depends on how you classify its mobility risk, because a chromosomal gene in a commensal organism and a plasmid-borne gene in a pathogen pose fundamentally different threats. This section provides a structured decision framework that converts raw annotation outputs into actionable risk classifications, along with a record system for tracking those decisions across samples and time points.

### Defining Mobility Risk Categories

Before you analyze your first sample, establish three mobility risk categories that will be applied consistently to every ARG annotation. The categories should be simple enough that different analysts can apply them reproducibly, yet specific enough to support management decisions.

**Category 1: Low mobility risk.** The ARG is located on a chromosomal contig or read, with no mobile genetic element genes within a defined flanking distance. The gene may still spread vertically through population growth, but it is unlikely to transfer horizontally to other taxa. A study of laying hen feces found that ARGs in Firmicutes were usually carried on chromosomes, which suggests that many Firmicutes-associated resistance genes fall into this category.

**Category 2: Moderate mobility risk.** The ARG is co-located with at least one mobile genetic element marker, such as a transposase, integrase, or insertion sequence, but there is no evidence of plasmid backbone genes. The gene could move through transposition or integration events, but the mechanism is less efficient than conjugative plasmid transfer. The wastewater treatment study found that ARGs co-located with transposable, integrative, and conjugative element hallmark genes showed similar trends to plasmid-associated ARGs, indicating that these categories often behave alike.

**Category 3: High mobility risk.** The ARG is located on a sequence that contains plasmid replication genes, relaxase genes, or other plasmid backbone markers, or the ARG is flanked by multiple mobile genetic elements that together form a mobile genetic island. These genes have the highest potential for horizontal transfer across bacterial taxa. The same wastewater study quantified the percentage of ARGs with mobility potential by identifying ARGs located on plasmids or co-located with mobile genetic element hallmark genes, providing a template for this classification.

### Applying the Framework to Your Data

The classification process begins after you have completed ARG annotation and mobile genetic element context analysis. For each ARG annotation, examine the flanking sequence on the same read or contig. The flanking distance you use for defining co-location should be recorded in your analysis log. A common standard is 5 kilobases upstream and downstream of the ARG, but you should adjust this based on your read lengths and assembly quality.

For read-based analysis, a single read that spans the ARG and a transposase gene provides direct evidence of co-location. For assembly-based analysis, examine the assembled contig for the presence of mobile genetic element genes within the defined flanking window. If the ARG is at the end of a contig and the flanking sequence is incomplete, classify the mobility risk as unknown instead of guessing. An unknown classification is a valid outcome and should be reported as such.

The study of wastewater treatment plants across five facilities on three continents demonstrated how this classification can be applied at scale. The researchers quantified the percent abundance of ARGs with mobility potential and found that plasmid-associated ARGs decreased from 40 to 73 percent in influent sewage to 31 to 68 percent in activated sludge at four of the five plants. This type of quantitative mobility assessment requires consistent classification criteria across all samples.

### Record System for Mobility Risk Tracking

Maintain a structured record for each ARG annotation that includes the mobility risk classification and the evidence supporting it. A spreadsheet or database table with the following fields supports both immediate decision-making and longitudinal trend analysis:

- Sample identifier and collection date
- ARG name and database identifier
- Percent identity and coverage against the reference sequence
- Mobility risk category (low, moderate, high, or unknown)
- Evidence type (read-based co-location, assembly-based co-location, plasmid marker presence)
- Flanking distance used for co-location definition
- Mobile genetic element genes identified in the flanking region
- Host taxon if assignment was possible
- Analyst name and date of classification

This record system allows you to track changes in mobility risk over time. If a gene that was consistently chromosomal in your samples begins appearing on plasmid-associated sequences, that shift warrants immediate attention. The laying hen study found that small high-copy plasmids played a significant role in the dissemination of several ARGs, including floR and tet(L), which could disturb the compositions of fecal ARGs. Without a record system that tracks gene location over time, you would miss this type of emerging risk.

### Troubleshooting Ambiguous Mobility Classifications

Ambiguous classifications are common and should be expected. The most frequent ambiguity occurs when an ARG is co-located with a transposase but the sequence does not extend far enough to determine whether a plasmid backbone is present. In this case, classify the gene as moderate risk and note the limitation in your record.

A second common ambiguity arises when the same ARG is detected on multiple reads or contigs with different contexts. One read may show the gene in a chromosomal context while another shows it near a transposase. This pattern suggests that the gene exists in multiple copies or locations within the community. Record all contexts and classify the gene at the highest mobility risk observed, because the presence of even one mobile copy represents a transfer risk.

A third ambiguity occurs when the ARG is located near a gene that has sequence similarity to a transposase but the match is below your confidence threshold. In this case, you should not classify the gene as moderate risk based on weak evidence. Instead, record the observation as a potential mobile genetic element and flag it for manual review. The NCBI provides sequence resources that can help you investigate ambiguous matches through targeted BLAST searches against the non-redundant nucleotide database.

### Integrating Mobility Risk into Management Decisions

The mobility risk classification should directly inform your response to a detection event. A high mobility risk ARG that confers resistance to a critically important antimicrobial warrants immediate escalation to a veterinarian or public health official, particularly if the gene is detected in a sample from a food-producing animal. A low mobility risk ARG in a commensal organism may warrant monitoring but does not require immediate intervention.

The wastewater treatment study concluded that the activated sludge process acted as a barrier against the proliferation of most ARGs, while those that persisted or increased warranted further attention. This finding illustrates how mobility risk classification can identify which genes require ongoing surveillance. Genes that persist despite treatment or management interventions, especially those with high mobility potential, should be prioritized for follow-up investigation.

For longitudinal surveillance programs, track the proportion of ARGs in each mobility risk category over time. An increasing proportion of high mobility risk ARGs indicates that horizontal gene transfer is becoming more active in your system, even if the total ARG abundance remains stable. This trend signal is one of the most valuable outputs of long-read metagenomic analysis, because it captures a dynamic process that short-read methods cannot resolve.

### Validation of Mobility Classifications

Mobility risk classifications based on sequence context are predictions, not confirmed biological facts. A gene classified as plasmid-associated based on flanking plasmid markers may not be on a functional plasmid, and a gene classified as chromosomal may be part of an integrated mobile element that can excise under the right conditions.

When a classification will inform a high-stakes decision, consider validating it with a complementary method. The wastewater surveillance study compared long-read metagenomics to epicPCR, a targeted method that physically links ARGs to their host cells. The study found that long-read metagenomics detected a wider range of ARG hosts than short-read metagenomics, but the host range was still a subset of what epicPCR detected. This finding demonstrates that no single method provides complete information, and validation with an orthogonal approach can strengthen confidence in critical classifications.

For routine surveillance, validation of every classification is not practical. Instead, validate a subset of high mobility risk calls and use those results to calibrate your confidence in the classification framework. If validation consistently confirms your sequence-based predictions, you can rely on the framework for routine decisions. If validation reveals frequent misclassifications, revise your criteria and reanalyze historical data.

## Frequently Asked Questions

### What is the minimum read length needed for ARG detection in long-read metagenomes?

The minimum read length depends on the size of your target genes. Most ARGs are between 800 and 1,500 base pairs, so reads should be at least this length to span a complete gene. For context analysis, longer reads are better because they can capture flanking mobile genetic elements. A practical approach is to filter reads below 1,000 base pairs for ARG-focused analysis, but you should adjust this threshold based on your specific target genes and sequencing platform.

### How do I choose between CARD and ResFinder for ARG annotation?

Use both databases for complementary information. CARD provides resistance mechanism information and includes mutation-based resistance, while ResFinder focuses on acquired resistance genes. Running both and comparing results can help you identify confident calls and flag discrepancies that require manual review. Record the version of each database used because updates can change results.

### Can I use short-read data for the same analysis?

Short-read data can be used for ARG detection, but you will lose the context information that long reads provide. Short reads cannot reliably determine whether an ARG is plasmid-associated or chromosomal, and they have difficulty resolving gene completeness. If you have short-read data, you can still detect the presence of ARGs, but you should be cautious about interpreting gene location and mobility potential.

### How do I determine whether an ARG is on a plasmid or the chromosome?

Examine the flanking sequences of the ARG for plasmid replication genes, relaxase genes, or other plasmid markers. You can also compare the coverage of the ARG region to the coverage of the chromosome. Plasmid-associated genes often have different coverage than chromosomal genes because plasmids are present in different copy numbers. Long reads that span the ARG and plasmid backbone provide direct evidence of plasmid location.

### What identity threshold should I use for ARG annotation?

The appropriate identity threshold depends on your research question. For surveillance where you want to detect potential resistance genes, an identity threshold of 80 percent with at least 90 percent coverage is a reasonable starting point. For clinical or regulatory decisions, use a higher threshold such as 95 percent identity with full coverage. Report results at multiple thresholds so that readers can assess confidence.

### How do I handle novel ARGs that do not match any database entry?

Novel ARGs will be missed by database-dependent annotation. To detect them, you can use functional metagenomics approaches that screen for resistance phenotype instead of sequence similarity. You can also examine genes flanking known mobile genetic elements for potential novel resistance genes. If you identify a candidate novel ARG, confirm its function through laboratory experiments before drawing conclusions.

### What is the role of target enrichment in long-read ARG detection?

Target enrichment uses hybridization probes to capture ARG sequences before sequencing, dramatically increasing sensitivity for low-abundance genes. The TELSeq study demonstrated more than 1,000-fold higher ARG recovery compared to non-enriched sequencing. Target enrichment is useful when you are specifically interested in ARGs and need to detect genes carried by low-abundance organisms.

### How should I report ARG annotation results for publication?

Report the database versions, identity and coverage thresholds, and quality metrics for each annotated gene. Include the genomic context classification (chromosomal, plasmid, or MGE-associated) and the host taxon when assignment was possible. Provide your analysis scripts and parameter files so that other researchers can reproduce your results. Follow the reproducibility standards described in the nf-core documentation and the Galaxy Training Network tutorials.

## Related Bioinformatics Guides

- [Functional Annotation of Metagenomes: A Guide to Databases and Pipelines](/knowledge/bioinformatics/functional-annotation-of-metagenomes-a-guide-to-databases-and-pipelines)
- [Long-Read Metagenome Assembly: Overcoming Challenges with Nanopore and PacBio Data](/knowledge/bioinformatics/long-read-metagenome-assembly-overcoming-challenges-with-nanopore-and-pacbio-data)
- [Evaluating Metagenomic Assembly Tools: A Benchmarking Framework for Short-Read and Long-Read Data](/knowledge/bioinformatics/evaluating-metagenomic-assembly-tools-a-benchmarking-framework-for-short-read-and-long-read-data)
- [Long-Read Sequencing Cost and Market: What to Expect](/knowledge/bioinformatics/long-read-sequencing-cost-and-market-what-to-expect)
- [Genomic Surveillance for Antimicrobial Resistance: A Bioinformatics Workflow](/knowledge/bioinformatics/genomic-surveillance-for-antimicrobial-resistance-a-bioinformatics-workflow)

## References and Further Reading

- [NCBI Data Resources](https://www.ncbi.nlm.nih.gov/). National Center for Biotechnology Information.
- [EMBL-EBI Training](https://www.ebi.ac.uk/training). European Bioinformatics Institute.
- [Bioconductor](https://bioconductor.org/). Bioconductor Project.
- [Galaxy Training Network](https://training.galaxyproject.org/). Galaxy Project.
- [nf-core Documentation](https://nf-co.re/docs). nf-core.
- [The Carpentries Lessons](https://carpentries.org/lessons). The Carpentries.
- [The Gut Microbiome as a Reservoir for Antimicrobial Resistance.](https://pubmed.ncbi.nlm.nih.gov/33326581). The Journal of infectious diseases, 2021.
- [Sensitivity and consistency of long- and short-read metagenomics and epicPCR for the detection of antibiotic resistance genes and their bacterial hosts in wastewater.](https://pubmed.ncbi.nlm.nih.gov/38490149). Journal of hazardous materials, 2024.
- [Long-read metagenomic sequencing reveals shifts in associations of antibiotic resistance genes with mobile genetic elements from sewage to activated sludge.](https://pubmed.ncbi.nlm.nih.gov/35093160). Microbiome, 2022.
- [Long-read metagenomic sequencing reveals that high-copy small plasmids shape the highly prevalent antibiotic resistance genes in animal fecal microbiome.](https://pubmed.ncbi.nlm.nih.gov/37269991). The Science of the total environment, 2023.
- [Target-enriched long-read sequencing (TELSeq) contextualizes antimicrobial resistance genes in metagenomes.](https://pubmed.ncbi.nlm.nih.gov/36324140). Microbiome, 2022.

> This article is educational and does not replace validated analysis plans, institutional policy, clinical interpretation, or specialist review.