@article{mbs:/content/journal/mgen/10.1099/mgen.0.000634, author = "Matlock, William and Lipworth, Samuel and Constantinides, Bede and Peto, Timothy E. A. and Walker, A. Sarah and Crook, Derrick and Hopkins, Susan and Shaw, Liam P. and Stoesser, Nicole", title = "Flanker: a tool for comparative genomics of gene flanking regions", journal= "Microbial Genomics", year = "2021", volume = "7", number = "9", pages = "", doi = "https://doi.org/10.1099/mgen.0.000634", url = "https://www.microbiologyresearch.org/content/journal/mgen/10.1099/mgen.0.000634", publisher = "Microbiology Society", issn = "2057-5858", type = "Journal Article", keywords = "antimicrobial resistance (AMR)", keywords = "plasmid", keywords = "mobile genetic element (MGE)", keywords = "whole-genome sequencing", keywords = "bioinformatics", eid = "000634", abstract = "Analysing the flanking sequences surrounding genes of interest is often highly relevant to understanding the role of mobile genetic elements (MGEs) in horizontal gene transfer, particular for antimicrobial-resistance genes. Here, we present Flanker, a Python package that performs alignment-free clustering of gene flanking sequences in a consistent format, allowing investigation of MGEs without prior knowledge of their structure. These clusters, known as ‘flank patterns’ (FPs), are based on Mash distances, allowing for easy comparison of similarity across sequences. Additionally, Flanker can be flexibly parameterized to fine-tune outputs by characterizing upstream and downstream regions separately, and investigating variable lengths of flanking sequence. We apply Flanker to two recent datasets describing plasmid-associated carriage of important carbapenemase genes (bla OXA-48 and bla KPC-2/3) and show that it successfully identifies distinct clusters of FPs, including both known and previously uncharacterized structural variants. For example, Flanker identified four Tn4401 profiles that could not be sufficiently characterized using TETyper or MobileElementFinder, demonstrating the utility of Flanker for flanking-gene characterization. Similarly, using a large (n=226) European isolate dataset, we confirm findings from a previous smaller study demonstrating association between Tn1999.2 and bla OXA-48 upregulation and demonstrate 17 FPs (compared to the 5 previously identified). More generally, the demonstration in this study that FPs are associated with geographical regions and antibiotic-susceptibility phenotypes suggests that they may be useful as epidemiological markers. Flanker is freely available under an MIT license at https://github.com/wtmatlock/flanker.", }