Gaël, JF, Thomas, Mohamed Bertrand

Philippine Sophie

Françoise Arthur

Guillaume

Romain Bruno

Marie Héloïse

Ghislain, Florian, Philippe, Hélène, Diego, Thibault, Anouk Aman- Dine Laurent

! Sylvain

Azpae1457 Azpae1504

Magali Jaillard

Leandro Lima

Maud Tournoud

Pierre Mahé

Alex Van Belkum

Vin- Cent Lacroix

Laurent Jacob

VTK 106704 AZPAE1213 AZPAE1499 VTK 111138 AZPAE1494 AZPAE1506 VTK 115488

Avant-propos et remerciements

Je crois que la recherche est un chemin. Ce qu'on trouve au passage nous conduit vers de nouvelles questions et de nouvelles pistes de recherche. La thèse a cela d'intéressant et d'utile qu'elle a une n. À ce moment, il faut refermer les portes entrouvertes, parfois rebrousser chemin, quitter les impasses, et partager la route parcourue.

Beaucoup de personnes ont contribué de près ou de loin à la réalisation de ce travail, par leur soutien, leurs conseils, les discussions, leurs réalisations. Je tiens à les remercier de m'avoir aidée à avancer et à progresser. Jean-Baptiste merci pour ta conance, je ne serai pas là aujourd'hui si tu n'avais cru en moi pour réaliser ce projet. Franck, merci de m'avoir accueillie au sein de ton équipe, j'ai eu beaucoup de plaisir à y travailler. Merci de ton soutien, de ta disponibilité et de tes conseils. Laurent, tu es un directeur tip top, j'envie tes prochains thésards ! Merci de ta patience quand il s'agissait de m'expliquer, me ré-expliquer et me re-ré-expliquer les bases des statistiques en grandes dimensions je crois que ça n'a pas été vain. Merci pour les discussions toujours fructueuses devant ton tableau, pour ton implication. Leandro, sem ti este projeto não teria sido o mesmo. Acho que podemos orgulhar-nos do que realizámos. Obrigada pelo trabalho incrível que zeste, por todas as horas passadas no desenvolvimento, e depois no benchmark e na escrita. Maud, merci pour ta rigueur et ton exigence, ta disponibilité et tes conseils. On a encore de beaux projets à réaliser. Vincent, après chaque discussion avec toi, toutes pertinentes, j'ai eu l'impression de faire un bond en avant ! La confrontation des idées permet d'aller plus loin. Alex, het was geen gewonnen strijd, maar het is me gelukt om jou te overtuigen van de voordelen van onze methode! Bedankt voor je openheid en veeleisendheid, het heeft ervoor gezorgd dat ik mezelf kon overtreen. Ik reken op jou om reclame te maken voor DBGWAS! Pierre, c'est toujours un plaisir d'échanger avec toi, de chercher, de comprendre. Merci pour toutes tes explications ! Dany, I really enjoyed my visit in Oxford to get a deeper knowledge of bugwas. Thank you for welcoming me in your team, it was a great experience. A tous mes collègues de bioMérieux pour leurs encouragements sur la dernière ligne droite.

agent that kills microorganisms or inhibits their growth antibiotics particular antimicrobial killing specically bacteria resistome set of variants described on the literature to be involved in the antibiotic resistance RWAS resitome-wide association study GWAS genome-wide association study LD linkage disequilibrium, correlation between variants DBG/cDBG/pan-cDBG de Bruijn graph / compacted DBG / cDBG built over a population of genomes Lutte contre la résistance antimicrobienne: une pierre à l'édice Une résistance mondiale Contexte général de l'antibiorésistance Il y a 90 ans, Alexander Fleming découvrait la pénicilline et ouvrait une voie thérapeutique nouvelle et ecace de lutte contre les maladies infectieuses: celle des antibiotiques.

Mais sous la pression sélective de ces molécules mortelles pour elles, les bactéries ont naturellement évolué, illustrant au passage la théorie de l'évolution de Darwin: s'adapter ou disparaître. Rapidement les premières souches bactériennes insensibles à la pénicilline ont été observées et dès 1945, Fleming mettait en garde contre un usage inapproprié des antibiotiques: en augmentant la pression de sélection, on allait rendre les bactéries plus résistantes et les antibiotiques moins ecaces.

Après plusieurs décennies d'âge d'or de ces médicaments qui se sont au cours des années rendus indispensables à la médecine moderne la course contre la montre a démarré: chaque nouvelle molécule antibiotique introduite a vu l'apparition d'une résistance quelques années plus tard. Depuis les années 1990, la recherche stagne et aucune nouvelle famille de molécule n'a été découverte. La course est-elle perdue d'avance ? En 2014, l'Organisation Mondiale de la Santé tire pour la première fois la sonnette d'alarme dans un rapport sur l'émergence des résistances aux antimicrobiens: la proportion de souches microbiennes ayant développé des mécanismes pour résister à un ou plusieurs antimicrobiens croît dangereusement, en particulier dans les pays à faible revenu [212]. Une étude eectuée sur la période 2000 à 2015 met en lien la consommation croissante d'antibiotiques et l'augmentation des résistances [103].

On parle aujourd'hui d'ère post-antibiotique, et les prévisions sont actuellement très pessimistes: la propagation des souches bactériennes résistantes et multi-résistantes à l'échelle du globe remet en cause notre arsenal antibiotique. Les soins les plus anodins de la chirurgie, ou de banales infections urinaires pourront être mortels sans antibiotique. Il est estimé qu'en 2050, il y aura 10 millions de morts par an causés par une maladie infectieuse, soit plus que par le cancer [START_REF] O'neill | Tackling drug-resistant infections globally: nal report and recommendations[END_REF].

L'accélération et la propagation de l'antibiorésistance constitue aujourd'hui l'une des plus graves menaces pesant sur la santé mondiale. Bien qu'il ait été observé qu'une baisse de la consommation d'antibiotique puisse entraîner une baisse de la prévalence des souches résistantes [START_REF] De Jong | Ecacy and safety of procalcitonin guidance in reducing the duration of antibiotic treatment in critically ill patients: a randomised, controlled, open-label trial[END_REF][START_REF] Woerther | Characterization of fecal ESBL-producing Escherichia coli in a remote community during a long term period[END_REF], beaucoup d'études sont pessimistes quant à la réversibilité des résistances [START_REF] Andersson | Persistence of antibiotic resistance in bacterial populations[END_REF][START_REF] Hernando-Amado | Fitness costs associated with the acquisition of antibiotic resistance[END_REF][START_REF] Holmes | Understanding the mechanisms and drivers of antimicrobial resistance[END_REF] et il est à craindre que nous ne puissions éradiquer le phénomène. Il reste à espérer que l'on arrive à trouver un équilibre entre notre usage des antibiotiques et l'émergence et la propagation des résistances.

Un large éventail d'armes Mécanismes de résistance et leurs bases génétiques

En fonction de l'espèce à laquelle elles appartiennent, et en fonction du mode d'action de l'antibiotique, les bactéries agissent de diérentes manières pour se défendre [START_REF] Blair | Molecular mechanisms of antibiotic resistance[END_REF]. Elles peuvent mettre en place des mécanismes pour agir sur les sites actifs de l'antibiotique, modier sa cible, réduire la perméabilité de la membrane et ainsi la pénétration de l'antibiotique, ou permettre l'eux de l'antibiotique hors de la membrane (Figure a.).

Certaines résistances sont intrinsèques. Par exemple, la double paroi des bactéries à Gram négatif leur confère une résistance structurelle à la vancomycin: la molécule ne passe pas la membrane. De la même manière, les pompes à eux sont naturellement présentes chez de nombreuses espèces. Cependant une grande partie des mécanismes de résistance est acquise par des modications au niveau du génome des bactéries. mcr 10 RÉSUME ÉTENDU évidence [START_REF] Liu | Emergence of plasmid-mediated colistin resistance mechanism MCR-1 in animals and human beings in China: a microbiological and molecular biological study[END_REF]. La métaphore de la course aux armements que j'emploie est à nuancer lorsque l'on replace les déterminants de la résistance au sein de voies métaboliques plus globales et de réseaux de régulation, et plus généralement lorsque l'on considère leur part dans la physiologie des bactéries [START_REF] Martínez | A global view of antibiotic resistance[END_REF], mais elle ore un cadre général facile à appréhender dans lequel ancrer la présentation de mes travaux de thèse.

Mieux connaître son adversaire Enjeux de la thèse, présentation de l'état de l'art Ces mécanismes d'action sont étudiés depuis l'observation des premières résistances dans les années 1940. Des sites comme card.mcmaster.ca [START_REF] Mcarthur | The comprehensive antibiotic resistance database[END_REF] ou megares.meglab.org [START_REF] Lakin | MEGARes: an antimicrobial resistance database for high throughput sequencing[END_REF] recensent aujourd'hui une grande partie des régions des génomes bactériens connues pour, ou suspectées d'être impliquées dans la résistance aux antibiotiques. Les mécanismes de résistance évoluant et se diversiant, notre connaissance doit sans cesse être améliorée. Dans ce contexte, le projet de thèse vise à développer des méthodes et outils permettant de compléter et améliorer cette connaissance des déterminants génétiques de l'antibiorésistance. Au-delà de la thèse, les fruits de ce travail pourront par exemple servir à aner la base de données d'un système de diagnostic, dans le but d'optimiser l'antibiothérapie d'un patient [START_REF] Didelot | Transforming clinical microbiology with bacterial genome sequencing[END_REF][START_REF] Pallen | High-throughput sequencing and clinical microbiology: progress, opportunities and challenges[END_REF]. L'enjeu est donc d'identier de nouvelles régions du génome impliquées dans la résistance aux antibiotiques, de les annoter, et de quantier leur impact sur le phénotype. Les études d'association entre phénotype (l'antibiorésistance exprimée par la bactérie) et génotype (l'information contenue dans son génome) orent un cadre de choix pour compléter cette cartographie génétique. En 2006, Daniel Falush ouvre la voie de ces études aux bactéries elles n'étaient jusqu'alors appliquées qu'aux organismes eucaryotes en mettant en lumière les obstacles à surmonter pour les rendre ecaces: en particulier pouvoir estimer correctement les fortes structures des populations bactériennes, et cibler le plus grand nombre de variants génétiques, notamment ceux impliqués dans la régulation des gènes [START_REF] Falush | Genome-wide association mapping in bacteria[END_REF]. Ce type d'étude chez les bactéries n'a réellement vu son essor qu'en 2012. Entre 2012 et 2015, année du démarrage de la thèse, la majorité de ces études [START_REF] Alam | Dissecting vancomycinintermediate resistance in Staphylococcus aureus using genome-wide association[END_REF][START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF][START_REF] Laabei | Predicting the virulence of MRSA from its genome sequence[END_REF][START_REF] Walker | Whole-genome sequencing for prediction of Mycobacterium tuberculosis drug susceptibility and resistance: a retrospective cohort study[END_REF] étaient basées sur des approches développées pour les organismes eucaryotes: recherche de SNPs par rapport à un génome de référence et modèle d'association prenant en compte la structure de la population [START_REF] Purcell | PLINK: a tool set for whole-genome association and population-based linkage analyses[END_REF][START_REF] Thornton | ROADTRIPS: case-control association testing with partially or completely unknown population and pedigree structure[END_REF]. Une étude cependant proposait un test de convergence phylogénétique dédié aux bactéries [START_REF] Farhat | Genomic analysis identies targets of convergent positive selection in drug-resistant Mycobacterium tuberculosis[END_REF], tandis qu'une autre proposait de travailler avec des k-mers (tous les fragments de k nucléotides contenus dans la séquence du génome) plutôt qu'avec un génome de référence [START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF]. A partir de 2015, plusieurs études ont suivi la voie des k-mers, tant pour la recherche de nouveaux marqueurs [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF] que pour la prédiction du phénotype [START_REF] Drouin | Greedy biomarker discovery in the genome with applications to antimicrobial resistance[END_REF]. Une synthèse de ces études réalisée en début de thèse a été intégrée dans un article publié en 2017 [START_REF] Dunne | Microbial genomics and antimicrobial susceptibility testing[END_REF].

Mesure des forces ennemies

Phénotype: mesure de l'antibiorésistance La mesure internationalement utilisée pour quantier le phénotype que nous étudions le niveau de résistance d'une souche bactérienne est la concentration minimale inhibitrice (CMI). Elle se dénie comme la concentration la plus faible d'antibiotique inhibant la croissance bactérienne après une nuit d'incubation [START_REF] Andrews | Determination of minimum inhibitory concentrations[END_REF]. La donnée brute peut être une concentration (ex: 8μg/mL) ou une classe de concentrations (ex: 4μg/mL).

Des organismes comme le CLSI (Clinical & Laboratory Standards Institute) et l'EUCAST (European Committee on Antimicrobial Susceptibility Testing) fournissent des standards de mesure et d'interprétation de ces CMI, et notamment des seuils pour dénir si la bactérie est résistante, intermédiaire ou sensible à un antibiotique. Cette information est directement utilisée par les cliniciens pour adapter leur antibiothérapie. Il existe plusieurs méthodes de mesure de la CMI, parmi lesquelles des méthodes dites de référence, comme la microdilution, ou des systèmes automatisés permettant un débit d'analyse élevé, comme le système Vitek ® 2 vendu par bioMérieux [START_REF] Reller | Antimicrobial susceptibility testing: a review of general principles and contemporary practices[END_REF].

Selon l'antibiotique et l'espèce étudiée, les mesures eectuées avec une méthode ne sont pas toujours reproductibles [START_REF] Fuchs | Susceptibility testing quality control studies with fosfomycin tromethamine[END_REF] et peuvent varier entre méthodes [START_REF] Amsler | Comparison of broth microdilution, agar dilution, and Etest for susceptibility testing of doripenem against Gram-negative and Gram-positive pathogens[END_REF][START_REF] Hindler | Colistin MIC variability by method for contemporary clinical isolates of multidrug resistant Gram-negative bacilli[END_REF]. Un phénotype brut (CMI) est plus riche à exploiter car on peut identier des variations du trait phénotypique au sein d'une population de souches sensibles (respectivement résistantes). Cependant l'utilisation d'un phénotype simplié (binaire: sensible contre non-sensible) est largement répandu car il constitue l'information utilisée par les cliniciens.

Sur le terrain, des opportunités Génotype: issu du séquençage haut-débit Le génotype d'une souche bactérienne est représenté par les variations particulières de son génome par rapport à un génome de référence ou par rapport à tous les génomes d'une population. La donnée première est la séquence de son génome complet obtenue par séquençage. Aujourd'hui trois techniques de séquençage haut-débit sont dominantes: la détection optique d'étiquettes uorescentes spéciques xées aux nucléotides lors de leur synthèse (principe des séquenceurs Illumina ® [START_REF] Bentley | Accurate whole human genome sequencing using reversible terminator chemistry[END_REF]), la détection de diérences de potentiels spé- ciques de chaque nucléotide, liées à l'émission d'ions hydrogènes lors de la synthèse de l'ADN (principe des séquenceurs Ion Torrent [START_REF] Rothberg | An integrated semiconductor device enabling non-optical genome sequencing[END_REF]) et la détection des uctuations d'un courant électrique spécique de la séquence d'ADN qui traverse un nanopore (principe des séquenceurs Oxford Nanopore [START_REF] Branton | The potential and challenges of nanopore sequencing[END_REF]). Ces technologies produisent toutes une très grande quantité de fragments de la séquence du génome, appelées lectures (ou plus fréquemment reads, le terme anglais). Il existe une grande variabilité de la longueur et du taux d'erreur de ces reads selon la technologie [START_REF] Quail | A tale of three next generation sequencing platforms: comparison of Ion Torrent, Pacic Biosciences and Illumina MiSeq sequencers[END_REF]. L'obtention de la séquence du génome se fait ensuite par l'assemblage de ces reads en plus longs fragments, les contigs [START_REF] Birol | De novo transcriptome assembly with ABySS[END_REF][START_REF] Peng | IDBAa practical iterative de Bruijn graph de novo assembler[END_REF], puis éventuellement les contigs peuvent être re-assemblés jusqu'à retrouver la séquence d'un chromosome ou d'un plasmide complet [START_REF] Galardini | Contiguator: a bacterial genomes nishing tool for structural insights on draft genomes[END_REF][START_REF] Koren | One chromosome, one contig: complete microbial genomes from long-read sequencing and assembly[END_REF]. Enn, les séquences des génomes peuvent être annotées avec les positions de domaines fonctionnels comme les gènes ou les régions régulatrices [155,[START_REF] Seemann | Prokka: rapid prokaryotic genome annotation[END_REF]. Depuis son avènement il y a plus d'une dizaines d'année, le séquençage haut-débit s'est progressivement imposé en microbiologie [107,[START_REF] Loman | High-throughput bacterial genome sequencing: an embarrassment of choice, a world of opportunity[END_REF]. Il est aujourd'hui possible d'obtenir le génome assemblé et annoté de microorganismes en un temps et un coût relativement bas [START_REF] Didelot | Transforming clinical microbiology with bacterial genome sequencing[END_REF]. Ce progrès technique a permis de construire des panels de souches bactériennes pour lesquelles le génome séquencé et une mesure phénotypique sont disponibles. Les premières études d'associations bactériennes incluaient plusieurs dizaines de génomes (50 en 2012 [START_REF] Zankari | Genotyping using wholegenome sequencing is a realistic alternative to surveillance based on phenotypic antimicrobial susceptibility testing[END_REF], entre 60 et 160 l'année suivante [START_REF] Farhat | Genomic analysis identies targets of convergent positive selection in drug-resistant Mycobacterium tuberculosis[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF][START_REF] Stoesser | Predicting antimicrobial susceptibilities for Escherichia coli and Klebsiella pneumoniae isolates using whole genomic sequence data[END_REF]), puis à partir de 2014, des panels de plusieurs centaines voire plusieurs milliers de souches ont commencé à être étudiés, notamment pour les espèces Streptococcus pneumoniae [START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF], M. tuberculosis [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Walker | Whole-genome sequencing for prediction of Mycobacterium tuberculosis drug susceptibility and resistance: a retrospective cohort study[END_REF] et Staphylococcus aureus [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Gordon | Prediction of Staphylococcus aureus antimicrobial resistance by whole-genome sequencing[END_REF].

Y n X p n H 0
Quels variants pour décrire le génotype? Dans la littérature des études d'association chez les humains, l'unité de mesure de la variation génétique est le SNP [1, [START_REF] Bush | Genome-wide association studies[END_REF][START_REF]The international HapMap project[END_REF]. Cette unité n'est pas satisfaisante pour les études chez les bactéries [START_REF] Read | Characterizing the genetic basis of bacterial phenotypes using genome-wide association studies: a new direction for bacteriology[END_REF]. En eet, une grande part de la variabilité génomique bactérienne réside dans les transferts horizontaux. Il en résulte des génomes qui n'ont pas tous la même composition au sein d'une espèce et les SNPs seuls ne peuvent parvenir à décrire la diversité de cette partie du génome non partagée, dite accessoire [START_REF] Kung | The accessory genome of Pseudomonas aeruginosa[END_REF]. Parmi les premières études chez les bactéries, il a été proposé de tester la présence des gènes en plus de celle des SNPs, et également de tester la présence de k-mers [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF]. La question de la description du génotype a été au c÷ur de la thèse, et nous nous sommes notamment intéressés aux approches basées sur les k-mers pour nos développements.

Quelle mesure pour le génotype ? Les GWAS humains utilisent, pour encoder les SNPs sur les deux allèles présents chez chaque individu, les valeurs 0 (homozygote avec l'allèle majoritaire), 1 (hétérozygote) ou 2 (homozygote avec l'allèle minoritaire). Ici encore, la transposition ne peut être directe, les génomes bactériens étant haploïdes (présence d'un seul allèle par individu). Cependant, au niveau de la population bactérienne complète, plus de 2 allèles peuvent être observés pour un SNP. L'encodage peut alors se faire en utilisant plusieurs variables, décrivant chaque allèle. Ensuite, la mesure du génotype peut se faire de manière binaire (observation ou non du génotype dans la souche), comme c'est le cas dans les études bactériennes précédemment citées, ou par comptage (nombre d'observations). Le comptage peut en eet renseigner sur le nombre de copies de plasmides ou de gènes répétés. Cependant la séquence assemblée ne donne que partiellement l'information du nombre de copies car une partie des répétitions a déjà été supprimée [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF], alors qu'un comptage normalisé au niveau des reads peut en donner une meilleure estimation [START_REF] Meyerson | Advances in understanding cancer genomes through second-generation sequencing[END_REF].

Quelle mesure pour le phénotype ? Le phénotype de l'antibiorésistance, lorsqu'il est donné en CMI, peut être représenté par l'appartenance à une catégorie ordonnée de concentration (cf. Figure S1.5 en supplément). On peut également utiliser une valeur transformée de la CMI: son logarithme [START_REF] Eyre | WGS to predict antibiotic mics for Neisseria gonorrhoeae[END_REF] ou une valeur binaire issue des seuils CLSI ou EUCAST. Les études d'association précédemment citées utilisent toutes un phénotype binaire (sensible/résistant ou sensible/non-sensible). Cette question, ainsi que la suivante, ont été abordées en début de thèse.

Quel modèle d'association ? Dans le cadre des régressions linéaires généralisées que l'on s'est donné, le modèle dépend directement de l'hypothèse faite sur le phénotype: un modèle ordinal sera adapté aux données catégorielles ordonnées [START_REF] Mccullagh | Regression models for ordinal data[END_REF], un modèle linéaire aux données numériques continues [START_REF] Stanton | Galton, Pearson, and the peas: a brief history of linear regression for statistics instructors[END_REF], un modèle logistique aux données binaires [START_REF] Cox | The regression analysis of binary sequences[END_REF].

Problème en grande dimension. Le nombre de covariables (les p variants génétiques) est très supérieur de plusieurs ordres au nombre d'individus (les n souches bactériennes). Cette grande dimension rend impossible l'utilisation des modèles de régression multivariés standards. L'approche la plus répandue dans les études d'association est de tester indépendamment chaque variant décrit dans la matrice X, en réalisant p régressions. Elle a l'avantage de pouvoir être facilement mise en place et de permettre un calcul aisé de p-values pour chaque variant. Mais ces régressions marginales sont des modèles souvent très simples ne prenant pas en compte les distributions jointes de groupes de variants [START_REF] Buzdugan | Assessing statistical signicance in multivariable genome wide association analysis[END_REF][START_REF] Li | The bayesian lasso for genome-wide association studies[END_REF]. Cette approche est par ailleurs très sensible à la structure RÉSUME ÉTENDU de la population, si cette dernière n'est pas inclue dans le modèle. Toutes les études d'associations chez les bactéries citées précédemment et ayant pour objectif la recherche de nouveaux marqueurs testent les variants un à un, mais en prenant en compte la structure de la population dans le modèle. C'est également ce que nous avons implémenté dans nos travaux. Réaliser un grand nombre de tests soulève par ailleurs une problématique de tests multiples: la probabilité de rejeter l'hypothèse H 0 par erreur au moins une fois, parmi les p tests, n'est pas égale à la p-value individuelle de chaque test, et cette p-value nécessite d'être ajustée [START_REF] Benjamini | Controlling the false discovery rate: a practical and powerful approach to multiple testing[END_REF][START_REF] Goeman | Multiple hypothesis testing in genomics[END_REF][START_REF] Noble | How does multiple testing correction work?[END_REF]. Une manière d'adapter la régression jointe à la grande dimension est par l'utilisation des régressions pénalisées [START_REF] Wu | Genome-wide association analysis by lasso penalized logistic regression[END_REF]. Ces méthodes permettent de contrôler un compromis entre biais (ajustement du modèle) et variance (généralisation à d'autres données), en régulant la complexité du modèle par une pénalité. Si la pénalisation permet de résoudre le problème d'estimation des coecients du modèle, il ne fournit pas de solution générale pour le problème de test d'hypothèse, car la distribution nulle des coecients estimés n'est pas connue. Ce type d'approche permet cependant d'adapter le modèle aux jeux de données en s'appuyant sur un apriori inspiré de la biologie du problème, en développant des pénalités dédiées, par exemple, à la corrélation entre variants.

Corrélation entre variants (déséquilibre de liaison). Le déséquilibre de liaison (LD pour le terme anglais linkage disequilibrium ) fait référence à une corrélation entre variants au sein des génomes d'une population. Dans les génomes humains, le LD est structuré par blocs le long du génome. Ces blocs sont causés par la recombinaison entre paires de chromosomes lors de la méiose. De ce fait, la notion de LD est étroitement liée à la proximité entre les variants. Plusieurs pénalités ont été spéciquement proposées pour prendre en compte ce LD dans les régressions [START_REF] Dehman | Performance of a blockwise approach in variable selection using linkage disequilibrium information[END_REF][START_REF] Liu | Accounting for linkage disequilibrium in genome-wide association studies: a penalized regression method[END_REF]. L'idée générale de ces méthodes et d'attribuer des coecients proches aux variants proches et/ou de sélectionner des groupes de variants voisins corrélés. Cependant, dans les génomes bactériens, sans recombinaison systématique, le LD n'est pas structuré de la même manière. La corrélation observée entre les variants dans les génomes bactériens est fortement liée à la structure de la population: les variants sont transmis ensemble aux individus, et se répandent dans la population. Ainsi, le LD n'est pas limité aux variants proches, et des variants distants dans le génome peuvent être très corrélés [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF]. Des pénalités supposant une proximité ne sont pas pertinentes; des pénalités sélectionnant des groupes corrélés sans contrainte sur la position pourraient être intéressantes dans ce contexte [START_REF] Zou | Regularization and variable selection via the elastic net[END_REF], mais n'ont pas été testées dans ce travail. Corriger la structure de la population permet en eet de prendre en compte une grande partie des corrélations entre variants [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF].

Corrélation entre individus (structure de population). La prise en compte d'une éventuelle structure génétique au sein du panel de souches est essentielle pour éviter toute association confondante [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Falush | Genome-wide association mapping in bacteria[END_REF]. En eet, la reproduction clonale des bactéries rend les génomes fortement corrélés par clades, ce qui constitue une source de confusion augmentant le risque d'identier de fausses associations. De nombreuses méthodes ont été développées pour inclure la structure de population dans les études d'association chez les eucaryotes [START_REF] Devlin | Genomic control for association studies[END_REF][START_REF] Pritchard | Association mapping in structured populations[END_REF][START_REF] Setakis | Logistic regression protects against population structure in genetic association studies[END_REF]. A partir de 2006, deux méthodes dominent: utiliser les composantes principales de la matrice des variants pour l'ajustement des variables ou comme covariables à eet xe dans le modèle [START_REF] Price | Principal components analysis corrects for stratication in genome-wide association studies[END_REF] (mentionnés ci-après modèles à eet xe), et l'utilisation des modèles mixtes, dans lesquels on suppose un eet xe pour le variant testé et un eet aléatoire pour la matrice des composantes principales [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Yu | A unied mixed-model method for association mapping that accounts for multiple levels of relatedness[END_REF][START_REF] Zhou | Genome-wide ecient mixed-model analysis for association studies[END_REF].

La diversité des études d'associations ne se limite pas à ces questions, et beaucoup n'ont pas été abordées dans ces travaux, comme : la prise en compte simultanée de plusieurs phénotypes (résistance à plusieurs antibiotiques) an prendre en compte les corrélations existantes entre les phénotypes (co-résistance) [START_REF] Zhou | Ecient multivariate linear mixed-model algorithms for genome-wide association studies[END_REF],

les approches multi-omiques, pour chercher des variables explicatives au-delà de la séquences du génome (données épigénétiques, transcriptomiques, protéomiques...) [START_REF] Boulesteix | Ipf-lasso: Integrative l1-penalized regression with penalty factors for prediction based on multi-omics data[END_REF], la prise en compte d'interactions entre variants (épistasie) [START_REF] Mckinney | Six degrees of epistasis: statistical network models for GWAS[END_REF], la détection des variants rares et plus généralement de l'héritabilité manquante [START_REF] Manolio | Finding the missing heritability of complex diseases[END_REF],

etc.

Première oensive

Le résistome de P. aeruginosa Dans une première étude, démarrée par d'autres collègues avant ma thèse, nous nous sommes intéressés à l'ensemble des déterminants génétiques de la résistance, déjà décrits pour l'espèce P. aeruginosa. Ces déterminants forment le résistome de l'espèce. P. aeruginosa est une espèce bactérienne particulièrement adaptable à son environnement et qui est à l'origine de nombreuses infections nosocomiales. Son adaptabilité s'explique par la structure riche et mouvante de son génome on parle de plasticité du génome. Ce génome, de taille relativement élevée (entre 5,8 à 7,6 Mpb), contient une très grande variété de gènes lui apportant une large palettes de fonctionnalités (motilité, adhésion, création de biolm, virulence, etc.). Il contient également, avec ceux des autres espèces du genre Pseudomonas, la plus grande proportion de gènes de régulation chez les bactéries [START_REF] Kung | The accessory genome of Pseudomonas aeruginosa[END_REF].

En plus des réseaux très complexes de régulation que la bactérie est capable de mettre en place, notamment pour ajuster l'action des pompes à eux et des porines, elle a une très grande facilité à échanger du matériel génétique qu'elle intègre ensuite à son génome, via plusieurs mécanismes dont les plasmides, les ICE (en anglais integrative and conjugative elements), les transposons ou les intégrons [START_REF] Kung | The accessory genome of Pseudomonas aeruginosa[END_REF]. L'étude mise en place dans ce contexte regroupait 672 souches de P. aeruginosa issues de trois collections et avait deux pans: l'un descriptif, l'autre quantitatif. La description du résistome a été faite en annotant dans chaque génome la présence des déterminants connus (gène complet ou mutation ponctuelle) (Figure 1.1). L'annotation des déterminants par leurs mécanismes sous-jacents a ensuite conrmé que les gènes impliqués dans l'eux et l'inux sont naturellement présents au sein de l'espèce (forte prévalence), alors que les gènes permettant l'inactivation de l'antibiotique sont principalement acquis (faible prévalence). Par ailleurs, une partie des gènes accessoires a été trouvée dans des intégrons. Une analyse descriptive des intégrons dans l'espèce, par annotation des intégrases et des gènes trouvés en amont des intégrases, a mis en évidence la grande diversité de ces éléments, dont certains se sont largement répandus, comme In51 portant le gène aadA6 et qui est disséminé dans diérents phylogroupes (Figure 1.2). Le pan quantitatif incluait 9 études d'association modélisant, pour 9 antibiotiques, le phénotype exprimé en catégories ordonnées de CMI à l'aide d'un modèle ordinal. Les variables explicatives étaient le comptage des gènes du résistome, et des mutations ponctuelles dans ces gènes. Une matrice décrivant les mutations dans les core gènes, les gènes partagés par tous les individus au sein de l'espèce, par opposition aux gènes accessoires, a été utilisée pour estimer la structure de la population. Enn, des q-values ont été calculées, leur interprétation n'est pas directe, des analyses complémentaires sont nécessaires pour retrouver à quelle région du génome les k-mers d'intérêt appartiennent, et s'ils représentent un SNP ou un autre type de variation.

Pour aider dans leur interprétation, nous avons voulu garder la trace de l'ordre dans lequel les k-mers ont été vus dans les séquences. Cela correspond à tracer une arête de chaque kmer au suivant. Cette représentation du chevauchement entre chaînes de caractères a déjà été décrite: il s'agit des graphes de De Bruijn [START_REF] De Bruijn | A combinatorial problem[END_REF], utilisés en bioinformatique depuis que Pevzner et. al les a introduits, en 2001, pour l'assemblage de novo des reads [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF]. Même si l'ordre des k-mers n'est pas totalement conservé (un k-mer répété dans un génome est représenté par un unique n÷ud dans le graphe et génère ainsi une boucle [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF]), nous avons choisi d'explorer l'utilisation des graphes de De Bruijn dans le cadre des études d'association chez les bactéries.

Ces graphes sont utilisés comme outils pour répondre à un objectif soit d'assemblage

(ABySS [START_REF] Birol | De novo transcriptome assembly with ABySS[END_REF], IDBA [START_REF] Peng | IDBAa practical iterative de Bruijn graph de novo assembler[END_REF]), soit, depuis 2010, d'identication de variants (KisSNP [START_REF] Peterlongo | Identifying SNPs without a reference genome by comparing raw reads[END_REF],

KisSplice [START_REF] Sacomoto | KISSPLICE: de novo calling alternative splicing events from RNA-seq data[END_REF], DiscoSNP++ [START_REF] Uricaru | Reference-free detection of isolated SNPs[END_REF], Cortex [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF]). Alors que les graphes sont jusqu'alors utilisés comme outils mathématiques, Iqbal et. al introduit en 2012 les graphes colorés, utilisés pour visualiser des variations génétiques [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF]. Dans un graphe coloré, construit à l'échelle d'une population, chaque couleur représente un individu. Dans cet esprit, nous avons cherché comment enrichir un graphe de De Bruijn, représentant des variations génétiques, avec l'information phénotypique cet enrichissement est mentionné dans la communauté des graphes comme une décoration [30].

Une preuve de concept a été réalisée en créant un graphe de De Bruijn à partir de toutes les séquences du gène gyrA (cible connue des uoroquinolones, dont la levooxacine) extraites du panel complet des génomes de P. aeruginosa, puis en le décorant d'une part en appliquant aux n÷uds un gradient de couleur en fonction de la proportion de souches résistantes à la levooxacine dans lesquelles la séquence représentée par le n÷ud était présente, et d'autre part en utilisant la fréquence d'observation de chaque séquence dans le panel complet pour déterminer la taille du n÷ud lui correspondant. Le graphe présenté dans la Cependant tester au niveau d'un sous-graphe n'est pas trivial. Alors que la présence ou l'absence d'un unitig est clairement dénie dans un génome, il n'est pas évident de déterminer comment mesurer la présence d'un sous-graphe dans un génome. L'utilisation de méthodes pénalisées peut permettre de sélectionner des groupes de n÷uds proches dans le graphes, en pénalisant les diérences d'eet estimés pour des n÷uds proches [START_REF] Li | Network-constrained regularization and variable selection for analysis of genomic data[END_REF][START_REF] Mairal | Supervised feature selection in graphs with path coding penalties and network ows[END_REF]. Mais ces méthodes ne sélectionnent pas non plus explicitement des sous-graphes, potentiellement branchants, et ne pourraient pas permettre de contrôle du taux de faux positifs au niveau des sous-graphes. De plus elles ne sont pas toujours directement applicables aux graphes de De Bruijn, qui contiennent des cycles. Bien que le test mis en place se fasse au niveau des unitigs, nous avons montré que son interprétation pouvait se faire au niveau des sous-graphes. En eet la contribution originale principale de la thèse a été le post-traitement de cette analyse, s'appuyant sur le graphe de De Bruijn construit initialement, et qui a permis de re-créer a posteriori des sous-graphes décorés interprétables, de la même manière que celui construit dans l'exemple du gène gyrA. L'analyse à grande échelle attribue une q-value à chaque n÷ud du graphe. Le sous-ensemble des n÷uds avec les plus faibles q-values est replacé dans le graphe initial et le voisinage de ces n÷uds est extrait. Le voisinage est déni comme tous les n÷uds distants d'au plus ne arrêtes. Le sous-graphe induit par les n÷uds les plus associés et leurs n÷uds voisins est composé de plusieurs composantes connexes, et nous avons fait l'hypothèse que ces composantes connexes pouvaient représenter des régions génomiques distinctes (Figures S2.8 et S2.9). En eet, si deux n÷uds proches dans le graphes sont sélectionnés ensemble, leurs voisinages se chevauchent et ils se retrouvent dans la même composante connexe (Figure 3.6). Pour plus de simplicité, nous avons nommé chacune de ces composantes un sous-graphe. Ces sous-graphes décorés orent un cadre d'interprétation plus aisé: les polymorphismes locaux sont représentés par des n÷uds bleus et des n÷uds rouges, comme présenté dans la Figure 2.3, les insertions (resp. délétions) de régions sont représentées par un sous-graphe linéaire constitué majoritairement de n÷uds rouges (resp. bleus) (Figure 3.3D,E), l'annotation des n÷uds avec le nom de domaines fonctionnels informe si le polymorphisme est dans la séquence du gène, dans sa région promotrice (Figure 3.3C), ou dans une région intergénique. De plus, le regroupement des n÷uds fortement associés dans une même entité (le sousgraphe) permet de synthétiser l'information et de prendre indirectement en compte le LD local. La présentation des résultats se fait par sous-graphe qui dans la pratique représente en eet très souvent une région particulière du génome et non pas par entité testée. Cette représentation en sous-graphe permet également de visualiser le contexte de l'insertion d'un gène causal (cassette SCCmec portant le gène mecA, Figure 3.3D, plasmide portant le gène ermC, Figure 3.3E). Par ailleurs, le fait d'annoter l'ensemble des n÷uds du sous-graphes et non pas seul le n÷ud fortement associé permet de consolider l'annotation fonctionnelle.

Déploiement à grande échelle Développement, utilisation et publication de l'outil DBGWAS Devant l'intérêt suscité par cette représentation des résultats, et en collaboration avec l'équipe LBBE/Erable Inria, nous avons développé un outil computationnellement ecace pour mettre en ÷uvre notre méthode en trois étapes : la première étape, qui construit le graphe de De Bruijn à partir des assemblages, puis la matrice X des variants (présence/absence des unitigs du graphes dans les génomes) s'appuie sur la librairie C++ GATB [START_REF] Drezen | GATB: genome assembly & analysis tool box[END_REF]. La deuxième étape eectue les tests d'association à l'aide de modèles linéaires mixtes et s'appuie sur la librairie R bugwas [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF]. Enn, la troisième étape, qui eectue le posttraitement et ache les sous-graphes décorés et ordonnés par q-value croissante, utilise la librairie javascript cytoscape.js [START_REF] Franz | Cytoscape.js: a graph theory library for visualisation and analysis[END_REF] (Figure 3.2). Nous avons étoé la sortie graphique et élargi les analyses à deux autres espèces présentant des structures de génomes diérentes: M. tuberculosis, espèce très clonale et S. aureus, sujette aux transferts horizontaux. L'outil créé, DBGWAS, a été comparé à deux autres méthodes publiées après 2016 et basées sur des k-mers pour tester des associations. Cette étude a montré que l'implémentation de DBGWAS était très compétitive. Nous présentons DBGWAS et son utilisation pour l'analyse de l'antibiorésistance pour les trois espèces bactériennes dans un article accepté pour publication en 2018 dans PLOS Genetics [START_REF] Jaillard | A fast and agnostic method for bacterial genome-wide association studies: bridging the gap between k-mers and genetic events[END_REF].

Plus loin vers l'interprétation Prédiction des labels des graphes de DBGWAS La topologie de la plupart des sous-graphes décorés peut facilement être associée à une catégorie de variant génétique (SNP, insertion d'élément mobile (MGE, pour mobile genetic element)), en particulier pour les espèces S. aureus et M. tuberculosis. Cependant, certains graphes obtenus pour P. aeruginosa et notamment pour l'étude de sa résistance à l'amikacine sont très branchants et moins facilement interprétables. Pour aider à leur lecture, et pour fournir aux utilisateurs de DBGWAS une aide générale à la lecture des sous-graphes, nous avons développé une méthode de prédiction de la catégorie des variant associés aux sous-graphes. Nous nous sommes focalisés sur les labels simples: polymorphisme local (label LP) et insertion ou délétion de MGE (label MGE), et avons conçu un ensemble de descripteurs des sous-graphes pour entrainer un moteur d'apprentissage. Nous l'avons alimenté avec des sous-graphes labellisés LP ou MGE, obtenus dans l'analyse précédemment évoquée sur les trois espèces bactériennes, et avec des sous-graphes simulés, représentant spéciquement les deux catégories de variants. Une approche classique par validation croisée a permis de sélectionner le meilleur modèle parmi six méthodes très répandues: trois régressions pénalisées, deux machines à vecteur de support, et des forêts aléatoires. Les forêts aléatoires ont fourni les meilleures performances en validation croisée, et leurs performances sur un jeu de test indépendant étaient en moyenne de 97% sur données simulées et 92% sur données réelles. Le modèle sélectionné a été utilisé pour prédire les labels des sous-graphes étudiés dans le Chapitre 3, et pour étudier l'intérêt de diminuer la taille du voisinage dans la construction des sous-graphes. Ce modèle pourra être inclu à DBGWAS comme aide à l'interprétation.

La lutte continue, ne déposons pas les armes Discussion et conclusions

Dans ce travail de thèse, nous nous sommes intéressés à l'application des études d'association aux génomes bactériens, pour l'étude de l'antibiorésistance. Nous avons testé diérentes manières de modéliser le phénotype, sans observer de différences signicatives en termes d'identication des marqueurs existants. Nous avons évalué la meilleure manière de prendre en compte les structures de population dans une étude chez P. aeruginosa et avons conrmé le potentiel des modèles linéaires mixtes qui oraient dans nos expériences le meilleur compromis pour diérentes congurations de structures de population. An d'élargir l'espace de recherche des associations, nous avons cherché comment améliorer la représentation des variations génétiques dans les génomes bactériens particulièrement plastiques. Les k-mers orent la exibilité nécessaire mais sont très redondants et ne permettent pas une interprétation directe des résultats obtenus. Les bulles d'un graphe de De Bruijn capturent des variations simples mais ne permettent pas d'identier des insertions polymorphes. La méthode que nous avons mise au point teste la présence ou l'absence des séquences représentées par les n÷uds d'un graphe de De Bruijn construit à partir de tous les génomes de la population étudiée. Nous avons concentré nos eorts sur le post-traitement de cette analyse, en proposant une visualisation du contexte génomique des n÷uds fortement associés au phénotype. Cette vue synthétique permet d'appréhender la séquence d'intérêt dans son ensemble et renseigne sur sa nature: polymorphisme local dans un gène, acquisition d'un gène par un plasmide, etc. Nous avons publié un outil clé en main implémentant cette méthode, qui peut être étendu pour apporter plus de fonctionnalités : détection automatique de la nature de la séquence identiée par le test, exibilité dans le choix du test d'association, analyse du déséquilibre de liaison au sein et entre sous-graphes, dénition d'un contrôle du taux de faux positifs au niveau des sous-graphes, etc. La méthode proposée peut être appliqué à d'autres phénotypes et aux eucaryotes, en adaptant notamment la mesure du génotype. La visualisation que nous avons proposée peut également s'appliquer à l'interprétation des modèles de prédiction basés sur les kmers, notamment pour la prédiction de l'antibiorésistance à partir d'un génotype. La lutte contre la (multi) résistance aux antibiotiques sera longue et dicile. Chaque petit pas peut compter.

Introduction

Antibiotic resistance

Ninety years ago, Alexander Fleming discovered penicillin and opened a path to a new and eective type of treatment against infectious diseases: the application of antibiotics. However under the selective pressure of these molecules the bacteria population evolved rapidly, illustrating Darwin's theory of evolution: adapt or disappear. Within a few years, the rst bacterial strains not susceptible to penicillin were observed and, in 1945, Fleming warned against misuse of antibiotics: by increasing the selective pressure, the bacteria would become more resistant and the antibiotics less eective.

After several decades of successful use of these drugs which became indispensable to modern medicine the race against time started: every new antibiotic introduced led to new resistant strains a few years later. Since the 1990s, no new antibiotic family has been discovered. Is the race lost?

In 2014, the World Health Organisation published an alarming report on the global emergence of antimicrobial resistance: the proportion of microbial strains that had developed resistance mechanisms to one or more antimicrobials was growing dangerously, especially in low-income countries [212]. A study carried out over the 2000-2015 period linked the growing consumption of antibiotics to the increase of multi-drug resistance [103]. Today, experts refer to a post-antibiotic era, and the forecasts are very pessimistic: the worldwide spread of resistant and multi-resistant bacterial strains challenges our antibiotic arsenal. Trivial surgeries or banal urinary tract infections could be fatal without antibiotics. It is estimated that in 2050, there may be 10 million deaths per year caused by infectious diseases, more than cancer victims [START_REF] O'neill | Tackling drug-resistant infections globally: nal report and recommendations[END_REF].

Today the acceleration and spread of antimicrobial resistance is one of the most serious threats to global health. Although in some situations the decrease of antibiotic consumption has been related to the decrease of the prevalence of resistant strains [START_REF] De Jong | Ecacy and safety of procalcitonin guidance in reducing the duration of antibiotic treatment in critically ill patients: a randomised, controlled, open-label trial[END_REF][START_REF] Woerther | Characterization of fecal ESBL-producing Escherichia coli in a remote community during a long term period[END_REF], many studies are pessimistic about the reversibility of resistance [START_REF] Andersson | Persistence of antibiotic resistance in bacterial populations[END_REF][START_REF] Hernando-Amado | Fitness costs associated with the acquisition of antibiotic resistance[END_REF][START_REF] Holmes | Understanding the mechanisms and drivers of antimicrobial resistance[END_REF] and it is highly probable that we will not be able to eradicate the phenomenon.

Antibiotic actions and resistance mechanisms

Antibiotics act on dierent aspects of the bacteria life, and either destroy cells or inhibit their growth. For instance, penicillin, methicillin, cefepime, meropenem and other β-lactams, as well as fosfomycin and glycopeptides perturb correct synthesis of the cell wall. While β-lactams inactivate the penicillin-binding proteins (coded by the pbp genes) which catalyse the cross-linking of the peptidoglycan, a major component of the cell wall, glycopeptides such as vancomycin block the pbp target, also preventing cross-linking. On the other hand, antibiotics of the quinolone family, such as ciprooxacin, levooxacin or ooxacin, block the DNA replication by preventing DNA unwinding: they inhibit the topoisomerase proteins (coded by gyrA and gyrB or parC and parE genes) which participate in DNA winding. As a last example, amikacin, kanamycin, streptomycin, gentamicin β β β mcr natural transformation allows competent bacteria to integrate extracellular `naked' DNA possibly remaining from a decomposing cell or from the active excretion of DNA by another cell. Second, conjugation, or conjugative transfer, refers to the transfer of genetic material by cell-to-cell contact, often through a pilus linking a donor cell to a recipient cell. Third, transduction involves DNA transfer via a bacteriophage: the bacterial virus infects a rst host and integrates into its chromosome. It is then excised possibly with a part of the rst host genome. This extra non-phage DNA can then be transferred to a second host after a new infection cycle. Alternative mechanisms have been recently described, among them, the extracellular vesicle-mediated transfer facilitates the exchange of large genetic cargo [START_REF] Tran | Genetic cargo and bacterial species set the rate of vesicle-mediated horizontal gene transfer[END_REF].

All these HGT mechanisms allow for the transfer of mobile genetic elements (MGE) carrying resistance genes and thus play an important role in antibiotic resistance dissemination. Plasmids are circular MGE sequences capable of replication which are acquired by conjugation. They contain transposable elements (transposons, insertion sequences) and integrons, which carry gene cargo. Integrons are not mobile by themselves but are usually carried by MGE. They integrate genes upstream their integrase [START_REF] Kung | The accessory genome of Pseudomonas aeruginosa[END_REF]. Integrative and conjugative elements (ICE), acquired by conjugation and able to integrate the host chromosome via site-specic recombination, are MGE found frequently in P. aeruginosa genome. Material acquired by transduction is referred to prophages or phage-like elements. All this dispensable genetic material, dierentially acquired within the species, constitutes the species accessory genome, as opposed to the core genome, which is shared within the species [START_REF] Kung | The accessory genome of Pseudomonas aeruginosa[END_REF]. The ubiquitous species P. aeruginosa makes frequent use of HGT to adapt to its environment, and has a particularly large accessory genome.

The resistance mechanisms described in the previous section may have several genetic basis. For instance, mechanisms inhibiting the antibiotic activity may be caused by the acquisition via HGT of an antibiotic-inactivating enzyme. Such enzyme may acquire SNPs and indels in its active site, which would increase its anity with the antibiotic [START_REF] Lambert | A spontaneous point mutation in the aac(6')-Ib' gene results in altered substrate specicity of aminoglycoside 6'-N -acetyltransferase of a Pseudomonas uorescens strain[END_REF] and thus increase the bacteria resistance level. Mechanisms modifying the antibiotic target may be caused by the acquisition of SNPs and indels in the target sequence often in a particular, polymorphic region of the gene for instance in the quinolone resistance determining region (QRDR) of the gyrA gene [START_REF] Hooper | Mechanisms of drug resistance: quinolone resistance[END_REF], or can be caused by the HGT acquisition of a gene coding for a protein providing the same function as the target, however presenting a dierent conformation not recognised by the antibiotic. For instance the mecA gene, acquired within a MGE cassette, replaces the methicillin target in S. aureus.

Genes coding for eux pumps may be acquired by HGT. SNPs and indels acquired in the genes or gene promoters involved in regulation may improve the eux pump activity by optimising their regulation network [START_REF] Lister | Antibacterial-resistant Pseudomonas aeruginosa: clinical impact and complex regulation of chromosomally encoded resistance mechanisms[END_REF].

Eux pumps, which are widely used by P. aeruginosa strains, actively reject the toxic compounds outside the cell, and can be eective against dierent families of antibiotics. Porins regulate the permeability of the cells and are not specic to one antibiotic family.

Porins and pumps are naturally present in P. aeruginosa which, in the presence of antibiotic, use complex networks to regulate or co-regulate their expression [START_REF] Lister | Antibacterial-resistant Pseudomonas aeruginosa: clinical impact and complex regulation of chromosomally encoded resistance mechanisms[END_REF]. Some aspects of the genetic basis of such complex mechanisms, which may involve regulatory systems of gene expression, or multiple factors including combination or interaction of several genes, remain unclear [START_REF] Holmes | Understanding the mechanisms and drivers of antimicrobial resistance[END_REF][START_REF] Lambert | Mechanisms of antibiotic resistance in Pseudomonas aeruginosa[END_REF]. The formation of biolms is another complex mechanism that is not yet fully understood [START_REF] Mah | Mechanisms of biolm resistance to antimicrobial agents[END_REF][START_REF] Qi | Relationship between antibiotic resistance, biolm formation, and biolm-specic resistance in Acinetobacter baumannii[END_REF].

INTRODUCTION

Towards a better understanding of resistance mechanisms and their genetic basis

Resistance mechanisms have been studied since the observation of the rst resistances in the 1940s. Websites such as card.mcmaster.ca [START_REF] Mcarthur | The comprehensive antibiotic resistance database[END_REF] or megares.meglab.org [START_REF] Lakin | MEGARes: an antimicrobial resistance database for high throughput sequencing[END_REF] try to gather all bacterial genome regions known or suspected to be involved in antibiotic resistance. However, a part of the phenotype variability remains unexplained. Moreover, the resistance mechanisms evolve and diversify, requiring the constant improvement of our knowledge. In this context, my thesis project aims at developing methods and tools to complete and improve the knowledge of the genetic determinants of antibiotic resistance. Beyond the thesis, the products of this work could be used to rene the database of a diagnostic system, in order to optimise the antibiotherapy of a patient [START_REF] Didelot | Transforming clinical microbiology with bacterial genome sequencing[END_REF][START_REF] Pallen | High-throughput sequencing and clinical microbiology: progress, opportunities and challenges[END_REF]. The challenge is, therefore, to identify the regions of the genome involved in the antibiotic resistance, annotate them, and quantify their impact on the phenotype. Association studies, linking a phenotype (the antimicrobial resistance) and a genotype (the information contained in the genomes) provide a suitable framework to achieve this genetic mapping. In 2006, Daniel Falush paved the way for these studies in bacteria before that they were mostly applied to eukaryotic organisms by enumerating major obstacles to rst overcome. Genome-wide association studies (GWAS) could revolutionise practices in microbiology if good solutions are found in particular to estimating correctly the bacterial population structures, and addressing most genomic variations, in particular those related to gene regulation. [START_REF] Falush | Genome-wide association mapping in bacteria[END_REF]. GWAS in bacteria really took o in 2012. Between 2012 and 2015, the majority of these studies [START_REF] Alam | Dissecting vancomycinintermediate resistance in Staphylococcus aureus using genome-wide association[END_REF][START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF][START_REF] Laabei | Predicting the virulence of MRSA from its genome sequence[END_REF][START_REF] Walker | Whole-genome sequencing for prediction of Mycobacterium tuberculosis drug susceptibility and resistance: a retrospective cohort study[END_REF] were based on approaches developed for eukaryotic organisms: rst, a search for SNPs relatively to a reference genome and then, an association model taking into account the structure of the population [START_REF] Purcell | PLINK: a tool set for whole-genome association and population-based linkage analyses[END_REF][START_REF] Thornton | ROADTRIPS: case-control association testing with partially or completely unknown population and pedigree structure[END_REF]. One study, however, proposed a phylogenetic convergence test dedicated to bacteria [START_REF] Farhat | Genomic analysis identies targets of convergent positive selection in drug-resistant Mycobacterium tuberculosis[END_REF], while another proposed to describe the genomic variation with k-mers (all the fragments of k nucleotides contained in the sequence of the genome) rather than with a reference genome [START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF]. From 2015, other studies have followed with the use of k-mers, either to predict the phenotype [START_REF] Drouin | Greedy biomarker discovery in the genome with applications to antimicrobial resistance[END_REF] or to discover new markers [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF]. At the beginning of my thesis in 2015, I contributed to a literature review on antimicrobial susceptibility testing, by providing a summary description of these bacterial association studies [START_REF] Dunne | Microbial genomics and antimicrobial susceptibility testing[END_REF].

High throughput sequencing: an opportunity for bacterial GWAS

The genotype of a bacterial strain is represented by the particular genetic variations in its genome, by comparison to a reference genome or to a population of genomes. The primary data for its computation are a full genome sequence obtained by sequencing. There are currently three major high throughput sequencing technologies: the optical detection, during DNA synthesis, of specic uorescent labels xed to the nucleotides (principle of the Illumina ® sequencers [START_REF] Bentley | Accurate whole human genome sequencing using reversible terminator chemistry[END_REF]), the detection of potential dierences specic to each nucleotide, which are related to the emission of hydrogen ions during the synthesis of DNA (principle of the Ion Torrentsequencers [START_REF] Rothberg | An integrated semiconductor device enabling non-optical genome sequencing[END_REF]), and the detection of the uctuations of a specic electrical current of the DNA sequence that passes through a nanopore (principle of the Oxford Nanopore sequencers [START_REF] Branton | The potential and challenges of nanopore sequencing[END_REF]). These technologies all produce a very large number of inferred sequences from DNA fragments, called reads. Read length and error rate vary greatly across technologies [START_REF] Quail | A tale of three next generation sequencing platforms: comparison of Ion Torrent, Pacic Biosciences and Illumina MiSeq sequencers[END_REF].

The genome sequence is obtained by assembling the reads into longer fragments, called contigs [START_REF] Birol | De novo transcriptome assembly with ABySS[END_REF][START_REF] Peng | IDBAa practical iterative de Bruijn graph de novo assembler[END_REF]. The contigs can possibly be reassembled until obtaining a single sequence describing a complete biological entity such as a chromosome or a plasmid [START_REF] Galardini | Contiguator: a bacterial genomes nishing tool for structural insights on draft genomes[END_REF][START_REF] Koren | One chromosome, one contig: complete microbial genomes from long-read sequencing and assembly[END_REF]. Finally, genome sequences can be annotated with the positions of functional domains, such as genes and regulatory regions [155,[START_REF] Seemann | Prokka: rapid prokaryotic genome annotation[END_REF]. Since its advent a dozen years ago, high throughput sequencing technologies have progressively imposed themselves in the microbiology eld [107,[START_REF] Loman | High-throughput bacterial genome sequencing: an embarrassment of choice, a world of opportunity[END_REF]. It is now possible to obtain the assembled and annotated genome of several microorganisms simultaneously in a relatively short time span and at low cost [START_REF] Didelot | Transforming clinical microbiology with bacterial genome sequencing[END_REF]. This technical progress made it possible to build panels of bacterial strains for which the whole genome sequence, and a collection of phenotypic measures are available. Early bacterial association studies included a couple of dozens of genomes at most (50 in 2012 [START_REF] Zankari | Genotyping using wholegenome sequencing is a realistic alternative to surveillance based on phenotypic antimicrobial susceptibility testing[END_REF], between 60 and 160 the following year [START_REF] Farhat | Genomic analysis identies targets of convergent positive selection in drug-resistant Mycobacterium tuberculosis[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF][START_REF] Stoesser | Predicting antimicrobial susceptibilities for Escherichia coli and Klebsiella pneumoniae isolates using whole genomic sequence data[END_REF]), then, from 2014, panels of several hundreds or even several thousands of strains were studied, especially for S. pneumoniae [START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF], M. tuberculosis [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Walker | Whole-genome sequencing for prediction of Mycobacterium tuberculosis drug susceptibility and resistance: a retrospective cohort study[END_REF] and S. aureus [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Gordon | Prediction of Staphylococcus aureus antimicrobial resistance by whole-genome sequencing[END_REF].

Methodological framework of genotype to phenotype studies

Although genotype to phenotype association studies are recent in prokaryotes, they have a long history in eukaryotes and especially in human genetics [START_REF] Bush | Genome-wide association studies[END_REF]. Our work is based on these developments and aims at making them more suitable for prokaryotic studies. We have restricted our scope to association models based on regressions [START_REF] Stanton | Galton, Pearson, and the peas: a brief history of linear regression for statistics instructors[END_REF]. Regressions allow to model the relationship between variables, here between a phenotype and genetic variation. This model is estimated from n observations. Let us consider for instance a linear relationship between the phenotype y i and the p genetic variants represented in X i , for bacterial strain i:

y i = β X i + ε i , i = 1, . . . , n,
(1) with ε i iid ∼ N (0, σ 2 ), σ 2 > 0, the random error and β the eects of the genetic variants on the phenotype. The objective is to provide estimates β of the coecients β minimising the error ε i = y i -β X i . A common approach is to minimise the sum of squared errors over the n observed samples. The regression can then be written as a minimisation problem:

min β ||y -Xβ|| 2 = min β n i=1 L(y i , f(X i )) (2)
where L(y i , f(X i )) is a loss function, and in the particular case of the linear regression, f (X i ) = β X i . An analytical solution of the linear problem is given by the normal equation:

β = (X X) -1 X y.
(3) Regression models can, with the same input data, meet two objectives: prediction of a phenotype value, or statistical inference aiming at discovering markers and estimating their eect. In the rst case, the objective is to optimise the generalisation performance of the phenotype prediction, i.e. to predict on other datasets than the one used to build the model. In this case, the interpretation of the variables used for the model and their coecients, is secondary.

Y n X p H 0 8μg/mL 4μg/mL
notypes such as the virulence. Indeed, its denition is standardised and there are reference methods for its quantitative measurement. Moreover we can expect strong phenotypegenotype associations for the genuine resistance variants with a straight causality, e.g. mutations acquired in gyrA QRDR [START_REF] Hooper | Mechanisms of drug resistance: quinolone resistance[END_REF] or the acquisition of mecA gene [START_REF] Lowy | Antimicrobial resistance: the example of Staphylococcus aureus[END_REF]. The phenotype, when given as a MIC, can be represented by its membership to an ordered category of concentrations (cf. Supplementary Figure S1.5). It can also be expressed by a transformed value of the MIC: its logarithm [START_REF] Eyre | WGS to predict antibiotic mics for Neisseria gonorrhoeae[END_REF] or a binary value computed from the CLSI or EUCAST thresholds. The previously cited bacterial GWAS studying the antibiotic resistance all used a binary phenotype (susceptible versus resistant or susceptible versus non-susceptible). Depending on the antibiotic and on the studied species, the measures made with a given method are not always reproducible [START_REF] Fuchs | Susceptibility testing quality control studies with fosfomycin tromethamine[END_REF] and can vary between methods [START_REF] Amsler | Comparison of broth microdilution, agar dilution, and Etest for susceptibility testing of doripenem against Gram-negative and Gram-positive pathogens[END_REF][START_REF] Hindler | Colistin MIC variability by method for contemporary clinical isolates of multidrug resistant Gram-negative bacilli[END_REF]. A raw MIC is richer to exploit: variations in the phenotypic trait within a population of susceptible (resp. resistant) strains can be identied, however the use of a simplied phenotype ( e.g. a binary status: susceptible versus non-susceptible) is widespread as this is the tractable information for the clinicians. The measure chosen for the phenotype then drives the choice of the association model: an ordinal model will be adapted to ordered categorical data [START_REF] Mccullagh | Regression models for ordinal data[END_REF], a linear model will be used for continuous numerical data [START_REF] Stanton | Galton, Pearson, and the peas: a brief history of linear regression for statistics instructors[END_REF], a logistic model for binary data [START_REF] Cox | The regression analysis of binary sequences[END_REF]. In the following manuscript, dierent ways to measure and model the phenotype were tested and discussed in Chapters 1 and 2.

Measuring the genotype

Most human GWAS use values in {0; 1; 2} to encode the SNPs on the two alleles present in each diploid individual: 0 encodes homozygous alleles carrying the major allele seen in the population, 1 encodes heterozygous alleles, and 2 encodes homozygous alleles with the minor allele [START_REF] Bush | Genome-wide association studies[END_REF][START_REF] Homan | Correcting for population structure and kinship using the linear mixed model: theory and extensions[END_REF]. The transposition of this encoding is not straightforward as bacterial genomes are haploid (presence of only one allele per individual). Moreover, at the level of the complete bacterial population, more than two alleles can be observed for a given SNP. Encoding can in this case be done using several binary variables, describing each allele. More generally beyond a particular genotype description such as SNPs the genotype can be measured with a binary value (presence or absence of the genotype in the strain), or with a count value (number of observations within each individual). Counts can indeed provide a valuable information on the number of copies of genetic elements, such as plasmids or repeated genes. While the read depth coverage can provide a good basis for the estimation of the sequence copy numbers [START_REF] Meyerson | Advances in understanding cancer genomes through second-generation sequencing[END_REF][START_REF] Yoon | Sensitive and accurate detection of copy number variants using read depth of coverage[END_REF], the assembled sequences only provide a partial information, as a part of the repetitions are suppressed in the de novo assembly process [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF]. All previously cited bacterial GWAS use binary values to measure the genotype. The best way to measure the genotype was not explicitly addressed in this thesis, however the study presented in Chapter 1 used a count value computed from sequence assemblies while the method presented in Chapters 2 and 3 used binary vectors of genotype presence/absence.

Description of the genotype by genetic variants

In the human GWAS literature, genetic variations are described at the the SNP level [1, [START_REF] Bush | Genome-wide association studies[END_REF][START_REF]The international HapMap project[END_REF]. The International Haplotype Map (HapMap) project [START_REF]The international HapMap project[END_REF] reduced the number of SNPs to investigate by proposing tag SNPs, which are markers of specic combinations of SNPs always found together in blocks: the haplotypes.

INTRODUCTION

SNP-level studies are not appropriate for bacterial GWAS. Indeed, a large part of the bacterial genomic variability lies in HGT [START_REF] Kung | The accessory genome of Pseudomonas aeruginosa[END_REF], and as a consequence genomes belonging to a given species do not all share the same composition in terms of genes and intergenic regions. A description based only on SNPs cannot describe the diversity of this accessory genome [START_REF] Read | Characterizing the genetic basis of bacterial phenotypes using genome-wide association studies: a new direction for bacteriology[END_REF]. A majority of the rst bacterial GWAS used methods imported from human GWAS [START_REF] Purcell | PLINK: a tool set for whole-genome association and population-based linkage analyses[END_REF]. These methods call local polymorphisms against a reference genome. As the use of a reference genome reaches limits to describe the variability of the accessory genome, some studies proposed to test the presence/absence of genes in addition to the SNPs, or to test the presence/absence of k-mers [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF]. K-mers oer the required exibility. Indeed any k-mer, i.e. any sub-sequence of k nucleotides, observed in the genomes can be used to represent the genotypes in the GWAS: each genome is described by a binary (or count) vector indicating whether it contains each k-mer. All these sequence descriptors can carry information for instance on SNPs and indels, on genes which are dierentially present in the population, or on rearrangements. However, they present several drawbacks such as their high number, high correlation, high level of redundancy (by construction using a sliding window of step 1, a k-mer overlaps at least two other k-mers with an overlap length of k -1 nt), and contrary to SNP and gene-based analysis, they do not oer a straightforward interpretation. In particular, it is not specied on which gene they were found, or if they represent a SNP or another type of variation. The description of the genotype was a central question in this thesis, and in the works presented in Chapters 2 and 3, we chose to use k-mers for their exibility. However, we searched how to take advantage of the overlaps to help in their interpretation. Indeed, we wanted to keep track of the order in which the k-mers were seen in the sequences, by drawing an edge from each k-mer to the following one. This representation of overlaps between strings was already described as De Bruijn graphs (DBG) [START_REF] De Bruijn | A combinatorial problem[END_REF]. Even though the order of the k-mers is not totally conserved in a DBG repeated k-mers are collapsed into a single node and generate loops [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF], we chose to use the DBG framework to build the list of variants used in the GWAS. In De Bruijn's early description, the graph includes all possible strings of length k. The number of nodes in the graph is constant for a given alphabet of size N and length k, and equals N k . For instance, enumerating all 25-mers with an alphabet containing 4 nucleotides A = {A, C, G, T } would result to 4 25 nodes. In 2001, Pevzner introduced the application of DBGs in bioinformatics and adapted the original graph description by retaining only the k-mers observed in the input nucleotide sequences. This results to a number of nodes in the graph always lower than the sum of all input sequences' length. The rst application in bioinformatics was for de novo assembly of reads (EULER [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF], Velvet [START_REF] Zerbino | Velvet: algorithms for de novo short read assembly using de Bruijn graphs[END_REF], ABySS [START_REF] Birol | De novo transcriptome assembly with ABySS[END_REF], IDBA [START_REF] Peng | IDBAa practical iterative de Bruijn graph de novo assembler[END_REF]). From 2010, DBGs have been used for variant detection as well (e.g. KisSNP [START_REF] Peterlongo | Identifying SNPs without a reference genome by comparing raw reads[END_REF], KisSplice [START_REF] Sacomoto | KISSPLICE: de novo calling alternative splicing events from RNA-seq data[END_REF], Cortex [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF], DiscoSNP++ [START_REF] Uricaru | Reference-free detection of isolated SNPs[END_REF]). More formally a DBG is a graph representing all the k-mers observed in the input sequences as nodes, and all possible (k -1)-overlaps between the k-mers as edges: an edge is drawn from a k-mer to another if the (k -1)-sux of the k-mer equals the (k -1)prex of the other. DBGs can be compacted by rst using a unique node to store a k-mer sequence and its reverse complement, and second by merging linear paths (path of nodes of in-degree and out-degree 1) [START_REF] Sacomoto | KISSPLICE: de novo calling alternative splicing events from RNA-seq data[END_REF]. Cortex, KisSplice, and DiscoSNP++ methods, allowing for reference-free variant calling, are based on the enumeration of bubbles in a compacted DBG (cDBG). Let a and b be sequences of more than k nucleotides and σ and σ sequences not sharing any k-mer. Any pair of patterns aσb and aσ b represents a variation (σ versus σ ), and generates a bubble in the DBG, where a and b are switching nodes and σ and σ are the two paths of the bubble.

CCTTCG

TCGCTAG TCGATAG TAGTA k=4 ' a b aσb aσ b a b k σ σ k = 4 σ σ 2k -1 p n X p p j y i = β j X i,j + W i α + ε i,j , i = 1, . . . , n, j = 1, . . . , p, ε i,j ∼ N (0, σ 2 ) σ 2 > 0 W ∈ R l α ∈ R l H 0 p INTRODUCTION (BH)
procedure allows to control the false discovery rate (FDR) [START_REF] Benjamini | Controlling the false discovery rate: a practical and powerful approach to multiple testing[END_REF]. These methods assume that the multiple tests are independent, which is not the case in practice because of the correlation between the tested genetic variants. To the best of my knowledge, there is currently no better alternative for positive dependency. In case of negative dependency, Benjamini-Yekutieli retains a control of the FDR while BH does not [START_REF] Benjamini | The control of the false discovery rate in multiple testing under dependency[END_REF].

Multiple univariate test tends to produce small eect sizes because the phenotype variability is usually not explained by a single genetic variant. Moreover they can lead to more false positives because any variant correlated to a causal variant may show an association when tested alone [START_REF] Buzdugan | Assessing statistical signicance in multivariable genome wide association analysis[END_REF].

A way to adapt joint regression to high dimension is to use a penalised regression [START_REF] Wu | Genome-wide association analysis by lasso penalized logistic regression[END_REF].

Penalised regressions are models regulating the model coecients and allowing to control min

f n i=1 L(y i , f(x i )) + λΩ(f ), (5)
where L(y, f (x)) is the loss function and λΩ(f ) the penalty. Ω measures the complexity of the model and λ is a tuning parameter for this regularisation. A low penalty can lead to a complex model which is too specic of the training data (overtting), while a high penalty would lead to a simple model oering a higher generalisation to other data, but would lose in adjustment. A common way to regulate this trade-o is to penalise the l1-norm of the coecients [START_REF] Tibshirani | Regression shrinkage and selection via the lasso[END_REF]. This penalty, called lasso, shrinks the coecients and provide sparse models as it leads to estimators in which many coecients are exactly 0.

The ridge penalty, penalising the l2-norm of the coecients [START_REF] Hoerl | Ridge regression: biased estimation for nonorthogonal problems[END_REF], shrinks the coecients and provide close coecient estimates to variables which are close in Euclidean norm.

A ridge penalty applied to a linear model can we written as the following minimisation problem:

min β ||y -Xβ|| 2 + λ||β|| 2 2 , (6)
for which a closed-form solution exists:

β = (X X + λI) -1 X y. ( 7
)
Beyond these two standard penalties, the construction of dedicated penalties, adapted to particularities of the data, such as the correlation between variants (see next section), opens a large eld of applications. However, such methods often require a prior knowledge on the data and the non-trivial tuning of the regulation hyperparameter. Moreover there is no general solution to quantify the signicance of the association, as the null distribution of the estimated coecients is unknown. Moreover as the penalty reduces the variance of the estimators by introducing a bias, the estimated coecients are biased [START_REF] Goeman | l1 penalized estimation in the Cox proportional hazards model[END_REF]. Inference with penalised methods is an active research eld [START_REF] Cule | Signicance testing in ridge regression for genetic data[END_REF][START_REF] Lockhart | A signicance test for the lasso[END_REF].

Combined strategies have been proposed, such as a two-step procedure which rst select a set of variants using a sparse regression such as the lasso, and then infer p-values on the subset. This is referred as post-selection inference: the data used for the inference is also used for selection, and the resulting statistics are over-optimistic if this issue is not properly taken into account [START_REF] Berk | Valid post-selection inference[END_REF][START_REF] Blanchard | Post hoc inference via joint family-wise error rate control[END_REF]. Methods based on multiple sample splitting allow for the calculation of statistical signicance in a joint model, aggregated across multiple splits [START_REF] Buzdugan | Assessing statistical signicance in multivariable genome wide association analysis[END_REF][START_REF] Meinshausen | P-values for high-dimensional regression[END_REF]. Mixed models have been described to oer a possibility of inference with joint analysis of variants, even though each variant is tested individually. In these models, the tested variant is included in the model as a xed eect variable, while all variants are represented by random eects [START_REF] Yu | A unied mixed-model method for association mapping that accounts for multiple levels of relatedness[END_REF][START_REF] Zhou | Genome-wide ecient mixed-model analysis for association studies[END_REF]. These models are detailed in the section Correlation between individuals: they indeed also allow to adjust for population structure as they integrate all variants in the model.

Correlation between variants (linkage disequilibrium)

Linkage disequilibrium (LD) refers to the correlation between variants across genomes in a population. The squared Pearson coecient of correlation is a common measure of the LD between two variants, which integrates the notion of disequilibrium D, dened as the deviation of the observed haplotype frequency from the frequency expected under equilibrium [START_REF] Slatkin | Linkage disequilibriumunderstanding the evolutionary past and mapping the medical future[END_REF].

In human genomes, the LD is structured in blocks along the genome. These blocks are a consequence of the recombination between pairs of chromosomes during the meiosis.

Thereby, the notion of LD is closely related to the proximity between variants.

Several penalties have been specically proposed to take into account this LD in penalised regressions [START_REF] Dehman | Performance of a blockwise approach in variable selection using linkage disequilibrium information[END_REF][START_REF] Liu | Accounting for linkage disequilibrium in genome-wide association studies: a penalized regression method[END_REF]. The general idea of these methods is to assign close coecients to close variants and/or to select groups of close correlated variants. It was also proposed to use hierarchical inference, which clusters close SNPs with a high LD measure, to assess the statistical signicance of groups of close SNPs [START_REF] Buzdugan | Assessing statistical signicance in multivariable genome wide association analysis[END_REF].

However in bacterial genomes not subject to systematic recombination, the correlation between variants is not structured in the same way. The correlation between variants observed in bacterial genomes is strongly related to the population structure: variants are transmitted together to individuals, and spread together in the population. As a consequence, the LD is not conned to close variants: distant variants in the genome can be very correlated [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF]. Penalties assuming a proximity along the genome sequence become irrelevant. Penalties selecting correlated groups without any constraint on the position could be interesting in this context [START_REF] Zou | Regularization and variable selection via the elastic net[END_REF], but have not been addressed in this thesis. Because LD and population structure are strongly related, adjusting for population structure allows to take into account a part of the correlations between the variants [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF].

Correlation between individuals (population structure)

From the human GWAS literature we know that taking into account a possible genetic structure within the population is essential to avoid confounding associations [START_REF] Devlin | Genomic control for association studies[END_REF][START_REF] Pritchard | Association mapping in structured populations[END_REF][START_REF] Setakis | Logistic regression protects against population structure in genetic association studies[END_REF][START_REF] Widmer | Further improvements to linear mixed models for genome-wide association studies[END_REF][START_REF] Zhou | Ecient multivariate linear mixed-model algorithms for genome-wide association studies[END_REF]. This is even more important for bacterial GWAS: because of their clonal reproduction, bacterial genomes are strongly correlated by clades, which increases the risk of identifying false associations [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Falush | Genome-wide association mapping in bacteria[END_REF][START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF]. Spurious associations happen when there is a population eect on the observed phenotype: some clades are enriched or depleted in resistant strains. For instance, if a mutation (A) causing resistance was acquired by the ancestor of a clade and transmitted to its descendants, the clade is enriched in resistant individuals. Any other mutation (B), not related to the resistance, which is acquired and transmitted within the descendants of this clade may be assigned a higher eect than other causal mutations (C) involving for instance fewer individuals (Figure 4).

Many methods have been developed to account for the population structure in human GWAS [START_REF] Devlin | Genomic control for association studies[END_REF][START_REF] Pritchard | Association mapping in structured populations[END_REF][START_REF] Setakis | Logistic regression protects against population structure in genetic association studies[END_REF]. From 2006, two families of methods have been widely used: the rst uses the principal components (PC) of the variant matrix, for variable adjustment, or as xed-eect covariates in the model [START_REF] Price | Principal components analysis corrects for stratication in genome-wide association studies[END_REF]. The second uses mixed models, in which the population structure is treated as a random eect: u i ∼ N (0, σ 2 a K), where K is a

j i y i = β j X i,j + u i + ε i,j , i = 1, . . . , n, j = 1, . . . , p, X = U ΛV X U n Λ V q U W = U q α K K = XX X K = XX K = W W W = U Λ u ∼ N (0, σ 2 a K) W α α ∼ N (0, σ 2 a ) σ 2 a β = 0 H 0 y i = W i α + ε i , i = 1, . . . , n, W = U Λ α ∼ N (0, σ 2 a ) ε ∼ N (0, σ 2 ) λ = σ 2 σ 2 a min α ||y -W α|| 2 + λ||α|| 2 2 , λ = σ 2 σ 2 a ( 10
)
This formulation describes explicitly the shrinkage of the estimates, and the variance in the population structure denes the strength of the shrinkage.

Earle et. al pointed out that correcting for the population structure may mask causal population-stratied variants. To address this issue, their method, bugwas, in addition to testing regular variant eects with an LMM, also tests the lineage eects, where the lineages are approximated by the PCs. To do so, they use the random model dened in Eqs.9 and 10 and use the ridge closed-form solution provided in Eq. 7 to compute the mean and variance of α, which represent the eects of the PCs on the phenotype [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF].

The variant matrix which is used to represent the population structure is not always the full genotype matrix X. In their k-mer-based approach, Earle et. al do not use the matrix of presence/absence of the k-mers which are tested for association with the phenotype, but instead use a restricted matrix of biallelic SNPs, while Lees et. al use a random subsample of their k-mer matrix in the SEER approach [START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF]. We did not investigate the impact of estimating the population structure using the accessory genome information in addition to core variations, however a previous analysis showed encouraging results for the use of k-mers in population genomics [START_REF] Tasoulis | Random projection based clustering for population genomics[END_REF].

In Chapter 1 of this thesis, we present a study adding the PCs of a matrix of core SNPs as covariates with a xed eect. In Chapter 2, we evaluate xed and mixed eect models with simulated and real data. In this case we used X = U ΛV , where X is the full genotype matrix.

Outline of the Chapters

Chapter 1 presents a study of P. aeruginosa resistance published in the International journal of antimicrobial agents, which focuses on the determinants described in antibiotic resistance-dedicated websites. The resistome of Pseudomonas aeruginosa

Preamble

The work presented in this Chapter was started by other colleagues before my PhD. Jean-Baptiste Veyrieras designed the study, and in particular the association testing strategy presented in the following manuscript, using an ordinal regression to model the phenotype measured by the antibiotic minimum inhibitory concentration (MIC), and integrating the population structure and the eect of the genuine determinants.

The variants tested in this study were antibiotic resistance (AR) gene presence and polymorphism. These AR genes were gathered from the P. aeruginosa literature and from dedicated databases [START_REF] Jaillard | A comprehensive microbial knowledge base to support the development of in vitro diagnostic solutions in infectious diseases[END_REF][START_REF] Mcarthur | The comprehensive antibiotic resistance database[END_REF]. This collection of P. aeruginosa AR genes represents the species' resistome, and denes the scope of the study. The resistome-wide association study (RWAS) described below allows to nely estimate the eect of the variations in the resistome for several antibiotics. We extended the study with a descriptive analysis of the resistome, highlighting the important part of the accessory genome in the antibiotic resitance in P. aeruginosa species, and with an analysis of the diversity of the integrons found in the panel. Indeed, integrons are key genetic elements regarding the adaptability of bacteria to their environment. They allow the capture and dissemination of new genes, thanks to a specic recombinase gene, the integrase, found at the extremity of the integron cassette structure [START_REF] Mazel | Integrons: agents of bacterial evolution[END_REF] and play an important role in the acquisition of accessory resistance genes.

Introduction

Pseudomonas aeruginosa easily integrates exogenous DNA and, under selective antibiotic pressure, eciently manifests resistance traits [START_REF] Lister | Antibacterial-resistant Pseudomonas aeruginosa: clinical impact and complex regulation of chromosomally encoded resistance mechanisms[END_REF]. The emergence of resistance most likely occurs in isolates with enhanced virulence, during infection and treatment, allowing P. aeruginosa to evolve resistance to antibiotic-mediated killing [START_REF] Cho | Correlation between virulence genotype and uoroquinolone resistance in carbapenem-resistant Pseudomonas aeruginosa[END_REF]. Despite signicant genetic variability within the species, antibiotic-resistant clones that spread globally have been identied [START_REF] Wiehlmann | Population structure of Pseudomonas aeruginosa[END_REF]. Among them, multidrug-resistant (MDR) and extensively drugresistant (XDR) clones are common, a phenotype that often relates to integron expansion. These pandemic clones include the highly prevalent sequence types ST235, ST111, ST348 and ST175 [START_REF] Cabot | Genetic markers of widespread extensively drug-resistant (XDR) Pseudomonas aeruginosa high-risk clones[END_REF]. Progress is needed in the eld of antibiotic resistance (AR) and antibiotic susceptibility testing [START_REF] Van Belkum | Next generation antimicrobial susceptibility testing[END_REF]. Genome sequencing of P. aeruginosa has identied molecular markers for resistance to amikacin, meropenem and levooxacin [START_REF] Kos | The resistome of Pseudomonas aeruginosa in relationship to phenotypic susceptibility[END_REF]. In addition, the International Pseudomonas aeruginosa Consortium has published a resistome recognising 73 AR genes in 389 isolates and highlighting the importance of the accessory genome [START_REF] Freschi | Clinical utilization of genomics data produced by the international Pseudomonas aeruginosa consortium[END_REF]. CRISP-Cas-mediated immunity does not appear to be directly blocking acquisition of resistance elements [200]. Hence, additional phenotypegenotype association studies for P. aeruginosa are needed. In other pathogens, studies have suggested that genomic antibiograms can be as good as phenotypic ones. The rst study involving mixed bacterial species documented 99.7% concordance between genotypes and phenotypes [START_REF] Zankari | Genotyping using wholegenome sequencing is a realistic alternative to surveillance based on phenotypic antimicrobial susceptibility testing[END_REF]. Work focusing on Staphylococcus aureus, Escherichia coli, Klebsiella pneumoniae and Campylobacter spp. has expanded these ndings [START_REF] Gordon | Prediction of Staphylococcus aureus antimicrobial resistance by whole-genome sequencing[END_REF][START_REF] Stoesser | Predicting antimicrobial susceptibilities for Escherichia coli and Klebsiella pneumoniae isolates using whole genomic sequence data[END_REF][START_REF] Zhao | Whole genome sequencing analysis accurately predicts antimicrobial resistance phenotypes in Campylobacter[END_REF]. Optimum concordance was observed for clonal bacterial species such as Mycobacterium tuberculosis [START_REF] Walker | Whole-genome sequencing for prediction of Mycobacterium tuberculosis drug susceptibility and resistance: a retrospective cohort study[END_REF]. A recent resistome analysis of P. aeruginosa correlated meropenem resistance with outer membrane protein OprD polymorphism [START_REF] Pirnay | Pseudomonas aeruginosa population structure revisited[END_REF].

Genomic approaches hold promise for the development of future antibiotic susceptibility testing systems for routine use in clinical microbiology laboratories, although ma jor knowledge gaps still need to be lled.

Here we present a resistome characterisation, integron dynamics and resistome-wide association study (RWAS) for 672 P. aeruginosa strains with complete genomes and minimum inhibitory concentration (MIC) values for various anti-P. aeruginosa antibiotics.

Materials and methods

Description of the strain panel

Resistome

The resistome of the 672 P. aeruginosa isolates was obtained by annotating each genome assembly using an in-house, pan-bacterial AR sequence database. This database contains 2545 relevant, nonredundant reference sequences categorised into 569 AR genes. The database contained at least one sequence for each previously reported AR gene, including genes involved in susceptibility and/or resistance in P. aeruginosa [START_REF] Lister | Antibacterial-resistant Pseudomonas aeruginosa: clinical impact and complex regulation of chromosomally encoded resistance mechanisms[END_REF]. Each genome was thus run through the database via BLASTn v.2.2.28+ for AR genes with at least 80% identity and 80% coverage. Overlapping alignments belonging to the same AR gene were clustered into a single hit if the overlap covered > 10% of the aligned reference sequences.

Only the best hit, dened as the alignment with the highest percentage identity times the reference sequence coverage, was kept to infer the haplotype state of the gene. Note that for a given isolate and for a given AR gene, several distinct annotations can be reported when hits appeared at distinct genomic locations (e.g. duplicated genes). However, precise plasmid copy number denition was impossible using this approach.

Resistome genotyping

The 672 isolates were genotyped for allele counts both at the `locus' and `variant' levels.

By allele counts at the locus level, the number of copies of a given AR gene (e.g. bla T EM , mexX, etc.) was measured irrespective of the number of alleles of the gene. Regarding the allele counts at the variant level, all of the detected sequences of a given AR gene were aligned using MAFFT v.6.861 with high-precision mode [START_REF] Katoh | MAFFT: a novel method for rapid multiple sequence alignment based on fast Fourier transform[END_REF] in order to identify both single nucleotide polymorphisms (SNPs) including tri-and quadri-allelic sites and indels. Finally, for a given isolate, the number of occurrences of each SNP and indel alleles was counted and this was used as the corresponding allele count at the variant level (see Supplementary Table S1.1). Overview of the phenotypic, genomic and resistome data of 672 Pseudomonas aeruginosa isolates included in the present analysis. The phylogenetic tree is inferred from core gene content and depicts the three major groups of P. aeruginosa in shades of purple. Depicted below the tree in dark green bars are the isolates that were found to be resistant to one or more of the nine antibiotics analysed in this study. Below, strains with draft genomes larger or smaller than the median are depicted as black or grey bars, respectively. The left panel provides the names of genes and non-synonymous mutations constituting the resistome for the nine antibiotics. Dierent antibiotic resistance mechanisms are colour coded (bar at the right of the determinant list). The right panel reviews resistance gene content on a per isolate basis, with grey shading denoting the presence of a given resistance gene or allele. The percentage of strains harbouring given resistance genes or alleles is shown on the far right, allowing for easy discrimination of core and accessory elements. The resistome structure illustrates that antibiotic inactivation genes are more likely to belong to the accessory resistome than eux genes. Note that resistance genes embedded in integrons are colour coded as dark red bars. Additional columns with global information (e.g. plasmid content, percentage GC, etc.) can be added if needed.

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • AAC(3)-Ia AAC(3)-IIIa AAC(6')-Iai AAC(6')-

Integron analyses

Integrase genes were detected by aligning (tBLASTn) the assembled genome sequences with the protein sequences of three integrases (IntI1, IntI2 and IntI3) as derived from a targeted UniProt search (sequences are provided in Supplementary File S1). Contrary to Intl1, for which we were able to retrieve 36 sequences, only 3 sequences were found for IntI3 and 1 sequence for IntI2. A 70% identity and 70% protein coverage cut-o was applied for the alignments. Then, recognisable and annotated AR genes upstream of the integrase start codon were searched for and the physical distance between the start codon and the 5 end of the resistance element was reported. All AR elements within a 10 kb window were included.

Resistome-wide association study (RWAS)

First, the strength of association between established genotypes linked to increases or decreases in the MIC (generally beyond the resistance breakpoint) was assessed. Second, novel candidate genotypes associated with additional variability in MIC values were looked for, taking the eect of known genotypes into account. Fig. 1.1 provides a literaturesupported overview of the causal genes or variants thereof known to increase/decrease the MIC for each antibiotic in the association study.

Population structure

Results may be inated by the presence of cryptic correlations between population structure and the MIC status of the strains. This could be due to population-wide linkage disequilibrium (LD) between causal mutations and genetic structure, or to a sampling bias leading to over-representation of related strains. Confounding eects related to population structure were restrained by computing the principal components (PCs) from the coreSNP genotype matrix and using them as covariates in the statistical association framework. To avoid extensive correlations that could mask the eect of a core gene on resistance, genotypes associated with polymorphisms in, for example, gyrA, gyrB, parC, parE, folP etc., were removed [START_REF] Popescu | A novel and fast approach for population structure inference using kernel-PCA and optimization (PSIKO)[END_REF].

Associative modelling

Ordinal regression was used to develop the core statistical RWAS framework [START_REF] Mccullagh | Regression models for ordinal data[END_REF]. This provides the benet of adequately accounting for the ordinal nature of the MIC values and facilitating inclusion of covariates. For each antibiotic, the PC was dened to include as covariates for population structure control, using a forward selection procedure [START_REF] Hocking | The analysis and selection of variables in linear regression[END_REF]. This allows to build Z, the n × k matrix of PCs, where n is the number of isolates and k is the number of retained PCs. For each antibiotic, an optimal set of unequivocal genotypes was selected using a backward elimination procedure based on the Akaike information criterion (AIC) [START_REF] Akaike | Information theory and an extension of the maximum likelihood principle[END_REF][START_REF] Hocking | The analysis and selection of variables in linear regression[END_REF]. An optimal although conservative subset of genuine genotypes associated with MIC variability was selected, while preserving statistical power for detecting new associations. This step led to a matrix

logit[P (Y i j)] = log[ P (Y i j) 1 -P (Y i j) ] = θ j -(Zα + Uβ + xγ) (1.1)
where θ j stands for the MIC category intercepts, α is the vector of k regression parameters for the PC scores capturing the population structure, β is the vector of p regression parameters for the known causal genotypes, and γ is the regression parameter for the candidate genotype x.

To compute the P -value of the association between candidate genotypes and the MIC variability, a standard likelihood-ratio test was used [START_REF] Wilks | The large-sample distribution of the likelihood ratio for testing composite hypotheses[END_REF]. This test compares the loglikelihood of the model under the null hypothesis ( H0: the genotype has no eect on MIC variability; γ = 0) versus the alternative hypothesis ( H1: the genotype has an effect on MIC variability; γ = 0). If we denote L0(θ, α, β, Y ) and L1(θ, α, β, γ, Y ) the log-likelihoods under each hypothesis, we can derive the likelihood-ratio test formula:

-2 × [L1 -L0] ∼ χ 2 and compute the association P -value for each individual genotype.

Signicant associations were reported by controlling the false discovery rate for each antibiotic at 5% using the BenjaminiHochberg procedure [START_REF] Benjamini | Controlling the false discovery rate: a practical and powerful approach to multiple testing[END_REF]. The R package ordinal (R Development Core Team) was used to implement the cumulative logit regression framework.

Results

Resistome analysis

Nine antibiotics belonging to six drug families were studied: aminoglycosides (amikacin);

β-lactams (meropenem, cefepime and piperacillin); quinolones (levooxacin); polypeptides (colistin and polymyxin B); fosfomycins (fosfomycin); and phenicols (chloramphenicol). Resistome analysis identied 147 loci previously believed or shown to cause resistance (see Fig. 1.1 for a complete data review). Whilst most of these were associated with acquired or accessory genomic elements, 45% are intrinsic and reside within the conserved core P. aeruginosa genome (Fig. 1.1, right panel). The 147 AR elements cover ve mechanisms that neutralise antibiotic action, involving both intrinsic and acquired resistance traits. Resistance related to drug eux and porins was conrmed to be mainly intrinsic, whereas resistance related to antibiotic inactivation was acquired (Fig. 1.1). Note that signicant numbers of major pandemic clones ST235 ( n = 67), ST111 (n = 58) and ST175

(n = 11) were included [200].

Integron analyses

Integrase sequence hits were found in one-third of all isolates ( n = 229) and an AR gene was identied upstream of two-thirds of these ( n = 163). Only class 1 integrons were detected, which carry a variety of resistance genes, particularly targeting phenicol, aminoglycoside or β-lactam antibiotics [START_REF] Lister | Antibacterial-resistant Pseudomonas aeruginosa: clinical impact and complex regulation of chromosomally encoded resistance mechanisms[END_REF]. Thirty-seven dierent resistance genes were found co-localised with the integrase. bla OXA and sul1 were found to be the most frequent AR genes. Of the 163 integrons carrying AR genes, only 17 did not carry sul1

genes. They encode aminoglycoside-modifying enzymes including adenylyl transferases (ANT) and acetyl transferases (AAC) [START_REF] Gillings | Integrons: past, present, and future[END_REF][START_REF] Lister | Antibacterial-resistant Pseudomonas aeruginosa: clinical impact and complex regulation of chromosomally encoded resistance mechanisms[END_REF].

A Z P A E 1 2 4 2 1 V T K 1 1 1 0 6 1 V T K 1 0 7 7 6 6 V T K 1 1 5 5 1 0 V T K 1 1 1 0 5 9 A Z P A E 1 2 4 1 0 A Z P A E 1 4 8 9 1 A Z P A E 1 4 9 1 0 A Z P A E 1 4 8 7 3 A Z P A E 1 4 8 1 8 A Z P A E 1 3 8 7 2 A Z P A E 1 4 6 8 7 V T K 1 0 7 7 3 2 A Z P A E 1 5 0 5 6 V T K 1 0 6 7 0 5 V T K 1 0 4 4 1 5 A Z PA E 14 97 4
V T K 11 Seventy-two dierent AR gene combinations were identied within the integrons. The most prevalent combination occurred 27 times and was identied as the In51 integron [START_REF] Gillings | Integrons: past, present, and future[END_REF], containing, ordered upstream of the integrase, aadA6, orfD, qacEΔ1 and sul1 genes. Three isolates carried a truncated form of In51 with either a deletion within the antiseptic resistance gene qacEΔ1 or complete deletion of the orfD gene (Fig. 1.2B). The fact that certain AR gene combinations were found more than three times (Fig. 1.2C) and were variably distributed along the phylogenetic tree highlighted the great diversity of integron cassettes (Fig. 1.2C,D). Integrons specic to small clades could be identied, such as those carrying AR cassettes #2, #3, #14 or #15, as well as integrons that spread along all phylogroups [cassettes #1 (In51), #4 or #7] (see Fig. 1.2C). Obviously, such analyses identify physically-associated resistance traits and generate evidence of horizontal transfer.

A Z P A E 1 2 4 2 3 V T K 1 1 1 1 0 0 A Z P A E 1 4 9 3 7 A Z P A E 1 4 9 5 1 V T K 1 1 1 1 1 9 A Z P A E 1 4 8 6 2 A Z P A E 1 4 9 4 7 A Z P A E 1 4 9 1 3 A Z P A E 1 4 9 2 5 A Z P A E 1 5 0 5 2 A Z P A E 1 4 6 9 8 A Z P A E 1 5 0 2 8 V T K 1 1 1 1 1 5 A Z P A E 1 5 0 5 5 V T K 1 0 4 4 1 7 A Z P A E 1 4 8 3 2 V T K 1 1 1 0 6 8 V T K 1 0 7 7 5 2 V T K 1 1 5 5 3 0 V T K 1 1 5 5 2 5 V T K
A Z P A E 1 2 1 4 0 V T K 1 0 6 1 8 0 A Z P A E 1 2 4 1 5 A Z P A E 1 2 4 1 3 A Z P A E 1 2 4 1 4 V T K 1 0 7 7 3 3 V T K 1 1 5 4 9 5 V T K 1 1 5 4 9 6 V T K 1 1 1 1 2 9 A Z P A E 1 4 9 1 9 V T K 1 1 1 0 8 2 A Z P A E
A Z P A E 1 4 7 1 6 A Z P A E 1 4 7 1 2 V T K 1 1 1 1 3 0 A Z P A E 1 5 0 0 4 A Z P A E 1 5 0 0 8 A Z P A E 1 4 8 5 8 A Z P A E 1 4 9 6 2 V T K 1 1 1 1 1 7 V T K 1 0 6 6 9 3 V T K 1 0 7 7 4 1 V T K 1 1 5 5 2 2 V T K 1 0 7 7 2 9 V T K 1 0 6 1 6 5 A Z P A E 1 4 9 1 1 V T K 1 0 4 5 6 6 V T K 1 1 1 0 8 1 A Z P A E 1 4 3 9 8 A Z P A E 1 4 9 5 9 A Z P A E 1 4 8 8 9 V T K 1 1 5 5 0 0 A Z PA E 1 4 9 9 1 V T K

Correlating genotypes and phenotypes through RWAS

Association between resistance gene presence or the existence of polymorphisms in resistance genes does not always directly correlate with phenotypic resistance data. Here were describe an approach that helps nd such correlates.

General considerations

A detailed study was carried out based on ordinal regression, associating each of the nine antibiotic phenotypes (MIC values) with the strain genotypes [allele counts at locus (Fig. 1.3A) and variant (Fig. 1.2B) levels]. The data revealed both known and new associations (Fig. 1.3). Approximately 28% of the known loci were not found to be associated because their minor allele occurrence was one or two, which is clearly too low to perform any useful statistics. This involves 21 genes and some mutations in gyrA and gyrB genes. The test did not have sucient statistical power to detect variants with such extreme allele frequencies. A very low prevalence of a particular phenotypic resistance status also prevents identication of signicant associations. This prevalence was below 3% for polymyxin B, colistin and chloramphenicol (Supplementary Table S1.2), which may explain the absence of signicant associations between known genotypes and MIC values for these three antibiotics.

Colistin and fosfomycin resistance markers

Sucient samples were available for colistin (n = 524) to identify new associations between genotypes and MIC variations within the sensitive strains. These variations mostly involve low MIC values, below the resistance breakpoint value of 8 μg/mL. First, the absence of the mexS gene, which is located upstream the mexEF oprN eux genes and aects their expression, in 24 isolates yields an increased susceptibility: 50% of these isolates exhibit an MIC < 0.5 μg/mL [START_REF] Oliver | The increasing threat of Pseudomonas aeruginosa high-risk clones[END_REF]. Second, a deletion of the 5'end of the ampD gene observed in 12 non-clonal isolates appears to be related to an increased MIC value: 60% of these isolates have an MIC 2 μg/mL in comparison with 3% for the 512 isolates with the non-deleted version of ampD (Supplementary Fig. S1.1). This is likely to be an indirect association. No association was found between fosA (present in 108 among 113 strains) and fosfomycin MIC. The limited sample size (n = 113) together with the experimental variability of fosfomycin testing may explain this lack of correlation [START_REF] Fuchs | Susceptibility testing quality control studies with fosfomycin tromethamine[END_REF]. Recent data showed that variation in the glycerol-3-phosphate permease gene glpT is correlated with changes in colistin susceptibility [START_REF] Cabot | Deciphering the resistome of the widespread Pseudomonas aeruginosa sequence type 175 international high-risk clone through whole-genome sequencing[END_REF]. At the time of analysis this marker was missing from the database. Only genes and mutations either known to be associated or subsequently found to be associated with resistance against the nine tested antibiotics are displayed. (A) Provides the results for the presence versus absence of genes; and (B) focuses on specic mutations within genes. Genes and mutations are reported in columns and antibiotics in rows. Note that rows were ordered by decreasing phenotype prevalence, and in (A) columns were ordered by increasing allele frequency. Green cells indicate that a signicant new association has been detected. Blue cells represent a known determinant signicantly associated with minimum inhibitory concentration (MIC) variability. Conversely, grey cells indicate known determinants not signicantly associated with MIC variability. Cells with extreme allele frequencies are shown in light grey. In (A), presence and absence gene counts in each drug sub-panel are noted in the cells (presence counts are in bold and above, absence counts in italic and below). Finally, the nature of the mutation is colour coded on the top of (B). The bottom panel represents the extent of linkage disequilibrium between mutations.

A) Gene presence/absence

B) Gene mutations

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • oprD • • • • • Variant effect early-
Piperacillin and cefepime resistance markers No signicant association was observed for piperacillin for any of the β-lactamase genes expected to impact resistance. However, we would have expected a high prevalence of these β-lactamases as there are 165 strains non-susceptible to piperacillin, and yet only two to ve occurrences were found for bla SHV , bla T EM , bla P ER , bla GES and bla V IM . The bla OXA gene was the most prevalent established gene (43 occurrences found among the 280 isolates), but an association was not conrmed. As β-lactamases are often carried by plasmids, one hypothesis is that some plasmids were poorly sequenced and were thus missed [START_REF] Carattoli | In silico detection and typing of plasmids using PlasmidFinder and plasmid multilocus sequence typing[END_REF]. Susceptibility to cefepime was associated with the presence of bla OXA . Associations with bla OXA mutations were found, which suggests that specic alleles of bla OXA correlate with higher MIC values, in particular mutations related to haplotypes bla OXA-31 and bla OXA-224 (Supplementary Fig. S1.2) [START_REF] Aubert | Oxacillinase-mediated resistance to cefepime and susceptibility to ceftazidime in Pseudomonas aeruginosa[END_REF].

Levooxacin resistance markers Most of the known resistance genotypes for levooxacin were found to be signicantly associated with the MIC values, except the presence of AAC( 6)-Ib3, and some mutations in gyrA and gyrB with low allele frequencies. The two common non-synonymous mutations gyrA:T83I (38% of the isolates) and parC :S87L (26% of the isolates) show the highest association scores with P -values of 1.29 × 10 -61 and 3.52 × 10 -40 , respectively. No additional association was detected.

Amikacin resistance markers

Regarding amikacin, 9 of the 26 established genes (mostly the AAC family) were found to be statistically signicantly associated with elevated MICs. Among the 17 established genes for which no association was found, 7 showed extremely low allele frequencies.

Regarding associations, isolates lacking the eux pump genes mexX (10 isolates) and mexY (14 isolates) tend to exhibit lower MIC values: in both cases ca. 50% of the mexX mexY -deleted isolates have an MIC 0.5 μg/mL (Supplementary Fig. S1.3). Since the expressions of mexXY oprM (aminoglycoside eux pump) and oprD are inversely correlated, one would expect a higher OprD expression in such strain whence the MIC would increase. Surprisingly, the gyrA:T83I genotype is strongly associated with amikacin MIC values, suggesting either a joint selective pressure for resistance to levooxacin and amikacin or a sampling bias in our panel where closely related MDR isolates could be over-represented. The association with the presence of the bla OXA gene is also likely an artefact since bla OXA genes are a proxy of resistance cassettes linked to class 1 integrons.

Meropenem resistance markers

Of the 23 known genotypes for meropenem resistance, 6 showed a statistically signicant association (bla V IM , bla V EB , bla OXA , bla KP C and bla IMP β-lactamases and oprD gene presence or variations). Again,seven established genes were not found to be associated owing to extreme allele frequencies. The absence of the porin gene oprD (ca. 4% of the tested isolates) was conrmed as signicantly associated with increase in MIC values: 75% of the isolates lacking oprD showed an MIC 8 μg/mL whilst only 25% of isolates with oprD reached such a value (Supplementary Fig. S1.4). Regarding new associations for meropenem, gyrA and parC non-synonymous mutations related to levooxacin resistance were identied. Assumptions similar to those for amikacin resistance associated with gyrA mutation may apply here. Interestingly, several mutations within the porin gene ). When looking at LD measures, we found that both mutations leading to early stop codons ( oprD :Q18* and oprD :K350*) were linked together and in low LD with other oprD mutations, and both led to an increase in the MIC values. Conversely, two linked synonymous mutations (oprD_180_c and oprD_758_a), also in low LD with other oprD mutations, appear to be associated with a decrease in MIC value. The fact that these mutations do not result in changes to the protein sequence may suggest that they are in LD with a nonidentied causal mutation elsewhere. In examining eux pump genes associated with meropenem resistance, a frameshift mutation was found within mexZ (mexZ_489_-in Fig. 1.3) carried by 12 isolates, among which 10 had a MIC > 8 μg/mL. Such a change in the reading frame is expected to alter the protein function; however, this particular frameshift mutation correlates with an increase in MIC value [START_REF] Masuda | Substrate specicities of MexAB-OprM, MexCD-OprJ, and MexXY-oprM eux pumps in Pseudomonas aeruginosa[END_REF]. In the same way, but to a lesser extent, the early stop mutation found in mexX (mexX :Q395*) observed in eight isolates correlated with a slight increase in the MIC value. Conversely, the synonymous mexD mutation (mexD_1752_c) observed in six isolates was found to be associated with a decrease in MIC value. All these results in eux pump genes must be treated with caution since the mutation frequencies are relatively low. Finally, a non-synonymous mutation was identied in ampO (ampO :P287H in Fig. 1.3), yielding a decrease in MIC values for the six isolates carrying this genotype. All association results are listed in Supplementary Tables S1.3 and S1.4.

Discussion

Genome sequences help detect and dene existing and new resistance traits (e.g. [START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF]).

Large databases that contain more or less complete inventories of genetic factors known to be involved in AR resistance have been developed. The format of such databases may dier and some of them are accompanied by specic software packages that facilitate searches for resistance genes in genome sequences or metagenomic data sets (e.g. [START_REF] Bradley | Rapid antibiotic-resistance predictions from genome sequence data for Staphylococcus aureus and Mycobacterium tuberculosis[END_REF][START_REF] Mcarthur | The comprehensive antibiotic resistance database[END_REF][START_REF] Rowe | Search engine for antimicrobial resistance: a cloud compatible pipeline and web interface for rapidly detecting antimicrobial resistance genes directly from sequence data[END_REF][START_REF] Wei | Phenotypic and genome-wide analysis of an antibiotic-resistant small colony variant (SCV) of Pseudomonas aeruginosa[END_REF][START_REF] Zankari | Identication of acquired antimicrobial resistance genes[END_REF]). These tools are new and need validation for the dierent human-specic bacterial pathogens. Here we focused on P. aeruginosa and its MDR and XDR clones as a model bacterial species and dened the genomic polymorphisms associated with antibiotic (multi-)resistance. In particular, the oprD gene and polymorphisms therein were conrmed as important meropenem AR determinants. Globally, the analyses conrmed most expected correlations if genotypes occur in sucient frequency among phenotypically dened groups of isolates in the strain panel. The new statistical framework allowed us to explore novel candidate associations, such as the two mutations in oprD leading to an early stop codon, which clearly associated with an increase in meropenem MIC values.

Intrinsic resistance is a frequent phenotype for P. aeruginosa, which is dependent on a signicant number of variables including colony morphology and metabolism [START_REF] Murray | Intrinsic antimicrobial resistance determinants in the superbug Pseudomonas aeruginosa[END_REF][START_REF] Wei | Phenotypic and genome-wide analysis of an antibiotic-resistant small colony variant (SCV) of Pseudomonas aeruginosa[END_REF].

It correlates with multiple genomic markers, which begs for additional insight in these markers. Major markers are the eux pumps and AmpC β-lactamases. Dierences in the expression of these genes are very relevant to changes in resistance levels and are often due to changes in regulatory genes or regions. Here we have been focusing primarily on intragenic markers and we realise that in future versions of the database covering the resistance genes and their mutations, we need to include signicantly more markers including, for instance, the glpT gene [START_REF] Cabot | Deciphering the resistome of the widespread Pseudomonas aeruginosa sequence type 175 international high-risk clone through whole-genome sequencing[END_REF]. Recently, the rst genome sequences of strains belonging to the P. aeruginosa MDR clone ST111 were reported [START_REF] Witney | Genome sequencing and characterization of an extensively drug-resistant sequence type 111 serotype O12 hospital outbreak strain of Pseudomonas aeruginosa[END_REF]. The authors suggested that mapping of the polymorphism they detected in a variety of well-known AR genes could be used for optimisation of antibiotic choice. Similar data for ST235 became available and genomic islands 1 and 2 were shown to be important in the dynamics of resistance development. Even more recently, a study of ST175 was published [START_REF] Cabot | Deciphering the resistome of the widespread Pseudomonas aeruginosa sequence type 175 international high-risk clone through whole-genome sequencing[END_REF]. Class 1 integrons were identied as important evolutionary denominators facilitating resistance exibility [46,[START_REF] Wright | Genetic environment of metallo-βlactamase genes in Pseudomonas aeruginosa isolates from the UK[END_REF]. A study described the successful detection of presumptive ceftazidime resistance markers in 88% of all P. aeruginosa genomes studied [START_REF] Kos | The elucidation of mechanisms of ceftazidime resistance among clinical isolates of Pseudomonas aeruginosa using genomic data[END_REF]. Here we introduced a method that allows monitoring of resistance acquisition but can also genomically categorise strains based on MIC levels, even below clinically relevant resistance. In the context of elevated LD and its drive towards `statistical fog', we were still able to exploit the sequence information and to identify mutations that correlate well with the MIC distribution. This strategy permits prediction of the emergence and evolution of newresistance haplotypes on the basis of genome sequences and solid phenotypic AR data. It may also help understand the mechanisms of resistance development, including genetic control and regulatory feedback loops.

The RWAS approach allowed for the identication of new resistance factors, such as the mexXY eux pump for amikacin, and RWAS highlights the importance of the allelic form of accessory genes: in meropenem resistance, not only oprD presence was expectedly correlated with MIC variation, but also polymorphism in the oprD gene was associated with this resistance. Likewise, bla OXA allelic forms were also found to be important in cefepime resistance. This study also showed some limitations in terms of the panel of isolates included for multidrug testing. Indeed, when working with nine drugs using a single panel, it is dicult to guarantee a high strain number for all phenotypes involved and lack of extreme allele frequencies of genotypes that prevent recognition of causal associations (Fig. 1.3). Also, there is a continuous need for database updating.

We demonstrate the usefulness of the bioinformatics pipeline developed for cataloguing full resistance gene content, the characterisation of integron composition and the value of RWAS for the detection of (new) resistance markers. Additional analyses using phenotypically well-dened and genetically diverse as well as ST-identical strains are needed to further validate the ndings presented here. Subsequently, we envision transitioning towards pan genome-wide association studies (GWAS) without the strict need for a reference genome, which would otherwise be quite restrictive for highly plastic species such as P. aeruginosa. Our methods may further detail genotypephenotype associations but validation is required before sequence-based resistance prediction can be used routinely. This study was essential to acquire a good knowledge of the resistance mechanisms and their related genetic determinants in P. aeruginosa. In particular, it highlighted the rich and plastic structure of the P. aeruginosa genome and the importance of its accessory genome (at least 2 Mbp as the genome lengths are distributed between 5.8 and 7.6 Mbp within the species). The resistance was shown to be highly carried by determinants in the accessory genome. The resistome description conrmed that the genes involved in eux pumps and porins are naturally present within the species, while genes allowing inactivation of the antibiotics are mainly acquired. A signicant part of the accessory genes was found related to integrons. A descriptive analysis of these integrons highlighted the great diversity of these elements, illustrating here again the species genome plasticity.

As discussed in the article, the panel used in the analysis showed some limitations in its power to detect some genuine variants. The inclusion of strains in a panel dedicated to such association study is however not trivial: strains should be representative of all groups in the species, and have balanced phenotypes, ideally for several antibiotics. Moreover, the quality of both the phenotype and genotype measures are essential. In an attempt to overcome some limits of the panel used in the study, we performed additional high-level descriptive analyses of the assembly quality, as it it the raw material for the genotype computation. As described in the Methods section of the article, the `full' panel was composed of three collections: Kos, Pirnay and bioMérieux. From these supplementary analyses, we noticed that the assemblies from the Kos collection missed a signicant part of core genes (Supplementary Figure S1.6A). We attributed this to the highest number of non-canonical bases in these assemblies (Supplementary Figure S1.6B). Hence, we decided to focus our developments only on a reduced panel composed of the Pirnay and bioMérieux collections.

This study, at the resistome scale, provided new candidates only to four phenotypes among the nine, and by design only among the genes belonging to P. aeruginosa resistome. Note that in the case of the levooxacin however, it is likely that no new marker was found because the genuine markers are very deterministic of the phenotype. This however motivated us to work at a larger scale, and to take into account the particularly plastic nature of P. aeruginosa genomes, by describing genome-wide variations without the use of any prior reference such as collection of (pan) genes or a reference genome, and without omitting the noncoding regions that may be involved in the regulation of gene expression.

Chapter 2

Using cDBG in bacterial GWAS: why and how ?

Preamble

Improving GWAS approaches to explore and learn about the antibiotic resistance in bacteria is a multi-facet task, as described in the Introduction. Among all, we had at heart to improve the list of variants on which computing the association study. In Chapter 1, we focused the search to a list of resistance determinant genes selected from the literature.

While this allowed a quantitative description of the resistome of P. aeruginosa, this choice prevented from retrieving new candidate markers outside this gene collection.

As presented in the Introduction, even though the k-mers the collection of all subsequences of k nucleotides seen in the input genome sequences seemed a good alternative to a targeted-variant-based description, we wanted to go further and chose to work on compacted De Bruijn graphs (cDBGs) instead. Once our work focused on these graphs, we started a collaboration with Vincent Lacroix (from LBBE/Erable Inria team) and Leandro Lima (a PhD student under his supervision). Their team in particular developed a tool, KisSplice [START_REF] Sacomoto | KISSPLICE: de novo calling alternative splicing events from RNA-seq data[END_REF], which builds DBGs to describe the alternative splicing events from RNA-Seq experiments. All the work presented in this Chapter is based on cDBGs built with this tool, using the levooxacin and amikacin resistance phenotypes, and with the reduced panel of P. aeruginosa introduced in Chapter 1, Concluding remarks (except for two representations using the full panel).

In this Chapter, we present our work on describing the genetic variants in a bacterial GWAS using the cDBG representation, and to which extent they can improve the k-mer approach. Before presenting the manuscript released on bioR χiv in 2017, we begin the Chapter by the presentation of unpublished preliminary work which drove the choices made to build the method described in the manuscript. This includes an introduction to the cDBG topology, how cDBGs can be decorated (enriched with metadata) to highlight side information. We then present dierent ideas regarding the entities we could extract

Bubbles and loops in the cDBG

The representation of the variation among a set of sequences, such as bacterial genomes, with a DBG not only keeps track of the links between the k-mers, but also oers a powerful tool to compress the information without loss. As illustrated in Figure 2.8 of the manuscript, the DBG shows a linear path when no variation is observed after a given k-mer: this k-mer determines the presence of the next one. All k-mers in a linear path are thus equivalent for an association test as they are all present in the same set of genomes.

In the compacted De Bruijn graph (cDBG), any linear path is replaced by a single node, called a unitig, which describes the complete sequence of the replaced path.

In the simple example provided in Figure 2.8, the 4 unitigs forming a bubble in the cDBG carry the same information as the 11 k-mers of the full DBG. In this example, a biallelic SNP led to a simple bubble in the cDBG, whose paths represent sequences of exactly 2k -1 nt [START_REF] Peterlongo | Identifying SNPs without a reference genome by comparing raw reads[END_REF]. This case is also illustrated in the more schematic panel A of The maximal number of outgoing edges for a unitig in a cDBG is given by the length of the alphabet [START_REF] De Bruijn | A combinatorial problem[END_REF], here, the four canonical nucleotides A = {A, C, G, T }. The number of outgoing edges correspond to the number of alleles seen at a given position p dened by the k-mer at position pk in the dataset. As an example, Figure

≥ 41 k = 41 k k k k
at the genome population. The choice of k also drives the k-mer sequence specicity and thus the number of repeated k-mers, hence the graph topology, as repeated k-mers form loops in the cDBG. This is illustrated in the manuscript Figure S2.4: the gene gyrA is represented by six cDBGs for a population of 665 P. aeruginosa strains. We used dierent values of k from 11 to 61 and observed numerous loops due to unspecic 11-mer repeats at k = 11. We discuss the choice of the k value in the Method section of the following pre-print. A cDBG can also be built on a single genome in order to analyse its repeats. Indeed, within a single genome, forks only happen when a k-mer is repeated in the genome. Figure 2.2 shows the graph topology obtained for the shortest (5.84Mb) and longest (7.59Mb) genomes from our P. aeruginosa panel, with k = 41. The longest unitig correspond to the longest sequence found in the genome with no repeat of length 41 nt or more. The histograms below the graphs represent the number of repeats found for 3 values of k, and the number of times the repeats were seen. For instance, 97 k-mers were found 11 times in the longest genome, with k = 41.

The information provided at a single-genome-level can also be of help in the choice a the best k value. This is the strategy used by kSNP [START_REF] Gardner | kSNP 3.0: SNP detection and phylogenetic analysis of genomes without genome alignment or reference genome[END_REF], a tool to build k-mer-based phylogenies: they dene the best k value as the one producing 1% of repeated k-mers. Even though the repeated k-mer counts can be used to assess the presence of multiple copies of genes in the genome, we did not integrate this information in the remainder of the work. Indeed, we worked on genome assemblies, which already compress the repeats [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF]. the allele frequency is used for the unitig size and the percent of non-susceptible strains is used for the unitig colour.

Adding decorations, for a better comprehension

Metadata can be added to the cDBG to represent unitig properties (size, color, etc.) and oer a more comprehensive representation [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF][START_REF] Olekhnovich | MetaCherchant: analyzing genomic context of antibiotic resistance genes in gut microbiota[END_REF], beyond the graph topology. We

Allele frequency

High frequency

Low frequency

Annotation

the gene sequence from one extremity to the other. Furthermore, this enriched representation allows for an obvious visualisation of the QRDR: in this region, the unitigs are specic to the antibiotic resistance status and appear either blue (susceptible strains) or red (non-susceptible strains), as opposed to the other unitigs of the graph, which appear purple (seen in both susceptible and non-susceptible strains). Retrieving the sequences corresponding to these unitigs would allow to nd the expected associated mutations easily.

The mapping of features from the graph to the unitig sequences, and then from the unitig sequences to a multiple alignment of the QRDR allowed to better understand the link between a representation with a cDBG and with a multiple alignment. As a result, This preliminary work revealed that cDBGs were an appealing framework to represent genetic variations in bacterial GWAS. Indeed while a bubble represents a divergence between two genotypes, the cDBG built from all input genome assemblies provides a direct description of the variations at any position in the genomes. Encouraged by the gyrA example, we searched strategies to identify such coloured patterns at the complete genome level.

cDBGs

How to use the cDBG for a GWAS?

A visual inspection of a pan-cDBG (the cDBG built from all genomes, i.e. at the pangenome level) was not a realistic approach for identifying genotype-to-phenotype associations, when the number of unitigs reached the millions. This identication had to be obtained computationally. The rst natural choice was to use bubbles, as it is the solution implemented in DBG-based variant search [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF][START_REF] Peterlongo | Identifying SNPs without a reference genome by comparing raw reads[END_REF][START_REF] Sacomoto | KISSPLICE: de novo calling alternative splicing events from RNA-seq data[END_REF].

Bubbles are very ecient to capture SNPs and indels in a population, but other types of variations are also expected to be related to the phenotype, such as the insertion of resistance genes, which are themselves polymorphic. Figure 2.5 shows the pan-cDBG obtained for a simulated insertion of a resistance gene into a conserved site. The sequence of the inserted gene is variable within the population: SNPs and indels in the gene generate a succession of small bubbles, some of which are branching. The insertion as a whole could be represented by a large bubble: using the same notation as in Figure 3, we represented, over the graph gure, both anking sequences a and b on each side of the bubble, path σ representing the part of the population which does not have the insertion and path σ representing the insertion. However, as the inserted sequence is polymorphic, a very large number of possible paths describing σ exists. Moreover, in practice, accessory resistance genes are not always inserted in a single insertion site: the presence of two conserved switching nodes a and b for a given gene insertion is not guaranteed.

Using KisSplice, which is able to identify such branching bubbles, we observed the combinatorial explosion in the number of possible paths produced to represent a polymorphic insertion, and thus the limited ability of bubbles to describe a gene insertion, on a toy example illustrated in Supplementary Figure S2.3. This example represents the simple insertion of aac(6') variants between two genes always the same pair. KisSplice identied numerous bubbles corresponding to the long insertion (agged as alternative splicing ' a b

score i = |(R upper,i -S upper,i ) -(R lower,i -S lower,i )|, R upper,i S upper,i R lower,i S lower,i i k k = 41 k = 41
which required modelling choices. The AMR raw phenotype in our P. aeruginosa panel was a minimum inhibitory concentration (MIC) value. We introduced in Chapter 1 the ordinal model encoding the MIC as ordered categories. We also tested a linear model on the logarithm of the MIC values, and a logistic model on the binarised MIC values. The binarisation was done using the Clinical Laboratory Standards Institute (CLSI) guidelines which determine MIC breakpoints dening susceptible, intermediate and resistant strains. We then gathered the intermediate and resistant categories to create a non-susceptible category. We added to all univariate models a correction for the population structure using the principal components of the matrix of core SNPs explaining 90% of the variance, as factors with a xed eect. We applied these three models to the levooxacin and amikacin resistance phenotypes for the P. aeruginosa reduced panel: we tested the hypothesis of a null eect of the unitig pattern on the phenotype and produced p-values using a likelihood ratio procedure, then transformed them using the Benjamini-Hochberg method to guarantee an FDR control in the situation of multiple testing. We nally built ROC curves to evaluate the ability of each model to retrieved the genuine variants described in Supplementary Table S1.3. All methods showed a similar enrichment of lower p-values for known determinants of amikacin resistance (Figure 2.7): the three methods performed equally to retrieve 70% of the known determinants. However the logistic model presented worse performances to retrieve the remaining known determinants. We hypothesised this was caused by a lack of numerical convergence for some combinations of X and W leading to poorly conditioned problems. Moreover, the logistic and ordinal regressions required a higher computational time than the linear regression. From this comparison, we were condent in using a linear model. We then wanted to benchmark several population structure correction methods. This comparison, described in the manuscript, integrated a linear mixed model implemented in the R package bugwas. Indeed, this package is dedicated to adjustment for the strong population eects observed in bacterial population [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF], and also estimates eects at the lineage level. However, this method is restricted to binary phenotypes, even though it applies a linear model. In order to make a fair comparison, we chose to also apply a linear model on binarised phenotypes for other correction methods, as described in the pre-print.

The following manuscript describes the cDBG-based method built from this preliminary work: the variant matrix is built from a pan-cDBG generated by KisSplice, and the presence/absence unitig patterns are used in multiple linear models of a binarised phenotype. We discuss the choice of the population structure correction, and introduce a post-processing procedure using the information on ingoing and outgoing edges of the signicant unitigs in the pan-cDBG.

2.2 Pre-print released on bioRχiv (2017) "Representing genetic determinants in bacterial GWAS with compacted De Bruijn graphs" doi:113563 Abstract Motivation: Antimicrobial resistance has become a major worldwide public health concern, calling for a better characterization of existing and novel resistance mechanisms. GWAS methods applied to bacterial genomes have shown encouraging results for new genetic marker discovery. Most existing approaches either look at SNPs obtained by sequence alignment or consider sets of kmers, whose presence in the genome is associated with the phenotype of interest. While the former approach can only be performed when genomes are similar enough for an alignment to make sense, the latter can lead to redundant descriptions and to results which are hard to interpret.

Results: We propose an alignment-free GWAS method detecting haplotypes of variable length associated to resistance, using compacted De Bruijn graphs. Our representation is exible enough to deal with very plastic genomes subject to gene transfers while drastically reducing the number of features to explore compared to kmers, without loss of information. It accomodates polymorphisms in core genes, accessory genes and noncoding regions. Using our representation in a GWAS leads to the selection of a small number of entities which are easier to visualize and interpret than xed-length kmers. We illustrate the benet of our approach by describing known as well as potential novel determinants of antimicrobial resistance in P. aeruginosa, a pathogenic bacteria with a highly plastic genome.

Introduction

Antimicrobial resistance has become a major worldwide public health concern, as illustrated by the increase of hospital-acquired infections on which both empirical and targeted treatments fail because of multi-resistant bacterial strains [START_REF] Micek | An international multicenter retrospective study of Pseudomonas aeruginosa nosocomial pneumonia: impact of multidrug resistance[END_REF]. This worrisome situation calls for a better comprehension of the genetic bases of resistance mechanisms. Genomewide association studies (GWAS) aim at linking genetic determinants to phenotypes, and seem appropriate for this purpose. Indeed over the past four years, bacterial GWAS have shown encouraging results for genetic marker discovery thanks to the increase in rich panels of bacterial genomes and phenotypic data [START_REF] Alam | Dissecting vancomycinintermediate resistance in Staphylococcus aureus using genome-wide association[END_REF][START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF][START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Farhat | Genomic analysis identies targets of convergent positive selection in drug-resistant Mycobacterium tuberculosis[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF]. GWAS rely on a particular denition of genetic variants, such as the presence in the genome of SNPs against a reference genome, of genes in a predened list or of xedlength kmers. Each genome in the panel is encoded as a vector with one entry per genetic variant indicating, e.g., whether the genome contains the variant and all variants are tested for association with the phenotype of interest. The objective of this paper is to describe a novel representation of genetic variation for bacterial GWAS, and to discuss its advantages over existing ones. Most existing bacterial association studies use approaches developed for human GWAS to encode genome variation: they align all genomes in the panel against a reference genome, identify SNPs and represent each strain by a presence/absence vector with one entry per SNP [START_REF] Alam | Dissecting vancomycinintermediate resistance in Staphylococcus aureus using genome-wide association[END_REF][START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF][START_REF] Farhat | Genomic analysis identies targets of convergent positive selection in drug-resistant Mycobacterium tuberculosis[END_REF]. However a suitable reference is not always available, in particular for species with extensive genome plasticity and a large accessory genome. The accessory genome is the part of the genome not found in all strains of the same species, and is largely composed of genetic material acquired by horizontal gene transfer. For highly plastic species including pathogenic and antibiotic resistant species such as P. aeruginosa, it can represent more than a quarter of the complete genome, leading to manifold genomes which vary by their size and content [START_REF] Kung | The accessory genome of Pseudomonas aeruginosa[END_REF]. Aligning such genomes against a reference makes little sense and alternative representations of genetic variation are required. To account for the variation in gene content, some studies also use as candidates the presence or absence of genes represented in the studied panel [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF]. However, genetic determinants linked to transcriptional or translational regulation may be located in noncoding regions, and thus are missed by approaches relying on this representation, whose quality also depends a lot on the quality of the available annotation. Finally to get around these issues, other studies have represented genomes as vectors of presence or frequency of kmers, i.e., of length k sequences in the genome [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF].

Contrarily to SNP-or gene-based approaches, kmers are able to describe genome diversity without requiring an alignment against a reference genome or prior annotation. A major issue of this approach however is that the number of distinct kmers contained in a set of genomes increases with k, easily reaching tens of millions of candidates and leading to very high memory requirements, time loads and complexity in feature interpretation. At the same time it is clear that the information carried by kmers is highly redundant as each single locus is represented by several overlapping kmers, suggesting that they are not the optimal resolution to describe genome variation. Thus, the best way to encode genomic variation in bacterial GWAS remains an open question [START_REF] Power | Microbial genome-wide association studies: lessons from human GWAS[END_REF][START_REF] Read | Characterizing the genetic basis of bacterial phenotypes using genome-wide association studies: a new direction for bacteriology[END_REF]. Our proposed representation is based on compacted De Bruijn graphs [START_REF] De Bruijn | A combinatorial problem[END_REF] (DBG), which are widely used for de novo genome assembly [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF][START_REF] Zhang | A practical comparison of de novo genome assembly software tools for next-generation sequencing technologies[END_REF] and variant calling [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF][START_REF] Bras | Colib'read on galaxy: a tools suite dedicated to biological information extraction from raw NGS reads[END_REF].

All xed-length kmers corresponding to the same long sequence in a set of genomes are represented as a single longer word associated with a node in the graph. The nodes of the compacted DBG therefore provide a lossless, data dependent compression of the xed-length kmers, leading to a resolution adapted to the local variability of the genomes. We show in this paper how using these nodes to dene genetic variants for bacterial GWAS indeed leads to selecting a few entities which are easier to interpret and make more sense biologically than xed-length kmers. We also show how DBGs themselves facilitate the analysis of a set of candidate variants found to be signicantly associated with microbial antibiotic resistance. We illustrate these advantages using a panel of P. aeruginosa strains with multiple phenotypic resistances to antimicrobial drugs.

Methods

We here introduce our proposed denition of genomic variants, showing how it generalizes two standard alternatives based on presence/absence of: SNPs obtained by alignment against a reference genome, Fixed-length kmers. We then detail how we use it in a GWAS context and how we assess its performance.

Encoding genome variation using compacted De Bruijn graphs

DBGs are directed graphs representing overlaps between a set of strings. More specically, the DBG nodes are all unique kmers extracted from the sequences and an edge is drawn between any two nodes if the (k -1)-length sux of one equals the (k -1)-prex of the other.

When considering a set of similar sequences, a single DBG built over all these sequences displays a particular topology, providing information on any variation among sequences in the set. A SNP for example leads to kmers which are constant across genomes, followed by kmers diering by one letter, followed by more constant kmers. When building the DBG, if a kmer overlaps two other kmers but these two kmers dier by their k th base we obtain a fork pattern in the graph (Figure 2.8A). When both branches of the fork join again into one shared kmer, we obtain a bubble pattern with two branches of equal length, representing the SNP (Figure 2.8B). Insertions of large sequences in some of the genomes lead to bubbles with one branch longer than the other, and can therefore be represented in the same framework. This makes DBGs a tool of choice to describe genomic variants [START_REF] Bras | Colib'read on galaxy: a tools suite dedicated to biological information extraction from raw NGS reads[END_REF].

Interestingly, these graphs can be compacted by rst using a unique node to store a kmer sequence and its reverse complement, and then merging linear paths, i.e., sequences of nodes not linked to more than two other nodes. This compression is done without loss of information, because it only aects redundant descriptors, i.e., kmers whose presence/absence pattern is identical across genomes [START_REF] Butler | ALLPATHS: de novo assembly of whole-genome shotgun microreads[END_REF][START_REF] Chikhi | Compacting de Bruijn graphs from sequencing data quickly and in low memory[END_REF][START_REF] Zerbino | Velvet: algorithms for de novo short read assembly using de Bruijn graphs[END_REF]. Thus, the nodes of the compacted DBG can be thought of as haplotypes of variable length in dierent regions of the genomes, including coding and noncoding regions as well as core and accessory genome (Figure 2.8C). In the remainder, we denote by unitig the variable-length kmer associated with a node in the compacted graph. Figure 2.9: Alignment to a reference (when possible), DBG and kmers obtained for similar (A) and very polymorphic sequences (B). In the rst case, the 3 loci represented as polymorphic in the alignment lead to 3 bubble patterns in the DBG, and numerous redundant kmers. In the second case, genomes are so polymorphic that an alignment is not possible. The DBG summarizes well the common regions and the links between them, while the collection of unique kmers still contains redundancy.

each genome against a reference. For highly plastic genomes on the other hand, alignment against a single reference genome is unsuitable and genomic variation is often encoded as the presence/absence of xed-length kmers in the genomes. The presence/absence of unitigs of a DBG built over the genomes of several individuals provides a exible representation thereof which interpolates between these two alternatives in a data adaptive fashion.

At one extreme in the case of a clonal panel with only SNPs as genetic variants (Figure 2.9A), the DBG is a path with a few bubble patterns assuming genomes do not contain repeated regions longer than k. This graph is isomorph to a reference genome with SNPs. On the other hand, the collection of xed-length kmers belonging to these genomes is very redundant: all kmers containing the same SNP at dierent positions have the same presence/absence across strains by construction. Those containing no SNP most of them do not represent any polymorphism: they are present in all genomes in the panel and their presence/absence representation would be 1 identically across strains.

As variability across individual genomes increases and alignment of the genomes becomes ill-dened (Figure 2.9B), the DBG drifts away from a path to accommodate local variation beyond isolated SNPs. Fixed-length kmers are also able to represent this variation but still contain a lot of redundancy: all kmers with a given color arise from the same larger colored segment (or junction between segments). They correspond to the same unitig, and their presence/absence across strains is the same. By contrast, the DBG exploits the fact that some regions can be more or less polymorphic across genomes to compact redundant kmers into single longer non-redundant unitigs: their presence/absence across strains is dierent unless the corresponding regions are present in the exact same set of genomes because of linkage disequilibrium (LD). In the extreme case where genomes in the panel have so little in common that no compaction is possible in the DBG, the unitig representation reduces to the xed-length kmer representation.

In this sense, unitigs always represent the best of both worlds between a SNP-based representation of genetic variation and one based on a set of unstructured xed-length kmers. It results in a locally optimal resolution: regions of the genome which are conserved across individuals are represented as single long words while regions which are too variable are fractioned into shorter structured kmers.

In addition to removing redundancy compared to xed-length kmers, DBGs maintain an information regarding how kmers follow each others in the panel, and can be used to interpret those whose presence in the genome is associated with resistance by visualizing the proportion of resistant strains in which they are present. We use these facts in Section

Making sense of the selected patterns using the compacted DBG to interpret our results.

Choice of k

Each choice of a xed-length k leads to a dierent DBG (Supplementary Figure S2.4), and there is no general rule as to how to choose k. Small values of k produce very connected sets of non-specic kmers which fail to represent the specicities of the data. In particular, any region larger than k which is repeated in two dierent parts of the genome creates a cycle in the DBG. On the contrary, large values of k can fail to create 2 dierent nodes for 2 dierent SNPs separated by less than k bases. In this case, the 2 SNPs will be considered as a unique variant. We tested a few values of k and judged by the general aspect of the DBG obtained on our panel and by the GWAS performance, as detailed in Supplementary Figures S2.4 and S2.5. We x k to 31 for the rest of this study, as this value leads to both an exploitable topology for the DBG built on the gyrA gene, and good performances on GWAS. We found our results to be robust to small variations of k. We discuss the eect of k in more detail in Section Extracting xed-length kmers and unitigs from complete genomes.

Testing procedure

We build our test using a linear model relating resistance phenotypes to a candidate genetic determinant and population structure. Let n be the number of observed samples (i.e., strains with available genome and phenotype). When testing any particular haplotype (presence/absence of a unitig or a xed-length kmer in the genome) for association with the resistance phenotype, we use the following model:

Y i = X i β + W i α + ε i , i = 1, . . . , n, (2.2)
with ε i iid ∼ N (0, σ 2 ), σ 2 > 0.
For any sample i, Y i is a binarized antibiotic susceptibility status: 0 for susceptible strains and 1 for non-susceptible (resistant and intermediary) strains, X i is 1 when the sample has the minor version of the haplotype, 0 otherwise. We discuss the set of tested candidates X in Section Genome-wide variant matrix building.

β is the eect of the haplotype on the phenotype, W i ∈ R l is a factor representing the population structure, α ∈ R l is the eect of this population structure on the phenotype. We choose to use a linear model rather than a logistic one even though our outcomes Y i are binary: we tried a logistic model in preliminary experiment, but obtained worse detection performances. Many combinations of X and W factors indeed led to poorly conditioned optimization problems and poor numerical solutions. The logistic model also led to much longer computation for the test. Our objective is to detect haplotypes whose presence in the genome is associated with antimicrobial resistance. Formally for each haplotype X, we test

H 0 : β = 0 versus H 1 : β = 0 in model (2.2).
It is well known from the human GWAS literature that spurious associations can be detected if the eect of the population structure is not taken into account [START_REF] Balding | A tutorial on statistical methods for population association studies[END_REF][START_REF] Widmer | Further improvements to linear mixed models for genome-wide association studies[END_REF][START_REF] Zhou | Ecient multivariate linear mixed-model algorithms for genome-wide association studies[END_REF]. For example, assume a clade contains only resistant individuals because a mutation acquired by a common ancestor of this clade confers resistance. Then all other mutations which are acquired later in evolution and are more present in the clade will also be found to be associated with the resistance phenotype. Population structure can be very strong within bacterial strains [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Falush | Genome-wide association mapping in bacteria[END_REF]. We estimate this structure from the whole design matrix X ∈ R n×p , where p is the number of unitigs or kmers (as discussed in Section Genomewide variant matrix building, X typically has several identical columns). We evaluated with three models on both simulated and real data: (i) no correction, (ii) xed eect α and (iii) random eect α. Denoting X = U ΛV the singular value decomposition (SVD) of X, we use W = U q (the matrix formed by the rst q columns of U ) in the xed eect model and W = U Λ in the random eect model. For the rst two models, we compute p-values for H 0 using a likelihood ratio test. For the random eect model, we use the bugwas implementation of [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF] to test H 0 , providing a pre-computed population structure W . Note that bugwas also oers to detect lineage eect, namely columns of the population matrix W which are associated with resistance, as a mean to avoid throwing away candidates whose association is explained away by the population structure: some of them could actually be causal, and bugwas would return the whole lineage along with correlated candidates as a lower resolution entity.

Genome-wide variant matrix building

One goal of this paper is to illustrate the advantage of testing unitigs rather than xedlength kmers for association with antimicrobial resistance. To do so, we need to represent both xed-length kmers and unitigs as 2-levels factors coding for the presence/absence of kmers/unitigs in model Eq. (2.2). More precisely, we consider both as generalized haplotypes with two alleles: presence or absence of the kmer or unitig in the genome. We then express each haplotype as a binary vector X ∈ {0, 1} n , with X i = 1 if sample i has the minor allele (the less frequent one across the dataset), 0 otherwise. Consistently with [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF], we refer to such a binary vector as a pattern in the remainder of this paper, to emphasize the dierence with the actual kmer or unitig they represent. Dierent kmers or unitigs can indeed be represented by the same binary vector because their presence/absence pattern across the genomes is the same. We only perform one test for each unique pattern (presence/absence binary vector), but retain the link between each pattern and the corresponding kmers and unitigs for later interpretation. Both xed-length kmers and unitigs lead to the same set of distinct patterns (represented by vectors in {0, 1} n ) across the genomes. Indeed, every unitig represents (at least) one xed-length kmer, and conversely every xed-length kmer is represented by one (single) unitig. As a consequence, the set of patterns tested for association with microbial resistance is identical for the two representations, which further illustrates the fact that using unitigs does not remove information compared to xed-length kmers. Every pattern we test often corresponds to a large number of xed-length kmers. Many of them can come from a single longer sequence of DNA which is either entirely present or absent in each genome of the panel: in this case, they all map to the same unitig. This redundancy is a nuisance because it amounts to articially fractioning a single pattern into several pieces only because we are not working at the right resolution. For example, the SNP on Figure 2.8 can be represented by one long kmer (unitig) whose only variation across all genomes is at the position of this SNP. Likewise, a unitig can correspond to a gene which is present in some of the genomes but not all of them. In both cases, breaking the unitig into several shorter xed-length kmers does not bring any additional information and makes the results harder to interpret. Each pattern in turn typically corresponds to a much lower number of unitigs than kmers.

By construction, two unitigs related to the same pattern cannot correspond to overlapping words they would have been compacted as a single longer unitig otherwise. They are only redundant in the sense that a genome contains one of the unitigs if and only if it contains the other. This redundancy can be dealt with by inspecting the DBG, as we discuss in Section Making sense of the selected patterns using the compacted DBG. The reasons can range from nearby nodes being separated by a rare variant, to two separate genomic regions being in LD.

We build a single compacted DBG from 282 P. aeruginosa genome assemblies (see Section Dataset) using the kissplice software, version 2.3.1 [START_REF] Sacomoto | KISSPLICE: de novo calling alternative splicing events from RNA-seq data[END_REF]. A specic aspect of our approach is that we build our compacted DBG from assembled genomes (more precisely, from contigs) rather than from primary sequence reads. This allows us to avoid dealing with sequencing errors, which are present in reads but are mostly eliminated during the assembly process. We choose kissplice settings in order to have no lter on the kmer frequencies or occurrences (-c 0 -C 0.001) and build one DBG per tested kmer length: k=13, 15, 17, 19, 21, 31, 41, 51 and 61 pbs. All resulting xed-length kmers and DBG unitig sequences are then mapped without mismatch to the original genome assemblies using Bowtie 2 [START_REF] Langmead | Fast gapped-read alignment with Bowtie 2[END_REF] in order to determine the presence or absence of each kmer and unitig in each genome, as this information is not provided by kissplice.

Dataset

We use a panel of 282 strains of P. aeruginosa species, a ubiquitous bacterial species responsible of various infections, highly adaptable thanks to its ability to exchange genetic material. The species accessory genome is particularly important, in terms of size and diversity, and carries a large part of the genetic determinants already described to confer resistance to antimicrobial drugs [START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF]. This strain panel was gathered from two collections including mostly clinical strains: the bioMérieux collection (n=219) [200] and the Pirnay collection (n=63) [START_REF] Pirnay | Pseudomonas aeruginosa population structure revisited[END_REF]. Genomes were sequenced on Illumina HiSeq 2500, assembled using a modied version of the IDBA_UD assembler [START_REF] Peng | IDBA-UD: a de novo assembler for single-cell and metagenomic sequencing data with highly uneven depth[END_REF], and annotated for the identication of core and accessory genes [200]. Both sequencing and assembly are available on NCBI with accession number PRJNA297679. Antibiotic resistance phenotypes were obtained by broth dilution assays complemented with VITEK2 testing (bioMérieux, Marcy-l'Étoile, France), for several drugs commonly used in P. aeruginosa infections, including amikacin (280/282 strains) and levooxacin (117/282 strains) [200]. A minimal inhibitory concentration (MIC) value was thus available for all the characterized strain/antibiotic couples. Clinical and Laboratory Standards Institute (CLSI) guidelines were applied on the resistance data to determine susceptibility or non-susceptibility. The reader is referred to [200] and [START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF] for more information on all strains and their analysis.

Evaluation

We evaluate two complementary aspects of our unitigs. First, we verify that when used in GWAS, they lead to the detection of true genetic determinants on both simulated and real data, under dierent population structures. Then we assess how insightful the representation is and what type of event underlies each tested pattern.

Ability to detect variants associated with resistance

Quantifying how well a detection method works is dicult, as not all genetic determinants of antimicrobial resistance are known. If a method calls an association between resistance and a particular variant which was never described as causal it may be a false positive but it may also be because the method discovered a new unreported mechanism. We therefore choose to evaluate how well our test detects true determinants on three complementary indicators. First, we simulate resistance phenotypes based on our real genomes, arbitrarily xing which patterns X built in Section Genome-wide variant matrix building have a non-zero eect on the phenotype Y . Let X be an n × q matrix whose columns are the unique patterns (in contrast with X ∈ R n×p whose columns correspond to typically non-unique kmers or unitigs), β is an R q vector of the corresponding eects. We sample the phenotype Y i of each sample i from a multivariate logistic model:

Y i ∼ B(π i ), π i = 1 1 + e -X i β-W i α . (2.3)
Using this set of positive and negatives, we can plot a Receiver Operating Characteristic (ROC) curve for each of the three methods introduced in Section Testing procedure.

The simulation is multivariate, accounting for the fact that resistance can stem from a combination of causes rather than a single one whereas we are using univariate model Eq. (2.2) for our test. Since we use a logistic model which is the generalized linear model (GLM) of choice to handle binary outcomes, as opposed to the linear model which we use for convenience in our test, it also takes into account the potential misspecication between the model underlying our procedure and the actual distribution of the data. On the other hand, the conclusions we draw from this simulation are contingent upon the capacity of the logistic model Eq. ( 2.3) to represent the relationship between haplotype and phenotype. Using the true phenotype data for both amikacin and levooxacin resistance, we also evaluate a metric based on libraries of known genetic determinants of resistance [START_REF] Jaillard | A comprehensive microbial knowledge base to support the development of in vitro diagnostic solutions in infectious diseases[END_REF] (mentionned thereafter as reported causal variants) which we use as our positive set. In this case we do not need the assumptions made in the simulation, but we lose the exact knowledge of which haplotypes are negative, i.e., have no eect on the phenotype: some selected patterns may not be linked to any know genetic determinant of resistance just because there are still unreported. Instead of ROC curves, we therefore resort to plotting the true positive rate (TPR) using identied and hence known positives as a function of the number of positives called by the method the false positive rate corresponding to this number being unknown. Assigning each selected pattern (which can represent several mutations or presence of accessory genes) to a true or false status requires a mapping step and some type of approximation: we choose to identify a pattern as a true determinant if it corresponds to at least one kmer/unitig which maps to a known genetic determinant from a resistance gene sequence database [START_REF] Jaillard | A comprehensive microbial knowledge base to support the development of in vitro diagnostic solutions in infectious diseases[END_REF].

Finally using the true phenotype data for amikacin resistance, we plot the proportion of reported causal variants recovered as a function of the number of kmers or unitigs called positive. We restrict ourselves to the million kmers (resp. unitigs) with the lowest p-values. While the rst two metrics focus on unique patterns and do not distinguish between kmer and unitig encoding (both leading to the same set of patterns), this third metric allows us to compare the number of kmers and unitigs that need to be inspected to identify a given proportion of all reported causal variants. This number can be dierent as each presence/absence pattern corresponds to dierent numbers of kmers and unitigs.

Making sense of the selected patterns using the compacted DBG

The analysis we describe in Section Ability to detect variants associated with resistance is necessary because we need to verify that our test actually discriminates between patterns 2.2. PRE-PRINT RELEASED ON BIORχIV (2017) 75 corresponding to causal variants and those not corresponding to any causal variant. It is however not sucient to ensure that our procedure is suited to identifying unreported genetic determinants of antibiotics resistance: to be able to perform this analysis, we had to dene which patterns were true determinants using annotated SNPs and genes known to be linked to resistance. In addition to being approximate, this denition cannot be used to go beyond recovering existing determinants.

In order to perform this task, we must be able to interpret the selected patterns. Assuming a pattern is found to be associated with resistance in our test, its interpretation in a xed-length kmer paradigm can be cumbersome: it typically requires to map all kmers corresponding to the pattern to all genomes as there is no single reference genome in this context and to make sense of these mappings. For example, one may nd that several of these kmers map to similar regions or annotated genes in all genomes. The task can be heavy as each pattern is typically associated to a large number of redundant xed-length kmers. Annotation of our unitigs is easier for three reasons. First, the number of unitig sequences to be mapped is much lower than the number of xed-length kmers, as illustrated on Figure 2.10. Second, unitigs are longer than kmers, making them more likely to map to a unique region in the genome. Finally, the DBG itself and its colored version [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF] can help us understand which type of event is associated with a unitig. The colored DBGs we use rely on node sizes to represent allele frequencies, i.e., the proportion of genomes containing the sequence. They also rely on node colors to represent the proportion of resistant strains containing the corresponding unitig, countinuously interpolating between a red node for unitigs found in resistant strains only and a blue node for those found in susceptile strains only.

Concretely, we select a few patterns with lowest p-values from the GWAS results. We then retrieve all unitigs corresponding to these low p-value patterns some unitigs can share their presence/absence proles because of LD, and thus are duplicated. We build the subgraph of our colored DBG induced by these top unitig plus all their neighboring unitigs for a given neighboring size s. We refer to this subgraph as the s-neighboring DBG. This representation oers several advantages:

It can be done regardless of the association of the pattern with the resistance phenotype and whether or not any annotation is available for the studied genomes. Its topology reects the nature of the variant: bubbles for example correspond to SNPs while paths represent gene insertion.

Node colors visually help understand which unitigs or more complex subgraphs are associated with resistance. This allows us to identify bubbles ( e.g. SNPs or indel) whose branches dierentiate phenotype status, and can still be done when no genome annotation is available, using only the strain phenotypes.

Top unitigs which are close to each others in the genomes will be gathered into connected components of the induced subgraph. These components may represent well-dened genomic regions such as genes or mobile genetic elements not all connected components will correspond to genomic regions however: some may result from repeated regions in the genome. On the other hand, unitigs mapping to dierent connected components distant neighborhoods carry information on LD, i.e., separate haplotypes which happen to be present in the same set of samples, possibly because of the population structure. obtained for amikacin resistance: settings are given between brackets while resulting numbers are given between parenthesis. The annotation burden is lighter when using the DBG unitigs than xed-length kmers. Indeed in the case of amikacin resistance, the number of kmer sequences to map against all genome exceeds 1000, while using the DBG unitigs we map no more than 47 unitig sequences and can also rely on the identied 8 genomic regions for a complementary interpretation.

Results

We describe the results obtained in our experiments on simulated and real antibiotic resistance phenotypes. We study both the ability of the unitigs to detect causal variants when used in GWAS and the interpretability of the detected objects.

Extracting xed-length kmers and unitigs from complete genomes

The length k of the kmers used to build the DBG determines how the DBG represents our set of genomes and its ability to provide some level of compression. Small values (below 20) generate words of low complexity which are highly repeated in the genomes, creating numerous loops in the DBG. Consequently, the graph is hardly compacted, as it is very connected and contains few linear parts. For k=15, we only count twice more kmers than unitigs (34 M versus 15 M). As k increases, the number of kmers increases but they become more specic and less repeated within genomes, leading to better levels of graph compaction. For k=41, we obtain 62.5 M kmers and 2.2 M unitigs. More generally, panel A of Figure 2.11 shows that as k increases, the number of kmers increases whereas the number of unitigs remains stable. Simultaneously, panel B of Figure 2.11 shows that increasing k leads to unitigs of increasingly variable size larger or equal to k by construction. For k=41, the median length of unitigs is 54 and the longest unitig is 163017 bp long. This illustrates both the redundancy of the xed-length kmer representation and the capacity of unitigs to produce descriptors whose resolution is adapted to the local variation observed across the genomes. Panel C of Figure 2.11 represents for each k the percentage of kmers or unitigs which we lter out from our GWAS because their minor allele frequency (MAF) is too low (dark grey). Furthermore as discussed in Section Genome-wide variant matrix building several kmers or unitigs can have the same presence/absence pattern on a given set of genomes, so we also represent the proportion of kmers or unitigs which are ltered out from our GWAS because they correspond to duplicated kmers or unitigs (light grey). As expected, this proportion is much larger for xed-length kmers than for unitigs: a large fraction of xed-length kmers associated with a single pattern are summarized as a single unitig. This is consistent with the observation that the number of xed-length kmers is much larger than the number of unitigs but that both representations ultimately lead to the same number of unique patterns.

Phenotype simulation study

We generate synthetic data with two scenarios under model Eq. ( 2.3) to illustrate the capacity of our test to detect patterns associated with resistance and the importance of adjusting for population structure. This will also help interpret results on real data in Section Application on real data. We use the design matrix X built from our panel of P. aeruginosa genomes. We compute its singular value decomposition X = U ΛV and set W = U Λ.

Our rst scenario is intended to illustrate the case where there is a population eect on the observed resistance (some clades are enriched or depleted in resistant samples) which is not explained by the set of patterns in the tested design X. In practice, this could be a non-genetic (e.g. environmental or batch) eect. More importantly, this could happen if some genetic determinants are not included in the model used for testing. This is likely to be the case when we use model Eq. (2.2) which is univariate, i.e., which only considers one pattern at a time. For example, it could be the case that one mutation A causing resistance was acquired by the ancestor of a clade and transmitted to its descendants: the clade would then be enriched in resistant individuals. If a second mutation B not related to resistance is acquired by a close descendant of the common ancestor and transmitted, many samples from the clade will also have mutation B. A univariate test of association of B with resistance will not account for A. If the test does not account for population structure either, it may assign a smaller p-value to B than to other mutations with an actual causal eect, e.g. because these mutations involve fewer individuals, which leads to a lower power to detect true determinants.

To simulate this scenario, we arbitrarily assign two columns of W (the second and the sixth) to have non-zero eects α, so l = 2. By construction, the rst columns of W represent a large fraction of the variation across strains. A non-zero eect α in the GLM Eq. ( 2.3) used to simulate resistance phenotypes therefore makes resistance associated with the population structure. We then select 10 distinct patterns from X as true determinants (i.e., coordinates j ∈ 1, . . . , r associated to non-zero eects β j ). To do so, we compute the largest dot product of each pattern with the rst six columns of W (two of which have non-zero eects α), and choose our true determinants among those whose largest dot product is below the fth percentile of dot products calculated across all patterns. This allows us to simulate the case where true determinants are independent from the population structure (their eect is not inated by the W α term). The odd ratios e β j are xed to 6 for these patterns. We also randomly select 290 patterns from X as non-determinants, i.e., with a β j = 0 eect in the model, so r = 300 in our simulation.

The population structure can lead to spurious discoveries, as we do not control the dot product between columns of W and these patterns with zero eect. Finally in order to control the amplitude of the population eect, we normalize W α to 6 times the median value of the | X j β j | across non-zero β j , where X j denotes the j-th columns of X.

We then apply the three versions of our univariate test described in Section Testing procedure to each of the patterns. For the xed eect correction, we use the rst 10 columns of W , and for the random eect correction we provide the entire W matrix to bugwas. We perform 100 repetitions of this simulation, and plot a Receiver Operating Characteristic (ROC) curve after pooling the results (Supplementary Figure S2.6). As expected, the test which does not account for the population structure has very low power to detect patterns associated with the phenotype: by construction, some patterns with zero actual eect have large dot products with W α which inates the estimate of their eect and leads to false discoveries. Taking the population structure into account in the model improves the power by limiting this ination.

Our second scenario is meant to illustrate the case where there is little population eect observed on the phenotype except for that caused by the association of modeled causal patterns X with W , i.e., outside of Xβ in Eq. (2.3). In other words, we assume that all the imbalance in proportion of resistant samples across clades is explained by patterns in the design X. This can happen if most of the true causal patterns are not too related to the population structure, e.g. because they appeared by homoplasy on several unrelated individuals and there is no imbalance. In this case, correcting for the population structure can decrease the estimated eect of causal patterns which do have some association with this structure, i.e., which were acquired by ancestors. To simulate this scenario, we use the same setting as before but we select the 10 true determinants among those that have a large dot product with W rather than a small one, and set all α eects to zero. We apply the same three tests as in the previous scenario over 100 data generations and plot a ROC curve. This time, we observe the opposite eect as in the previous scenario: correcting for the population structure decreases the power to detect true determinants. Assuming there is a population eect when there is no such eect in reality leads to articially deating CHAPTER 2. USING CDBG IN BACTERIAL GWAS: WHY AND HOW ? the estimated eects of patterns which are associated with the population structure.

Application on real data

We then turn to results obtained from real actual amikacin and levooxacin resistance measured on this panel.

True positive rate vs number of positive predicted Supplementary Figure S2.7A is produced by bugwas, and shows the p-value of the test for association of each column of W with the phenotype [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF]. In the case of amikacin, two columns are found to have a signicant eect at level 0.01, whereas all columns have p-values larger than 0.01 in the case of levooxacin. Accordingly, Supplementary Figure S2.7B shows that correcting for population structure increases the proportion of known genetic determinants of resistance to amikacin recovered for every number of predicted positives, but decreases this proportion in the case of levooxacin.

The results on the amikacin resistance phenotype are consistent with our rst simulation, where the population structure had a non-zero eect α on resistance: the estimated eect β of true determinants which are not associated with the population structure (low dot product between X and W α) is unaected by the presence of a population eect while the β of some patterns confounded with W α but with zero actual eect β are inated. The random eect approach of bugwas is a good choice on both simulated (Supplementary

True positive rate vs number of explored features

The analysis of Sections Phenotype simulation study and True positive rate vs number of positive predicted establishes that representing genomes by their unitig content in GWAS allows to discriminate between (reported) causal variants and other variants (including non-causal and unreported causal variants in our experiment on real resistance phenotypes). However necessary, this result does not illustrate an advantage of unitigs compared to xed-length kmers as both lead to the same set of presence/absence patterns and the analyses of both Sections only involve these patterns.

By contrast, Figure 2.12 shows the TPR for detecting reported causal variants for amikacin resistance as a function of the number of kmers and unitigs called positive from 1 to 10 6 . In other words, this metric indicates which proportion of reported causal variants is recovered after inspecting a given number of elements. The unitigs perform much better Figure 2.12: Proportion of true positive versus number of predicted positive kmers and unitigs for the rst 10 6 positive calls using bugwas on the amikacin resistance phenotype.

than the kmers in this metric because every false positive pattern typically leads to a very large number of false positive kmers, and a lower number of false positive unitigs.

This illustrates the fact that manipulating kmers is more cumbersome than unitigs as it is necessary to inspect, map and annotate more kmers than unitigs to recover the same number of causal variants.

Analysis of the selected haplotypes

We build the 5-neighboring DBGs from the 15 patterns with lowest bugwas p-values, for both amikacin and levooxacin resistance, as described in Section Making sense of the selected patterns using the compacted DBG. high prevalence in all strains (violet nodes), and forks that split between a red (resistant phenotype) and blue (sensitive phenotype) path. This matches the current knowledge about levooxacin resistance mechanism, mainly based on target alteration.

As discussed in Section Making sense of the selected patterns using the compacted DBG, the few connected components induced by the top 15 patterns are much easier to interpret than the corresponding large sets of xed-length kmers. We select 6 of these connected components (Supplementary Figure S2.8g, a, h and 6b, c, f) and extend their neighborhood up to distance 20 rather than 5 to illustrate the large variety of variants which are selected by our procedure.

SNP in an accessory gene (amikacin)

Figure 2.13A contains a quasi linear structure which evokes a polymorphic gene. The purple color of the structure suggests that the gene is more present in resistant than in sensitive samples, but that the dierential of presence is not very important the nodes would be red otherwise. In the middle of this structure (green box on the gure), the path forks into one blue and one red node, which suggests we have identied a SNP whose presence is associated with amikacin resistance. Note that we are able to make this interpretation regardless of any gene annotation, just by analyzing the topology of the graph component enriched by strain resistance information. Mapping the unitig sequences of this component onto our annotation reveals that the subgraph corresponds to the AAC accessory gene, whose presence is indeed known to be involved in P. aeruginosa resistance to amikacin. However, the selected event here is not the presence of the gene but the particular SNP within this gene.

SNP in a core gene (levooxacin)

Components D to F of Figure 2.13 describe SNPs in core genes. Like in the previous AAC SNP example, each of these subgraphs is a linear structure in which most nodes are present in the same proportion of resistant and sensitive individuals. The linear structure contains a fork which separates resistant (red) and sensitive (blue) samples. Mapping the unitigs on sample genomes reveals that the rst two components represent the wellknown gyrA (D) and parC (E) quinolone resistance-determining region (QRDR). The third subgraph corresponds to a gene which is not present in our resistance database: the hybrid sensor histidine kinase/response regulator (HS histidine kinase/RR). This gene may be found associated with resistance to levooxacin because it is in LD with a causal region, or may be itself causal.

Whole plasmid (amikacin)

Figure 2.13B shows a connected component with mostly red nodes assembled in a linear structure suggesting that this entire structure, as opposed to a point mutation, is involved in the detected event. This is in clear contrast with Figure 2.13A, where most of the linear structure is purple with a localized fork involving one red and one blue node. The unitigs of this subgraph corresponding to the top 15 patterns map to the pHS87b plasmid, which was recently described as being involved in resistance [START_REF] Bi | A site-specic integrative plasmid found in Pseudomonas aeruginosa clinical isolate HS87 along with a plasmid carrying an aminoglycoside-resistant gene[END_REF]. Our representation extracts the whole plasmid, with both its coding and noncoding regions which makes it easier to understand that the selected patterns correspond to an integration of this plasmid.

Noncoding region (amikacin)

The unitigs of the component represented in Figure 2.13C map to a noncoding region in the P. aeruginosa genomes. Interestingly, this region contains a path of unitigs strongly associated with resistance (colored in red). Not all of these unitigs belong to the top 15, but the DBG view highlights this long linear structure. This haplotype is not compacted as a single unitig because it is not either present or absent in each genome: some only contain parts of this haplotype.

Alternative approaches

Our approach is able to select and detect any kind of event where current methods could be limited to some regions or patterns. SNPs called against a reference genome are of limited interest in the context of P. aeruginosa because of the size of the species accessory genome; causal variants in the accessory genome not represented by the chosen reference would not be detected at all. Gene presence/absence and SNPs called in the pangenome would miss all events in noncoding regions, by construction. Even assuming that only coding We conjecture that using unitigs rather than xed-length kmers could also yield better estimates of the population structure. Typical estimators of this structure are based on representations of the genomes by their haplotypes rather than their unique patterns to avoid down-weighting haplotypes which map to the same presence/absence prole.

While duplicated unitigs only represent biological duplicates, i.e., regions in perfect LD, duplicates within kmers also account for neighbor sequence overlaps and can lead to arbitrary ination of the weight of single long haplotypes. Validating our conjecture that DBG nodes provide better population structure estimates than kmers and lead in turn to more power for detecting genetic determinants requires simulation of synthetic genomes from a given phylogeny and will be the subject of future work.

Finally an important improvement would be to generalize our representation to paths or more general subgraphs of the DBG, i.e., to larger haplotypes dened by conjunctions of those represented in unitigs. This could help lter out minor variations in the genome which are unrelated to resistance but prevent long haplotypes to be merged into a single node. The De Bruijn neigbhoring subgraphs we selected in our experiments suggest that this conguration happens frequently in practice.

Amikacin resistance

Concluding remarks

In this Chapter, we focused our attention in pan-cDBGs and how they could be of interest to improve bacterial GWAS. We studied the graph ability to represent variations and collapse repetitions, and found how their graphical representation could be useful to highlight phenotype-associated regions, by adding decorations (node colour and size).

We tested the use of bubbles to capture dierential presence of pairs of paths, however we found this representation not suitable enough to describe the polymorphic insertions of MGE. Because unitigs represent possibly conserved fragments of the inserted MGE sequence rather than a particular insertion of a specic variant as bubbles do they can carry the information of the insertion at the population level. We evaluated several strategies for modelling the relationship between the unitig presence/absence in the genomes and the phenotype, and dierent methods of population structure adjustment in the model. As a result, we selected the the R package bugwas [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF] which implements a linear mixed model.

From these considerations we designed a bacterial GWAS strategy and introduced a postprocessing producing a visualisation of the signicant unitigs based on decorated graphs.

We showed how this representation can help in the interpretation of the unitig sequences, proposing so a valuable extension to k-mer-based GWAS.

The manuscript describing this method was submitted in 2017 to the Intelligent Systems for Molecular Biology (ISMB) conference, but was not accepted. One of the major concerns expressed by the reviewers was that no real benchmark was presented: no comparison with previously developed approaches, including SNP/gene based GWAS, or demonstration of the memory usage and running time of the unitig approach. The scope of the study, only one P. aeruginosa panel of limited size, was reproached as it would have be more interesting to see how the method performed across dierent species, and how it scaled on larger panels . The claimed gain in interpretation did not convinced all the reviewers. Doubts were expressed about the added value of the subgraph representation (Appendix S2.1: Comments from ISMB referees).

In parallel however, the positive feedbacks obtained when presenting the method to (micro)biologists, and their wish to test it, encouraged us to improve the current implementation. Indeed it required some crucial improvements. First, the variant matrix production, based on KisSplice and Bowtie2, was computationally not ecient. Second, the complete pipeline was not fully integrated and we needed to launch several independent scripts to get the nal results. Last but not least, visualising the neighbour subgraphs was not straightforward: it required to have the Cytoscape software installed plus some basic knowledges of its usage. It required also complementary analyses to get the subgraphs sorted by signicance, or to get some gene annotation.

The development of this integrated tool is presented in the following Chapter. The new tool ended to be so dierent from the prototype presented in this Chapter, that it justied a new Chapter and a distinct manuscript submission. However, as both implementations are based on the same method, the content of both Chapters naturally overlaps.

Chapter 3

DBGWAS software for cDBG-based GWAS

Preamble

Convinced by the potential of cDBG for bacterial GWAS, we were committed to make this approach accessible to the scientic community. The subgraph representation in particular aroused a lot of interest around us. This motivated the development of a new integrated and ecient tool in collaboration with the LBBE/Erable Inria team. The solution was built mostly in C++, the language of GATB [START_REF] Drezen | GATB: genome assembly & analysis tool box[END_REF], a library for low memory and ecient DBG creation from NGS data. The new tool also used cystoscape.js JavaScript library [START_REF] Franz | Cytoscape.js: a graph theory library for visualisation and analysis[END_REF] to produce interactive graphical results without requiring any software installation. The tool usage was also simplied: only one command is called, which requires only one input le. Leandro Lima achieved these developments.

We designed the output together, in particular we chose to present rst a summary page with all subgraphs sorted by the minimal q-value found among each subgraph and oering a high level annotation; plus additional pages to navigate within each subgraph, with detailed metadata and annotations at the unitig level. We named this tool DBGWAS, a mix of DBG and GWAS. Methods: Here we introduce DBGWAS, an extended k-mer-based GWAS method producing interpretable genetic variants associated with distinct phenotypes. Relying on compacted De Bruijn graphs (cDBG), our method gathers cDBG nodes, identied by the association model, into subgraphs dened from their neighbourhood in the initial cDBG.

Results: DBGWAS is fast, alignment-free and only requires a set of contigs and phenotypes. It produces enriched subgraphs representing local polymorphisms as well as mobile genetic elements (MGE) and oers a graphical framework to interpret GWAS results. We validated our method using antibiotic resistance phenotypes for three bacterial species. DBGWAS recovered known resistance determinants such as mutations in core genes in Mycobacterium tuberculosis and genes acquired by horizontal transfer in Staphylococcus aureus and Pseudomonas aeruginosa along with their MGE context. It also enabled us to formulate new hypotheses involving genetic variants not yet described in the antibiotic resistance literature.

Conclusion:

Our method is computationally ecient and is able to retrieve phenotypeassociated genetic variants such as local polymorphisms and MGEs without relying on prior annotation or reference genomes. Experiments took one hour and a half on average, and produced a compact set of meaningful subgraphs, thereby facilitating the interpretation of the results.

Availability: Open-source tool available at https://gitlab.com/leoisl/dbgwas.

Author summary

Genome-wide association studies (GWAS) help explore the genetic bases of phenotype variation in a population. Our objective is to make GWAS amenable to bacterial genomes. These genomes can be too dierent to be aligned against a reference, even within a single species, making the description of their genetic variation challenging. We test the association between the phenotype and the presence in the genomes of DNA subsequences of length k the so-called k-mers. These k-mers provide a versatile descriptor, allowing to capture genetic variants ranging from local polymorphisms to insertions of large mobile genetic elements. Unfortunately, they are also redundant and dicult to interpret. We

Introduction

The aim of Genome-Wide Association Studies (GWAS) is to identify associations between genetic variants and a phenotype observed in a population. They have recently emerged as an important tool in the study of bacteria, given the availability of large panels of bacterial genomes combined with phenotypic data [START_REF] Alam | Dissecting vancomycinintermediate resistance in Staphylococcus aureus using genome-wide association[END_REF][START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF][START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Farhat | Genomic analysis identies targets of convergent positive selection in drug-resistant Mycobacterium tuberculosis[END_REF][START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF][START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF].

GWAS rely on a representation of the genomic variation as numerical factors. The most common approaches are based on single nucleotide polymorphisms (SNPs), dened by aligning all genomes of the studied panel against a reference genome [START_REF] Alam | Dissecting vancomycinintermediate resistance in Staphylococcus aureus using genome-wide association[END_REF][START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF][START_REF] Farhat | Genomic analysis identies targets of convergent positive selection in drug-resistant Mycobacterium tuberculosis[END_REF] or against a pangenome built from all the genes identied by annotating the genomes [START_REF] Page | Roary: rapid large-scale prokaryote pan genome analysis[END_REF], and on gene presence/absence, using a pre-dened collection of genes [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF]. The use of a reference genome becomes unsuitable when working on bacterial species with a large accessory genome the part of the genome which is not present in all strains. On the other hand, methods focusing on genes are unable to cover variants in noncoding regions, including those related to transcriptional and translational regulation [START_REF] Blair | Molecular mechanisms of antibiotic resistance[END_REF][START_REF] Zhang | Genome sequencing of 161 Mycobacterium tuberculosis isolates from China identies genes and intergenic regions associated with drug resistance[END_REF]. Moreover, some poorly studied species still lack a representative annotation [START_REF] Haft | RefSeq: an update on prokaryotic genome annotation and curation[END_REF].

To circumvent these issues and make bacterial genomes amenable to GWAS, recent studies have relied on k-mers: all nucleotide substrings of length k found in the genomes [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF]. The presence of k-mers in genomes can account for diverse genetic events such as the acquisition of SNPs, (long) insertions/deletions and recombinations. Unlike SNP-or genebased approaches, k-mer analyses do not require a reference genome or any assumption on the nature of the causal variants and can even be performed without assembling the genome sequences [START_REF] Bras | Colib'read on galaxy: a tools suite dedicated to biological information extraction from raw NGS reads[END_REF].

While k-mers can reect any genomic variation in a panel, they do not themselves represent biological entities. Translating the result of a k-mer-based GWAS into meaningful genetic variants typically requires mapping a large and redundant set of short sequences [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF][START_REF] Rahman | Association mapping from sequencing reads using k-mers[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF]. Recent studies have suggested reassembling the signicantly associated k-mers to reduce redundancy and retrieve longer marker sequences [START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF][START_REF] Rahman | Association mapping from sequencing reads using k-mers[END_REF]. Nonetheless, k-mer representation often loses in interpretability what it gains in exibility, and the best way to encode the genomic variation in bacterial GWAS is not yet clearly dened [START_REF] Power | Microbial genome-wide association studies: lessons from human GWAS[END_REF][START_REF] Read | Characterizing the genetic basis of bacterial phenotypes using genome-wide association studies: a new direction for bacteriology[END_REF].

Our approach, coined DBGWAS, for De Bruijn Graph GWAS, bridges the gap between, on the one hand, SNP-and gene-based representations lacking the right level of exibility to cover complete genomic variation, and, on the other hand, k-mer-based representations which are exible but not readily interpretable. We rely on De Bruijn graphs [START_REF] De Bruijn | A combinatorial problem[END_REF] (DBGs), which are widely used for de novo genome assembly [START_REF] Pevzner | An Eulerian path approach to DNA fragment assembly[END_REF][START_REF] Zhang | A practical comparison of de novo genome assembly software tools for next-generation sequencing technologies[END_REF] and variant calling [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF][START_REF] Bras | Colib'read on galaxy: a tools suite dedicated to biological information extraction from raw NGS reads[END_REF]. These graphs connect overlapping k-mers (here DNA fragments), yielding a compact summary of all variations across a set of genomes. DBGWAS relies on the ability of compacted DBGs (cDBGs) to eliminate local redundancy, reect genomic variations, and characterise the genomic environment of a k-mer at the population level. More precisely, we build a single cDBG from all the genomes included in the association study (in practice, up to thousands). The graph nodes called unitigs represent, by construction, sequences of variable length and are at the right level of resolution for the set of genomes considered, taking into account adaptively the genomic variation. The unitigs are individually tested for association with the phenotype, while controlling for population structure. The unitigs found to be phenotype-associated are then localised in the cDBG. Subgraphs induced by their genomic environment are extracted. They often provide a direct interpretation in terms of genetic events which results from the integration of three types of information: 1) the topology of the subgraph, reecting the nature of the genetic variant, 2) the metadata represented by node size and colour, allowing us to identify which unitigs in the subgraph are associated to a particular phenotype status, and 3) an optional sequence annotation helping to detect unitig mapping to or near a known gene. We benchmarked our novel method using several antibiotic resistance phenotypes within three bacterial species of various degrees of genome plasticity: Mycobacterium tuberculosis, Staphylococcus aureus and Pseudomonas aeruginosa. The subgraphs built from signicant unitigs described SNPs or insertions/deletions in both core and accessory regions, and were consistent with results obtained with a resistome-based association study. In addition, novel genotype-to-phenotype associations were also suggested.

Results

We developed DBGWAS, available at https://gitlab.com/leoisl/dbgwas, and validated it on panels for several bacterial species for which genome sequences and antibiotic resistance phenotypes were available. DBGWAS comprises three main steps: it rst builds min q

1 2 3 4 …. p input output
Step 1

Step 2

Step 3

Genome draft assemblies Phenotype data

Variant matrix building

Variant association

Postprocessing of significant variants

Phenotype-associated genetic events

0 1 0 .. .. 1 2 3 .. n 0 1 1 .. ..

= X

• Linear mixed model to account for the population structure;

Y = X i +W T + i i in 1… p >str1_contig1 catgtgctagtgtcg cagtgtcgtgtagct …
• DBG construction;

• DBG compaction;

• Strain mapping.

• Local neighborhood retrieval around significant unitigs; • Graph decoration with phenotype and statistical data, and annotations databases; • Visualization on web browsers;

Tool: GATB [START_REF] Drezen | GATB: genome assembly & analysis tool box[END_REF] Tool: bugwas [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF] Tools: Boost (boost.org) _____-Blast+ [START_REF] Camacho | BLAST+: architecture and applications[END_REF]) _____-Cytoscape.js [START_REF] Franz | Cytoscape.js: a graph theory library for visualisation and analysis[END_REF] X 92 CHAPTER 3. DBGWAS SOFTWARE FOR CDBG-BASED GWAS For each antibiotic, we report subgraphs with their rank, number of signicant unitigs over all unitigs in the subgraph (Sign. unitigs), q-value of the unitig with the lowest q-value (minq), the corresponding estimated eect ( β coecient of the linear mixed model) and annotation of the subgraph. The type of event represented by the subgraph is colour-coded as: yellow for MGE, light blue for local polymorphism in gene (LPG), and dark blue for local polymorphism in noncoding region (LPN). Known resistance markers are indicated in dark green (Pos), determinants whose presence was described to be caused by co-resistance in orange (CR), unknown variants arriving at the rst rank in grey (Ukn). For other subgraphs, an r 2 value relative to the rst subgraph is provided as an estimation of linkage disequilibrium with the rst subgraph. It was computed between the most signicant patterns of the rst and the considered subgraphs.

Coloured bubbles highlight local polymorphism in core genes, accessory genes and noncoding regions For P. aeruginosa levooxacin resistance, the subgraph obtained with the lowest min q highlighted a polymorphic region in a core gene (Fig 3 .3A). Indeed, it showed a linear structure containing a complex bubble, with a fork separating susceptible (blue) and resistant (red) strains. The annotation revealed that all unitigs in this subgraph mapped to the quinolone resistance-determining region (QRDR) of the gyrA gene. gyrA codes for a subunit of the DNA gyrase targeted by quinolone antibiotics such as levooxacin and its alteration is therefore a prevalent and ecient mechanism of resistance [START_REF] Hooper | Mechanisms of drug resistance: quinolone resistance[END_REF][START_REF] Lowy | Antimicrobial resistance: the example of Staphylococcus aureus[END_REF]. In all our experiments related to quinolone resistance, DBGWAS identied QRDR mutations in either gyrA or parC, which codes for another well-known quinolone target: P. aeruginosa levooxacin (rst subgraph, gyrA: min q = 7.21 × 10 -29 and second, parC : 5.68 × 10 -06 ), S. aureus ciprooxacin (rst, parC : min q = 8.67 × 10 -104 and second, gyrA: 2.21 × 10 -76 ), and ooxacin resistance in M. tuberculosis, whose genome does not contain the parC gene [START_REF] Piton | Structural insights into the quinolone resistance mechanism of Mycobacterium tuberculosis DNA gyrase[END_REF] (rst, gyrA: min q = 9.66 × 10 -144 ). For P. aeruginosa amikacin resistance, the top subgraph (min q = 5.86 × 10 -9 ) highlighted a SNP in an accessory gene (Fig 3 .3B). As in Fig 3 .3A, it contained a fork separating a blue and a red node. However, other remaining nodes were not grey: they represented an accessory sequence because they were not present in all the strains. Most of these nodes were pale-red, showing that the accessory sequence was more frequent in resistant samples. The annotation revealed that this subgraph corresponded to aac(6'), a gene coding for an aminoglycoside 6-acetyltransferase, an enzyme capable of inactivating aminoglycosides, such as amikacin, by acetylation [START_REF] Lambert | Mechanisms of antibiotic resistance in Pseudomonas aeruginosa[END_REF]. Most unitigs in this gene had a low association with resistance, except for the ones describing this particular SNP. Mapping the sequence of these unitigs on the UniProt database [197] revealed an amino-acid change at L83S, right in the enzyme binding site. This SNP was previously shown to be responsible for substrate specicity alteration in a strain of Pseudomonas uorescens [START_REF] Lambert | A spontaneous point mutation in the aac(6')-Ib' gene results in altered substrate specicity of aminoglycoside 6'-N -acetyltransferase of a Pseudomonas uorescens strain[END_REF]. It appears to increase the amikacin acetylation ability of aac(6'), making its association to amikacin resistance more signicant than the gene presence itself. Finally, for M. tuberculosis ethionamide resistance, the top subgraph (min q = 7.86×10 -11 , Fig 3 .3C) represented a polymorphic region in a core gene promoter. The subgraph was mostly grey and linear with a localised blue and red fork. The most reliable annotation for this subgraph was fabG1 (also known as mabA), a core gene previously shown to be involved in ethionamide and isoniazid resistance [START_REF] Farhat | Genetic determinants of drug resistance in Mycobacterium tuberculosis and their diagnostic value[END_REF][START_REF] Lee | Exclusive mutations related to isoniazid and ethionamide resistance among Mycobacterium tuberculosis isolates from Korea[END_REF]. None of the signicantly associated unitigs mapped to the fabG1 gene, but their close neighbours did (highlighted in Fig 3 .3C by black circles), suggesting that the detected variant was located in the promoter region of the gene. This was conrmed by mapping the signicant unitig sequences using the Tuberculosis Mutation database of the mubii resource [START_REF] Flandrois | MUBII-TB-DB: a database of mutations associated with antibiotic resistance in Mycobacterium tuberculosis[END_REF].

Long single-coloured paths denote mobile genetic element insertions

For S. aureus resistance to methicillin, the top subgraph (min q = 7.68 × 10 -188 ), shown in Fig 3 .3D, revealed a gene cassette insertion. It contained a long path of red nodes, and a branching region including another red node path. The rst path mapped to the mecA gene, extensively described in this context and known to be carried by the Staphylococcal Cassette Chromosome mec (SCCmec) [START_REF] Gordon | Prediction of Staphylococcus aureus antimicrobial resistance by whole-genome sequencing[END_REF][START_REF]Classication of staphylococcal cassette chromosome mec (SCCmec): guidelines for reporting novel SCCmec elements[END_REF][START_REF] Lowy | Antimicrobial resistance: the example of Staphylococcus aureus[END_REF]. The other part of the subgraph represented a >5,000 bp fragment of the cassette. It was less linear because it summarised several types of the cassette diering by their structure and gene content [START_REF]Classication of staphylococcal cassette chromosome mec (SCCmec): guidelines for reporting novel SCCmec elements[END_REF]. The next subgraphs represented other regions of the same cassette. Interestingly, retaining a greater number of unitigs to build the subgraphs leads to merging these individual subgraphs, Colours are continuously interpolated between blue for susceptible unitigs and red for resistant ones. Untested unitigs, present in > 99% or < 1% of the strains, are shown in grey. Nodes found to be not signicative are shown with a transparency degree. The node size relates to its allele frequency: the larger the node, the higher the allele frequency. Circled black nodes map to annotated genes. The two tables in each panel provide information on the sugraph nodes. As an example, the subgraph in panel (A) is composed of 27 unitigs, 5 of which were signicantly associated with resistance. All unitigs of this subgraph mapped to the gyrA gene. The subgraphs presented in the four other panels correspond to the top subgraphs (with lowest minq) obtained for dierent panels/phenotypes. All subgraphs are snapshots taken from DBGWAS interactive visualisation and are available online.

representing related genomic regions, into a single one. This can be done by increasing the Signicant Features Filter (SF F ) parameter value, which denes the unitigs used to build the subgraphs. By default, the unitigs corresponding to the 100 lowest q-values are retained (SF F = 100). Increasing the SF F value to 150 (150th q-value = 1.60 × 10 -27 ) allowed us to reconstruct the entire SCCmec cassette, as shown in S3.6 Suppl.

MANUSCRIPT ACCEPTED FOR PUBLICATION IN PLOS GENETICS (2018)

For S. aureus erythromycin resistance, a unique subgraph was generated (min q = 2.69 × 10 -100 ). As shown in Fig 3 .3E, the subgraph described the circular structure of a 2,500 bplong plasmid known to carry the causal ermC gene together with a replication and maintenance protein in strong linkage disequilibrium with ermC [START_REF] Gordon | Prediction of Staphylococcus aureus antimicrobial resistance by whole-genome sequencing[END_REF][START_REF] Westh | Prevalence of erm gene classes in erythromycin-resistant Staphylococcus aureus strains isolated between 1959 and 1988[END_REF]. For P. aeruginosa amikacin resistance, the third subgraph (min q = 2.21 × 10 -6 ) represented a 10,000 bp plasmid acquisition. Using the NCBI nucleotide database [16], most of the unitigs in this subgraph mapped to the predicted prophage regions of an integrative and conjugative plasmid, whose structure corresponds to a plasmid, pHS87b, recently described in the amikacin resistant P. aeruginosa HS87 strain [START_REF] Bi | A site-specic integrative plasmid found in Pseudomonas aeruginosa clinical isolate HS87 along with a plasmid carrying an aminoglycoside-resistant gene[END_REF]. S3.7 Suppl and S3.8 Suppl provide more examples of MGEs recovered by DBGWAS, and the Interpretation of signicant unitigs (step 3) subsection of the Methods section discusses SF F default value and tuning.

DBGWAS reports expected variants without prior knowledge

Although resistance determinants are not perfectly or exhaustively known for all species, some resistance mechanisms are well described. This is the case of gyrA and parC alteration in uoroquinolone resistance in P. aeruginosa [START_REF] Hooper | Mechanisms of drug resistance: quinolone resistance[END_REF], and of the alteration of two streptomycin targets: the ribosomal protein S12 (coded by rpsL) and the 16S rRNA (coded by rrs) in M. tuberculosis [START_REF] Palomino | Drug resistance mechanisms in Mycobacterium tuberculosis[END_REF]. Here we verify the ability of bacterial GWAS methods to recover these known mechanisms. We compared DBGWAS results to those obtained by applying the same association model to a collection of known resistance genes and SNPs [START_REF] Davis | Antimicrobial resistance prediction in PATRIC and RAST[END_REF][START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF] (see the Resistome-based association studies subsection of the Methods section), and to two other recent k-mer-based methods: pyseer [START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF][START_REF] Lees | pyseer: a comprehensive tool for microbial pangenome-wide association studies[END_REF], and HAWK [START_REF] Rahman | Association mapping from sequencing reads using k-mers[END_REF]. For P. aeruginosa levooxacin resistance (Table 3.2), both DBGWAS and pyseer identied the two expected known causal determinants reported by the prior resistome-based study: gyrA and parC, while HAWK only reported gyrA. pyseer reported 224 k-mers, all mapping to gyrA and parC, while the other methods reported less than 10 features (subgraphs or reassembled k-mers), among which were several unknown, potentially new candidate markers. databases (see Interpretation of signicant unitigs (step 3) subsection of the Methods section), and completed when needed by Blast on NCBI Nucleotide database. Green cells correspond to resistance determinants already described in the literature. Grey cells represent unknown determinants. Within each category, annotations are ordered by increasing minimum p/q-values. p/q-values are reported only for the most signicant annotations. For each method, the annotation with the lowest p/q-values is underlined. `NC' means noncoding region and `tnp' transposase.

CHAPTER 3. DBGWAS SOFTWARE FOR CDBG-BASED GWAS

For M. tuberculosis streptomycin resistance (Table 3.3), the four methods reported the two expected known causal determinants rpsL and rrs. However, while the resistomebased study and DBGWAS methods ranked the causal rpsL determinant rst, pyseer and HAWK reported their lowest p/q-values for the false positive katG determinant. katG and other false positives caused by co-resistance were among the top-ranked features for all methods and this is a well described phenomenon in M. tuberculosis species [START_REF] Palomino | Drug resistance mechanisms in Mycobacterium tuberculosis[END_REF][START_REF] Traore | Detection of rifampicin resistance in Mycobacterium tuberculosis isolates from diverse countries by a commercial line probe assay as an initial indicator of multidrug resistance[END_REF]. Additional results for all antibiotics can be found in S3.10 Suppl and S3.11 Suppl for resistome-based association studies, and in S3.2 Suppl and S3.4 Suppl for DBGWAS.

DBGWAS provides novel hypotheses

In addition to resistance markers, all three k-mer-based approaches reported several unknown variants, not described in the context of resistance. Among them, in the context of streptomycin resistance, a noncoding region between a transposase and a PPE-family pro-tein was reported by the three methods but, as expected, not by the resistome-based approach, as only resistance genes were included in this analysis. More generally, knowledgebased approaches such as SNP-, gene-or resistome-based GWAS can be limited in the context of new marker discovery, since any causal variant absent from the chosen reference would remain untested. Besides being time-consuming, preparing such a list of genetic variants can be problematic for bacterial species without extensive annotation or reference availability. Here we describe associations identied by DBGWAS and which were never described in the antibiotic resistance literature.

In our P. aeruginosa panel, the second subgraph obtained for amikacin resistance ( min q = 1.37 × 10 -6 ) gathered unitigs mapping to the 3' region of a DEAD/DEAH box helicase, known to be involved in stress tolerance in P. aeruginosa [START_REF] Illakkiam | Genome sequencing of a mung bean plant growth promoting strain of P. aeruginosa with biocontrol ability[END_REF]. The unitig with the lowest q-value was present in 13 of 47 resistant strains and in only 1 of 233 susceptible strains and represented a C-C haplotype summarising two mutated positions: 2097 and 2103. This annotation was not an artefact of the population structure, properly taken into account by the linear mixed model. Indeed the 13 resistant strains corresponded to distinct clones belonging to two phylogroups, one of them containing the susceptible strain. In P. aeruginosa levooxacin resistance, the third subgraph (min q = 1.87×10 -2 ) represented a L650M amino-acid change in a hybrid sensor histidine kinase/response regulator. Such two-components regulatory systems play important roles in the adaptation of organisms to their environment, for instance in the regulation of biolm formation in P. aeruginosa [START_REF] Ali-Ahmad | Structural and functional insights into the periplasmic detector domain of the GacS histidine kinase controlling biolm formation in Pseudomonas aeruginosa[END_REF],

and as such may play a role in antibiotic resistance.

In S. aureus, polymorphisms within genes not known to be related to resistance were identied for several antibiotics: purN (min q = 2.02 × 10 -22 ) for fusidic acid, odhB (min q = 1.49 × 10 -33 ) for gentamicin, ybaK and mqo1 (min q = 9.30 × 10 -18 , resp.

6.82 × 10 -10 ) for trimethoprim. None of these genes have been associated with antibiotic resistance before, to the best of our knowledge.

In M. tuberculosis, polymorphisms in two genes encoding proteins involved in cell wall and cell processes, espG1 and espA, were found associated with streptomycin (seventh subgraph, min q = 9.43×10 -4 ) and XDR phenotype (third subgraph, min q = 9.58×10 -36 ), respectively. Again, these genes have never been reported in association with antibiotic resistance before.

Although experimental validation would be required to tell whether these hypotheses are false positive (e.g., in linkage with causal variants) or actual resistance mechanisms not yet documented, DBGWAS is a valuable tool to screen for novel candidate markers.

Moreover it provides a rst level of variant description (SNPs in gene or promoter, MGE, etc) which can directly drive the biological validation.

DBGWAS facilitates the interpretation of k-mer-based GWAS

Other k-mer-based approaches are as agnostic as DBGWAS and were also able to provide novel hypotheses, but interpreting their output can prove more challenging than a SNP/gene-based GWAS. In the M. tuberculosis streptomycin resistance experiment for example, they reported several thousands of features, while DBGWAS reported only 24 annotated subgraphs without missing any expected determinant (see Table 3.3). The thousands of k-mers generated by HAWK and pyseer are of course also amenable to interpretation: to build our Table 3.3, we mapped these k-mers to references and extracted annotated variants which showed at least one hit. However, doing so required additional eorts and a working knowledge of the most appropriate annotated references. In addition, k-mers which do not map to the chosen reference cannot be interpreted. By contrast, DBGWAS always returns a subgraph containing these k-mers. Even when no annotation 98 CHAPTER 3. DBGWAS SOFTWARE FOR CDBG-BASED GWAS exists, the topology and colours of the subgraphs may hint towards the nature of the causal variant.

In addition to providing context for signicant k-mers and guiding their interpretation as SNPs or MGEs, DBGWAS clustering of close variants into a subgraph can describe hypervariable regions as single entities, and highlight highly associated haplotypes. As an example, the top subgraph for rifampicin resistance (min q = 4.84 × 10 -70 ) contained 36 signicant unitigs, distinguishing between susceptible (blue) and resistant (red) strains.

Instead of a single point mutation, this subgraph represented a polymorphic region known as the rifampicin resistance-determining region (RRDR) of the rpoB gene. The unitig with the lowest q-value covered several mutant positions, dening a particular haplotype strongly associated with rifampicin resistance. Where DBGWAS reported in this case only one subgraph, pyseer, for instance, reported 470 k-mers with the rpoB annotation, and the resistome-based association study reported in this case 4 distinct SNPs in rpoB (S3.10 Suppl). In another user-submitted example, DBGWAS identied mosaic alleles of three pbp genes involved in beta-lactam resistance of Streptococcus pneumoniae. Like in the RRDR example, it returned ve subgraphs corresponding to the three genes three subgraphs were annotated pbp2x and represented three distinct polymorphic regions of the gene. Each subgraph summarised the polymorphism of the gene, as opposed to one separate feature for each SNP. Admittedly, some subgraphs output by DBGWAS are not readily interpretable: they are neither coloured bubbles highlighting SNPs, nor long single-coloured paths denoting MGE insertions. This was the case of several subgraphs produced for P. aeruginosa amikacin resistance, and presented in S3.9 Suppl. Genetic variants inserted in variable regions, for example, lead to subgraphs with a high average degree, or to very large subgraphs. The fourth subgraph for instance (min q = 2.21 × 10 -6 ) contains a path of three red (positively-associated) nodes lying in a noncoding region between variable accessory genes. Consequently, their neighbour unitigs branch to various other unitigs, making the structure complex and hard to interpret. Complex subgraphs also arise when several associated variants have overlapping neighbourhoods (as dened in the Graph neighbourhoods subsection in the Methods section, and tuned with the nh parameter) in at least one strain. This is the case for the subgraph with the smallest min q which aggregates aac( 6) acetyltransferase and the CML eux pump.

The interpretation of such subgraphs is not straightforward. We often found it helpful to tune the nh and SF F parameters to break large subgraphs into a set of smaller ones, as discussed in the Methods section. For the aac( 6) subgraph, where nearby variants are aggregated into a large subgraph, reducing the SF F value to 15 provided a much smaller and easier-to-interpret subgraph focusing on the aac( 6) mutation (Fig 3 .3B). Otherwise, we recommend to focus on the topology of the most signicant unitigs and their close neighbours.

DBGWAS is fast, memory-ecient, and scales to very large panels

To assess the scalability of DBGWAS to large datasets, we retrieved 5,000 genomes from M. tuberculosis, 9,000 genomes from S. aureus and 2,500 genomes from P. aeruginosa, as described in the Large panels subsection of the Methods section. We present in S3.12 Suppl the runtime and memory usage performances for these panels. All 180 runs took less than 5 days and 250 GB of RAM on 8 cores. Both the computational time and memory usage increase log-linearly with the panel size. Moreover, at equal panel size, DBGWAS performance also depends on the genome complexity, requiring less computational resource for more clonal genomes such as M. tuberculosis.

We also compared the computational performance of DBGWAS with pyseer and HAWK.

The benchmark was performed on 13 datasets, including one large dataset of 2,500 genomes for each of the 3 species (see the Datasets subsection in the Methods section for details). Detailed results are presented in S3.13 Suppl. DBGWAS was the fastest tool in 11 out of 13 experiments, always taking less than 2 hours. HAWK ran in less than 10 hours in 12 out of 13 experiments, and was a little faster than DBGWAS on two of the large-scale datasets. pyseer took from 13 to 53 hours on 9 experiments, and failed on the 4 others: one exceeded the disk space limit of 1TB, three exceeded the runtime limit of ve days. HAWK was more parsimonious in memory usage than DBGWAS on the large scale panels. This can be explained by the fact that the 0.8.3-beta version of HAWK which we are using does not take into account the population structure, and as such does not have to compute an n × n covariance matrix, providing it a large gain in memory usage and, to a lesser extent, runtime for large panels. On the other hand, disregarding the population structure could also lead to spurious discoveries. HAWK v0.9.8-beta oers an adjustment but failed to recover the known true positives, which is why we chose to present the results of the 0.8.3-beta version. DBGWAS and HAWK typically used one order of magnitude less memory than pyseer. The most memory-consuming step for pyseer was the k-mer counting step relying on fsm-lite.

Discussion

In this article we introduce an ecient method for bacterial GWAS. Our method is agnostic: it considers all regions of the genomes and is able to identify potentially new causal variants as dierent as SNPs in noncoding regions and MGE insertions/deletions. It performs as well as the current SNP-and gene-based gold standard approaches for retrieving known determinants, from genome pre-assemblies and without relying on annotations or reference genomes. DBGWAS exploits the genetic environment of the signicant k-mers through their neighbourhood in the cDBG, providing a valuable interpretation framework. Because it uses only contig sequences as input, it allows GWAS on bacterial species for which the genomes are still poorly annotated or lack a suitable reference genome. DBGWAS makes bacterial GWAS possible in two hours using a single-core computer (see S3.14 Suppl), outperforming other state-of-the-art k-mer-based approaches. Underlying our method, graph-based genome sequence representations such as DBGs, extend the notion of the reference genome to cases where a single sequence stops being an appropriate approximation [START_REF] Marschall | Computational pan-genomics: status, promises and challenges[END_REF][START_REF] Paten | Genome graphs and the evolution of genome inference[END_REF]. As demonstrated in this paper, they pave the way to GWAS on highly plastic bacterial genomes and could also be useful for microbiomes [START_REF] Baaijens | De novo assembly of viral quasispecies using overlap graphs[END_REF] or human tumours [START_REF] Rahman | Association mapping from sequencing reads using k-mers[END_REF]. DBGWAS currently relies on the Benjamini-Hochberg procedure to control the FDR and oers no advance exploiting the dependence among presence/absence patterns. An important improvement would be to control the false discovery rate at the subgraph level instead of the unitig level. DBGWAS could be extended to dierent statistical tasks by adapting its underlying association model, to allow for continuous phenotypes or identify epistatic eects, for instance. The interpretability of the extracted subgraphs could also be improved by training a machine learning model to predict which types of event they represent [START_REF] Jaillard | Fine mapping of antibiotic resistance determinants[END_REF]. This automated labelling could guide users in their interpretation and allow them to search for specic events, such as SNPs in core genes or rearrangements. Several recent studies describe in silico models for dening a genomic antibiogram and hopes are high that such technologies will complement the classic phenotypic methods [START_REF] Dunne | Microbial genomics and antimicrobial susceptibility testing[END_REF]. Several studies have already demonstrated that in some cases, genomic antibiograms can 100 CHAPTER 3. DBGWAS SOFTWARE FOR CDBG-BASED GWAS be at least as good as phenotypic ones [START_REF] Bradley | Rapid antibiotic-resistance predictions from genome sequence data for Staphylococcus aureus and Mycobacterium tuberculosis[END_REF][START_REF] Gordon | Prediction of Staphylococcus aureus antimicrobial resistance by whole-genome sequencing[END_REF][START_REF] Kos | The resistome of Pseudomonas aeruginosa in relationship to phenotypic susceptibility[END_REF][START_REF] Moradigaravand | Precise prediction of antibiotic resistance in Escherichia coli from full genome sequences[END_REF]. Contrary to our approach, these studies require extensive resistance marker databases. DBGWAS will surely contribute to the extension of such databases or to the development of agnostic genomic antibiograms. In conclusion, we demonstrate for three medically important bacterial species that resistance markers can be detected rapidly with relative ease, using simple computer equipment. Our integrated software and visualisation tools oer an intuitive variant representation, hence will provide future users with an enhanced insight into genotype to phenotype correlations, in all domains of microbiology, beyond that of antibiotic resistance. This will include complex traits such as biolm formation, epidemicity and virulence.

Methods

Encoding genomic variation with compacted DBGs

DBGs are directed graphs that eciently represent all the information contained in a set of sequences. Nodes represent all the unique k-mers (genome sequence substrings of length k) extracted from the input sequences. Edges represent (k -1)-exact-overlaps between k-mers: an edge connects a node n 1 to a node n 2 if and only if the (k -1)-length-sux of n 1 equals the (k -1)-length-prex of n 2 (Fig 3 .1A). These graphs can be compacted into cDBGs by merging linear paths (sequences of nodes not linked to more than two other nodes) into a single node referred to as a unitig [START_REF] Butler | ALLPATHS: de novo assembly of whole-genome shotgun microreads[END_REF][START_REF] Chikhi | Compacting de Bruijn graphs from sequencing data quickly and in low memory[END_REF][START_REF] Zerbino | Velvet: algorithms for de novo short read assembly using de Bruijn graphs[END_REF] (Fig 3 .1C). Compaction yields a graph with locally optimal resolution: regions of the genome which are conserved across individuals are represented by long unitigs, while regions which are highly variable are fractioned into shorter unitigs (S3.1 Suppl).

Representing strains by their unitig content (step 1) cDBG construction

We build a single DBG from all genomes given as input using the GATB C++ library [START_REF] Drezen | GATB: genome assembly & analysis tool box[END_REF]. We start from contigs rather than reads and, consequently, we do not need to lter out low abundance k-mers, allowing for the exploration of any variation present in the set of input genomes. We then compact the DBG using a graph traversal algorithm, which identies all linear paths in the DBG each forming a unitig in the cDBG. During this step, we also associate each k-mer index to its corresponding unitig index in the cDBG. There is no general rule for choosing the ideal k-mer length as it depends on many factors, including the assembly quality, complexity of the input genomes, or presence of repeats. High values of k lead to haplotypes containing multiple SNPs instead of distinct single SNPs, if these SNPs are separated by less than k bases. As k increases, the k-mer-dened haplotypes also become more specic to a genome sub-population, leading to a loss of power to detect genotype to phenotype associations. Low values of k, on the other hand, produce highly connected sets of non-specic k-mers. In particular, any repeated region with at least k bases may create a cycle in the DBG (Fig 3 .4). We use k = 31 by default, as it produced the best performance to retrieve known markers of P. aeruginosa resistance to amikacin and levooxacin (Fig 3 .5). We found DBGWAS results to be robust to small variations of k between 21 and 41. Similar graph structures were generated whatever the tested value of k for the clonal M. tuberculosis species (S3.15 Suppl). More variability was observed for P. aeruginosa resistance to amikacin, which involves more complex resistance mechanisms (S3.16 Suppl).

Unitig presence across genomes

Each genome is represented by a vector of presence/absence of each unitig in the cDBG.

To do so, we query the unitig associated to each k-mer in a given genome. This procedure is ecient because it relies on constant time operations. Firstly, we use GATB's Minimal Perfect Hash Function (MPHF) [START_REF] Limasset | Fast and scalable minimal perfect hashing for massive key sets[END_REF] to retrieve the index of a given k-mer, and then we use the previously computed association between k-mer and unitig indices to know which unitigs the given genome contains. Since these two operations take constant time, producing this vector representation for a genome takes linear time on the size of the genome. It is important to note that the GATB's MPHF can be successfully applied here because we always use the same list of k-mers, i.e., after building the DBG, the set of k-mers is xed and not updated, and because we always query k-mers that are guaranteed to be in the DBG (since we do not lter out any k-mer).

The unitig description on all the input genomes is stored into a matrix U :

U i,j =
1, if the j-th unitig is present in the i-th input genome; 0, otherwise. We then transform the matrix U into Z, which represents the minor allele description, in terms of presence [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF]: Z is identical to U except for columns with a mean larger than 0.5, which are complemented: Z j = 1 -U j for these columns. We then restrict Z to its set of unique columns. If several unitigs have the same minor allele presence pattern, then they will be represented by a single column. Keeping duplicates would lead to performing the same statistical test several times. Finally, we lter out columns whose average is below 0.01 the user can specify this threshold using the -maf option. We denote the de-duplicated, ltered matrix of patterns by X. Importantly, both k-mers and unitigs lead to the same set of distinct patterns across the genomes. Indeed, every unitig represents (at least) one k-mer, and conversely every k-mer is represented by one (single) unitig. When de-duplicated, the two representations therefore lead to the same set of patterns to be tested for association with the phenotype.

Testing unitigs for association with the phenotype (step 2)

Human GWAS literature extensively discusses how testing procedures can result in spurious associations if the eect of the population structure is not taken into account [START_REF] Balding | A tutorial on statistical methods for population association studies[END_REF][START_REF] Widmer | Further improvements to linear mixed models for genome-wide association studies[END_REF][START_REF] Zhou | Ecient multivariate linear mixed-model algorithms for genome-wide association studies[END_REF]. Population structures can be strong in bacteria because of their clonality [48,[START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Falush | Genome-wide association mapping in bacteria[END_REF][START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF]]. An additional performance analysis comparing several models for population structure, on both simulated and real data, showed that correcting for population structure using LMMs is often preferable to using a xed eect correction or not correcting at all (Appendix S3.1: Evaluation of association models). We thus rely on the bugwas method [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF], which uses the linear mixed model (LMM) implemented in the GEMMA library [START_REF] Zhou | Genome-wide ecient mixed-model analysis for association studies[END_REF], to test for association with phenotypes while correcting for the population structure. This method also oers the possibility to test for lineage eects, by calculating p-values for association between the columns of the matrix representing the population structure, and the phenotype [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF]. DBGWAS optionally provides bugwas lineage eect plots when the user species a phylogenetic tree using the -newick option. An example of the generated gures is available online2 . Formally, the LMM represents the distribution of the binarized phenotype Y i , given the j-th minor allele pattern X ij and the population structure represented by a set of factors W ∈ R n p , by:

Y i = X ij β + W T i α + ε ij , j = 1, . . . , p. (3.1)
β is the xed eect of the tested candidate on the phenotype, α ∼ N (0, σ 2 a ), σ 2 a > 0 is the random eect of the population structure, and ε ij iid ∼ N (0, σ 2 ) are the residuals with variance σ 2 > 0. W is estimated from the Z matrix, which includes duplicate columns representing both core and accessory genome. More precisely, denoting Z = U ΛV the singular value decomposition of Z, we use W = U Λ. We test H 0 : β = 0 versus H 1 : β = 0 in Eq 3.1 for each pattern using a likelihood ratio procedure producing p-values and maximum likelihood estimates β. To tackle the situation of multiple testing caused by the high number of tested patterns, we compute q-values, which are the Benjamini-Hochberg transformed p-values controlling for false discovery rate (FDR) [START_REF] Benjamini | Controlling the false discovery rate: a practical and powerful approach to multiple testing[END_REF].

Interpretation of signicant unitigs (step 3)

The LMM is used to identify de-duplicated minor allele presence patterns signicantly associated with the phenotype at a chosen FDR level. While the testing step is done at the pattern level, the interpretation of the selected features is done at the unitig level.

As a result of the de-duplication procedure, a given pattern may correspond to several distinct unitigs. To faithfully interpret the results, all the unitigs corresponding to the signicant patterns are retrieved and are assigned the q-value of their pattern. We now show how the initial cDBG can be used in the interpretation step.

Signicance threshold

The interpretation step focuses on the unitigs with the lowest q-values. These unitigs are indeed used to build the resulting annotated subgraphs. The unitig selection can be either based on the FDR (q-value thresold) or on a number of presence/absence patterns ordered by increasing q-values. Practically, this is done in DBGWAS using a Signicant Features Filter (SFF). For a selection based on a FDR threshold, the SFF value is set between 0 and 1, while any integer value > 1 denes the number of patterns to consider.

In our experiments, we choose not to apply a xed FDR threshold, even though DBGWAS oers this option. Dierent datasets lead to dierent q-values, even by several orders of magnitude, and a single FDR threshold would lead to selecting a large number of unitigs generating more than 1,000 subgraphs on some of them (e.g. S. aureus ciprooxacin) as shown in S3.17 Suppl. Instead, we retain the 100 patterns with lowest q-values. Although arbitrary, this choice is tractable for all datasets and provides satisfactory results in our experiments. It does not provide and explicit control of the FDR: only the q-value provides an estimation of the proportion of false discoveries incurred when considering patterns below this value. Checking the q-values of the selected unitigs is therefore essential to assess their signicance. If the default SFF=100 is not satisfactory, it is also possible to re-run the third step only, with a more suitable SFF value.

Graph neighbourhoods

We dene the neighbourhood of each signicant unitig u (dened by the SF F ) as the set of unitigs whose shortest path to u has at most ne = 5 edges. Users can modify the ne value using the -nh option Annotating the subgraphs DBGWAS can optionally integrate an automated annotation step using the Blast suite [START_REF] Camacho | BLAST+: architecture and applications[END_REF] (version 2.6.0+) on local user-dened protein (-pt-db option) or nucleic acid (-nt-db option) sequence databases. We annotate the subgraphs of interest by blasting each unitig sequence to the available databases. Users can then easily retrieve the annotations which are the most supported by the nodes in the subgraph, or with the lowest E-value. Importantly, DBGWAS works with any nucleotide or protein Fasta les as annotation databases straight away. However, users can customize the annotation databases by changing the Fasta sequences headers to make DBGWAS results more interpretable. A common example is compacting the annotation in the summary page by using abbreviations or gene class names, and expanding them to full names in the subgraph page. Other custom elds can also be included in the annotation table by adding specic tags to the headers. A detailed explanation on how to customize annotation databases for DBGWAS can be found online 3 . We also provide on the DBGWAS website a resistance determinant database built by merging the ResFinder, MEGARes, and ARG-ANNOT databases [START_REF] Gupta | ARG-ANNOT, a new bioinformatic tool to discover antibiotic resistance genes in bacterial genomes[END_REF][START_REF] Lakin | MEGARes: an antimicrobial resistance database for high throughput sequencing[END_REF][START_REF] Zankari | Identication of acquired antimicrobial resistance genes[END_REF], and a subset of UniProt restricted to bacterial proteins [197]. Subgraphs discussed in the Results section were annotated using these databases.

Interactive visualisation

DBGWAS produces an interactive view of the enriched and annotated subgraphs, allowing the user to explore the graph topology together with information on each node: allele and phenotype frequencies, q-value, estimated eect, and annotation. The view is built using HTML, CSS, and several Javascript libraries, the main one being Cytoscape.js [START_REF] Franz | Cytoscape.js: a graph theory library for visualisation and analysis[END_REF]. Results can be shared and visualised in a web browser. As a large number of components can be produced in one run of DBGWAS, we provide a summary page allowing users to preview and lter the subgraphs. Filtering can be based upon the minimum q-value of all unitigs in the component (min q ), or based on the annotations. A complete description of the DBGWAS interactive interface is available online 4 .

Re-running from step 2 or step 3

It is possible to re-run a part of the analysis if a rst run with the default values was unsatisfactory. The -skip1 option allows to re-run from the second step, for instance to compute the lineage eects (adding the -newick option). It is also possible to re-run only the third step by using the -skip2 option, for instance when the default SF F and nh values generated highly connected graphs, or if the annotation was incomplete.

Datasets

We used in our experiments genome sequences from three bacterial species with various degrees of genome plasticity, from more clonal to more plastic: M. tuberculosis, S. aureus, and P. aeruginosa. We also built large datasets with random phenotypes for these 3 species, and used them only for time performance and memory usage assessment. All panels are summarised in Table 3.4. We selected 3 bacterial species with distinct levels of genome plasticity, and with antibiotic resistance phenotypes available for several drugs. For each species, we also created large datasets by computing random phenotypes for all available genome assemblies from NCBI RefSeq.

TB panel

M. tuberculosis (TB) is a human pathogen causing 1.7 million deaths each year [START_REF]Global tuberculosis report[END_REF].

This species is known for its apparent absence of horizontal gene transfer (HGT) and, accordingly, most of the reported resistance determinants are chromosomal mutations [START_REF] Gygli | Antimicrobial resistance in Mycobacterium tuberculosis: mechanistic and evolutionary perspectives[END_REF] in core genes or gene promoters. Intergenic regions are also described to be instrumental in multidrug-resistance (MDR) and extensively drug-resistant (XDR) phenotypes [START_REF] Zhang | Genome sequencing of 161 Mycobacterium tuberculosis isolates from China identies genes and intergenic regions associated with drug resistance[END_REF].

We use the PATRIC AMR phenotype data, as well as genome assemblies from their

MANUSCRIPT ACCEPTED FOR PUBLICATION IN PLOS GENETICS (2018)

107 resource [START_REF] Davis | Antimicrobial resistance prediction in PATRIC and RAST[END_REF][START_REF] Wattam | Improvements to PATRIC, the all-bacterial bioinformatics database and analysis resource center[END_REF]. We thus gather a total of 1302 genomes after ltering based on genome length. Phenotype data include isoniazid, rifampicin, streptomycin, ethambutol, ooxacin, kanamycin and ethionamide resistance status. Except for the last three drugs, phenotype data are available for more than a thousand genomes. We reconstruct MDR and XDR phenotypes based on the WHO denition [START_REF]Global tuberculosis report[END_REF]. XDR phenotype could only be dened for 689/1302 strains as it required data for at least 4 drugs. Information on how phenotype data and genome assemblies were obtained is available on the PATRIC website.

SA panel

S. aureus is a human pathogen causing life-threatening infections. It is subject to HGT and many plasmids, mobile elements, and phage sequences have been described in its genome. However, this does not aect the species' genome size, which is always close to 3

Mbp [START_REF] Mlynarczyk | The genome of Staphylococcus aureus: a review[END_REF]. Most antibiotic resistance mechanisms are well determined by known variants, as shown in a previous study [START_REF] Gordon | Prediction of Staphylococcus aureus antimicrobial resistance by whole-genome sequencing[END_REF]. This study obtained an overall sensitivity of 97% for predicting 12 phenotypes from rules based on antibiotic marker mapping. We use this study panel of 992 strains obtained by merging their derivation and validation sets.

PA panel P. aeruginosa is a ubiquitous bacterial species responsible for various types of infections. It is highly adaptable thanks to its ability to exchange genetic material within and between species [START_REF] Liu | Emergence of plasmid-mediated colistin resistance mechanism MCR-1 in animals and human beings in China: a microbiological and molecular biological study[END_REF]. The species accessory genome is particularly important both in terms of size and diversity, and carries more than half of the genetic determinants already described to confer resistance to antimicrobial drugs [START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF][START_REF] Kung | The accessory genome of Pseudomonas aeruginosa[END_REF]200]. We use a panel of 282 strains, gathered from two collections which mostly include clinical strains: the bioMérieux collection [200] (n =219) and the Pirnay collection [START_REF] Pirnay | Pseudomonas aeruginosa population structure revisited[END_REF] (n =63). Genome assemblies and categorical phenotypes for 9 antibiotics are available [START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF]. Binarised phenotypes of amikacin resistance are available on the DBGWAS project page as an example for users.

Phenotype binarisation

Most available phenotypes are categorical, with S, I and R levels, respectively, for susceptible, intermediary, and resistant. We binarise them by assigning a zero value to susceptible strains (S) and one to others (I and R).

Large panels

We built large panels for the three species, in order to analyse the computational performance at a comprehensive scale. To do so, we gathered all genome assemblies of M. tuberculosis [START_REF] Ali-Ahmad | Structural and functional insights into the periplasmic detector domain of the GacS histidine kinase controlling biolm formation in Pseudomonas aeruginosa[END_REF]504), S. aureus [START_REF] Aubert | Oxacillinase-mediated resistance to cefepime and susceptibility to ceftazidime in Pseudomonas aeruginosa[END_REF]331), and P. aeruginosa [START_REF] Akaike | Information theory and an extension of the maximum likelihood principle[END_REF]802) available on the NCBI RefSeq bacterial genome repository [START_REF] Haft | RefSeq: an update on prokaryotic genome annotation and curation[END_REF], and removed poor quality genomes. For each panel, we generated random binary phenotypes. For a detailed time and memory assessment, we built several sub-panels from these three large panels at size points of 100, 250, 500, 1,000, 2,500, 5,000 and 9,000 genomes. To build these sub-panels, we sampled genomes uniformly from the panels. To take into account the variability among subsamplings, each sub-panel was randomly built 10 times.

performed as described in HAWK's github page. However, in the rst step, we had to remove the lower-count cuto in jellyfish dump (parameter -L), since we are working with contigs and not reads. The last step was performed similarly as the one described for pyseer. For reproducibility purposes, the scripts we used to run HAWK v0.8.3-beta can be found online 8 . 110 CHAPTER 3. DBGWAS SOFTWARE FOR CDBG-BASED GWAS

Concluding remarks

In this Chapter, we presented the DBGWAS software and argued that it is an ecient method for bacterial GWAS. Indeed DBGWAS is a reference-free k-mer-based method:

it only requires genome assemblies and phenotypes to identify relevant determinants in any region of the core and accessory genome, including noncoding regulatory regions.

Compared to other k-mer-based methods, it was shown to be ecient in terms of time and memory footprint, and improved greatly the k-mer-based result interpretation by clustering signicant features which are close in the cDBG into single entities. These entities often represent a particular genomic region such as a polymorphic site in a gene or the insertion of an MGE. We provide an enriched interactive representation of these graphs allowing an easier classication of the variant type: SNPs are identiable as bubbles with blue (susceptible) and red (resistant) paths, and MGE are represented by linear topologies with mostly red (insertion in resistant strains) or blue (deletion in resistant strains) nodes.

The manuscript received encouraging feedbacks when published on bioR χiv9 , and PLOS Genetics peer reviewers were also positive about the use of cDBG to improve k-mer-based GWAS (Appendix S3.2: Decision of PLOS Genetics referees) even though they raised important points from the rst submitted version of the manuscript (Appendix S3.3:

Response to PLOS Genetics referees).

The interest of researchers for applying DBGWAS for their particular issues stimulated new ideas of functionality developments: working on raw reads instead of contigs, counting k-mers instead of using their presence/absence, computing a score at the subgraph level, adding a measure of the correlation between patterns within and between subgraphs to provide an information on potential linkage disequilibrium, mapping back the unitigs on their initial genomes or to a phylogenetic tree, etc. I hope these developments will be realised in the future.

We began to work on a recurrent demand for more exibility in the choice of the analysis computing during the second step (analysis of the variant matrix). We implemented a modied analysis step in a prototype, to allow for continuous or ordinal phenotypes. We tested the ordinal regression on unitigs using the same panel and strategy as presented in Chapter 1. The results, presented in Supplementary Table S3.5, showed that DBGWAS was able to nd new candidates outside the resistome. No improvement was observed for the phenotypes of limited quality (chloramphenicol, fosfomycin, piperacillin), as discussed in Chapter 1.

Finally, while most subgraphs are straightforward to interpret, a part of them remain hard to interpret without further investigations. This is why we focused our eorts on providing automatic tools to help in this interpretation, as presented in the following Chapter.

Chapter 4

Predicting DBGWAS graph labels

Predicting DBGWAS subgraph labels is a next logical step after DBGWAS implementation. This was motivated by two lessons learned from our experience of visualising DBGWAS resulting subgraphs. First, we developed an expertise over time to recognize rapidly a local polymorphism in core or accessory gene, or in a gene promoter, or a gene insertion possibly with its MGE context. However we realised that this interpretation was not obvious to new users. Second, we regularly came across graphs for which we were unable to conclude on such labels without further investigations. They were too complex or not so typical, as illustrated in the examples of Fig. 4.1. We also encountered graphs for which a too rapid interpretation based only on the graphical representation led to labelling mistakes. In particular, the insertion of a conserved gene at a conserved position can be mistaken for a SNP. Indeed, as the unitig length does not appear on our graphical representation, a gene of hundreds of conserved base pairs is represented by a few unitigs (Supplementary Fig. S4.1).

We thus felt a need to help DBGWAS users by automatically providing labels informing on the type of variants identied in the output graphs.

Even though this work is very specic to DBGWAS graphs, we think that the proposed strategy could be applied to other tools providing (compacted) De Bruijn graphs to explore genetic variations, such as MetaCherchant [START_REF] Olekhnovich | MetaCherchant: analyzing genomic context of antibiotic resistance genes in gut microbiota[END_REF] or KisSplice [START_REF] Sacomoto | KISSPLICE: de novo calling alternative splicing events from RNA-seq data[END_REF].

Introduction

Graph-based representation of genetic variations within a population of genomes is currently a eld of intensive research [START_REF] Marschall | Computational pan-genomics: status, promises and challenges[END_REF][START_REF] Paten | Genome graphs and the evolution of genome inference[END_REF], when the alignment-based representation paradigm reaches some of its limits [START_REF] Read | Characterizing the genetic basis of bacterial phenotypes using genome-wide association studies: a new direction for bacteriology[END_REF]. Numerous tools have already been developed using graph-based representations, for applications to human genetics: transcriptomic analysis with kisSplice [START_REF] Sacomoto | KISSPLICE: de novo calling alternative splicing events from RNA-seq data[END_REF], GWAS post-processing with HAWK [START_REF] Rahman | Association mapping from sequencing reads using k-mers[END_REF], SNP calling with DiscoSNP++ [START_REF] Uricaru | Reference-free detection of isolated SNPs[END_REF], genotyping of variants with coloured DBG [START_REF] Iqbal | De novo assembly and genotyping of variants using colored de Bruijn graphs[END_REF] or variation graphs [START_REF] Garrison | Variation graph toolkit improves read mapping by representing genetic variation in the reference[END_REF], and in microbial genetics: prediction of antibiotic resistance phenotype with Mykrobe [START_REF] Bradley | Rapid antibiotic-resistance predictions from genome sequence data for Staphylococcus aureus and Mycobacterium tuberculosis[END_REF], antibiotic genes in metagenomes with MetaCherchant [START_REF] Olekhnovich | MetaCherchant: analyzing genomic context of antibiotic resistance genes in gut microbiota[END_REF], bacterial GWAS with DBGWAS [START_REF] Jaillard | A fast and agnostic method for bacterial genome-wide association studies: bridging the gap between k-mers and genetic events[END_REF]. Graphs generated from DBGWAS, such as those presented in Fig. 3.3, can be quite straightforward to understand for a trained user, however new users would need a guide to read them correctly. Moreover, some graphs are clearly dicult to apprehend if they do not follow a linear structure, but instead present a complex, highly branching network structure, and if, in addition, they integrate thousands of unitigs mapping to a large number of protein annotations.

Mapping the most signicant unitig sequences of such graphs to the NCBI nucleotide database [16] allowed us to nd some clues on why these graphs were complex. We identied that such graphs with a low number of unitigs (Fig. 4.1A) often integrate a path of red (positively-associated) nodes lying in a non-coding region between polymorphic accessory genes (here, integrative and conjugative elements). They seem to be markers of some mobile genetic elements, however as these paths stand in a noncoding region between polymorphic genes, their neighbour unitigs branch to various other unitigs, making the structure complex and hard to interpret. When several distinct variants are aggregated because they are close to each other in at least one strain of the studied panel, this also generates complex graphs. Indeed, if their neighbourhoods (as dened with DBGWAS nh parameter) overlap, they are gathered in a single graph. This is the case of aac(6') acetyltransferase and CML eux pump in Fig. 4.1B. Moreover, the interpretation of the complete graph can lead to mistakes as the most signicant node does not represent the aac(6') gene insertion itself, but a particular SNP in the gene, as presented in Table 3.1. Graphs become even more complex when they gather genes found in several copies in each genome and are found in variable genomic environments. In particular, when genes involved in gene mobility, such as transposases or integrases, are captured in a graph, the number of unitigs explodes, as in Fig. 4.1C. In this example, the transposase for transposon Tn21 is selected from the association test. This transposon is known to disseminate multiple antibiotic resistance genes, but it also carries a mercury resistance operon containing the merA gene [START_REF] Liebert | Transposon Tn21, agship of the oating genome[END_REF]. The merA gene is also signicantly associated with the phenotype and, because of its proximity to the transposase, both appear in a single graph. More generally, the graphs representing genes found in several copies contain multiple loops and branches, which makes them more complex to interpret. When several close genes are gathered in a single graph, it can be simplied by breaking some edges and splitting it into several subgraphs. This can be done by modifying the parameters of DBGWAS third step (nh and SFF). Indeed lowering nh, the number of edges dening the signicant unitig neighbourhood (Fig. 3.6) can break links between signicant unitigs which are distant of d > (nh × 2) -1 edges. Lowering the SFF Signicant Features Filter parameter can also help as it would select less signicant unitigs from which to build the neighbour graphs. In this study, we consider strategies based on the nh parameter.

We have two aims in this work. First to guide non-expert users of DBGWAS in the graph interpretation. And second, provide advice when encountering a complex graph, such as the use of a better nh value. To reach both aims, we need rst to build a reliable label prediction for the easy cases. `Easy' here is dened in opposition to the complex graphs presented above. Practically, we build a dataset of labelled graph from real and simulated data, and use it to train models to dierentiate between local polymorphisms (LP) and mobile genetic events (MGE). We build models for each value of nh from 1 to 5.

Methods and algorithms

Accurately discriminating between local (SNP, indel, etc.) and large scale polymorphism (insertion or deletion of a large sequence such as a gene, a plasmid, etc.) is crucial when interpreting DBGWAS results. We thus dene a rst supervised classication task: the discrimination between local polymorphism (LP) and mobile genetic elements (MGE). The LP class integrates single or multiple SNPs/indel, in core or accessory genes, while the MGE class comprises insertion or deletion of a large sequence.

We also dene a second supervised multiclass classication task to discriminate between the dierent LP and MGE subclasses: single LP, multiple LP (several SNPs in a single graph), MGE insertion, and MGE deletion.

Datasets

We build a dataset of labelled graphs which is further randomly split into a training (two thirds of the dataset) and a test dataset. The training dataset is used to learn predictive models and select the optimal one, while the test dataset is used to compute the prediction performances. The dataset comprises labelled graphs obtained from the antibio-resistance analyses presented in Chapter 3, and simulated graphs.

Labelling real data

We manually annotate 997 graphs from the graphs labelled during the analyses presented in Chapter 3. We keep only the easy graphs. In Chapter 3, the graphs were generated with DBGWAS default settings: nh=5 and SFF=100. We re-run the third step of DBGWAS using 5 values of nh (from 1 to 5) and 3 values of SFF (15, 70 and 100). We are able to transpose the known labels to the new graphs because the new tested values of nh and SFF lead to less complex graphs, from the same DBGWAS step 2 output: the q-values and annotations related to each unitigs are identical. This allows to identify the new graphs containing the same min q as the ones obtained with the maximal nh and SFF values, and validate it using the annotation. Because this process does not generate independent graphs several of them describe the same variant we stratify the graphs among the training and test datasets using the antibiotic names, so the graphs describing variants identied for a particular antibiotic are all grouped in one split (either training or test). Finally the training dataset comprises 695 real graphs, related to 11 antibiotics while the test dataset comprises 302 graphs related to 10 antibiotics.

Simulation of labelled graphs

We extend the dataset with graphs obtained from simulated genomes and phenotypes.

To build this synthetic dataset, we dene a global strategy to generate controlled LP and MGE graphs using the P. aeruginosa dataset described previously [START_REF] Jaillard | A fast and agnostic method for bacterial genome-wide association studies: bridging the gap between k-mers and genetic events[END_REF], composed of N = 282 assembled genomes, and for which a collection of core and resistance gene alignments is available. The core genes were previously obtained by annotating the genome assemblies and dening core gene families. For each gene family, the gene sequences were extracted from all genome assemblies and a multiple alignment was computed between them. We dene synthetic core genomes by concatenating a selection of C ordered core genes randomly picked among the 1384 available core genes, as described in Chapter 2 and in Figure S2.1, panels A, B and C. For both LP and MGE simulations, we use a general procedure to insert the phenotype-associated variants and obtain controlled graphs: we sample a vector of mutation pattern, X, from a binomial distribution with a prevalence p (taking values between 0.15 and 0.5). If X i = 1, the i-th genome is mutated ; if X i = 0, it is not. Then we sample a phenotype Y i of each genome i from a multivariate logistic model, related to X i under a given odd-ratio (taking values between 4 and 10):

Y i ∼ B(π i ), π i = 1 1 + e -X i β , β = log(odd-ratio) (4.1)
In order to lower the number of DBGWAS runs, when possible, we generate several graphs per run. To do so, we simulate M variants, avoiding close proximity between them in the genome to prevent overlaps of signicant unitig neighbourhoods. Indeed this would result in collapsing several graphs into a single one. We also use a q-value cuto for signicant pattern selection by setting the SFF parameter to 0.05, in order to control a false discovery rate at 5% on average. All graphs generated by such a DBGWAS run are assigned a label, according to the simulation strategy used to generate the graph, as described below. Finally, several values of nh (from 1 to 5) are used for the third step of

DBGWAS.

The following paragraphs present the specicity of each label, within this simulation framework.

Simulation of genomes with MGE insertion or deletion.

We used two strategies to simulate genomes with MGE presence associated to a phenotype. In both strategies, the MGE sequence is not inserted within the core genome, but included in the genome Fasta le as a distinct sequence. The rst strategy uses a sub-collection of M gene alignments (core and resistance genes) of N sequences, and adds the i-th sequence of the j-th alignment to the i-th genome, according to its X i value, as detailed in Algorithm 1.

Prepare a core genome of C = 200 genes. for i in 1..N = 282, j in 1..M = 50 do if type = `insertion' then if X i = 1 then Add sequence i of alignment j in genome i; if X i = 0 then Do nothing; else if type = `deletion' then if X i = 1 then Do nothing; if X i = 0 then Add sequence i of alignment j in genome i; end end Algorithm 1: MGE simulations based on the gene strategy

The second strategy only allows for MGE insertions, however it uses real plasmid sequences to represent a particular MGE context. The purpose is to add more complexity to the MGE graphs by adding a varying genomic environment. For this strategy, all genomes receive a plasmid, however if X i = 1, the i-th genome receives a plasmid sequence containing a given annotation, and if X i = 0, the i-th genome receives a plasmid sequence which does not contain the annotation, as detailed in Algorithm 2. The plasmid collection is built from the PlasFlow database [START_REF] Krawczyk | PlasFlow: predicting plasmid sequences in metagenomic data using genome signatures[END_REF]. The annotation of the plasmids is obtained by determining resistance gene presence within the plasmid collection, by blast search: over the 7604 plasmid sequences of the database, 1848 have at least one hit on a resistance gene database. This corresponds to 349 resistance gene families. However after ltering gene families observed in less than [START_REF] Benjamini | The control of the false discovery rate in multiple testing under dependency[END_REF] Both real (695 graphs) and simulated (9420 graphs) training dataset are merged into a `all nh' training dataset. This dataset is split according to the nh value used to build the graphs, in order to train prediction models for each nh value. Each of the 5 `nh' models is thus trained on 2040 graphs on average.

Features used for the model

Description of the features.

We designed 33 features to describe the graphs and predict their label. These features are obtained from data generated during the rst and second steps of a DBGWAS run and are computed during the third step of a customised version of DBGWAS. They summarise the graph size and complexity, its nodes estimated eects from the association test, as dened in Chapter 3, allele frequencies, and the length of the node's corresponding nucleic sequences. Labels are assigned at the graph level, so when the descriptors are at the node level, a summary of their distribution, such as the means or the quantiles, is computed (Table 4.1). We intuitively searched to reassemble unitigs with a positive (resp. negative) eect into `positive' (resp. `negative') contigs, based on the idea that a local polymorphism would be represented by a `positive' and a `negative' contigs of approximatively the same length and with a high level of homology, while a long insertion would present a dierence in contig length and a low homology. Contig-related variables are computed during the third step: an assembly of the node sequences is generated using the seqAn C++ library [START_REF] Reinert | The SeqAn C++ template library for ecient sequence analysis: a resource for programmers[END_REF]. In the case of graphs containing several hundreds, or thousands of nodes, such as the graphs generated with the plasmidbased strategy, this step took several hours, and we had to apply a timeout in order to produce all covariates in a reasonable amount of time. As a consequence, only a few of the plasmid-based graphs have values for the contig-related variables. * For these features, 4 variables were computed to represent the feature distribution: 5%, 50% and 95% quantiles, and the standard deviation.

Dealing with NA values.

A total of 8 features can produce NA values. This is the case for sign_node_effect_sd and sign_node_degree_sd, when there is only one signicant node in the graph, and for length_pos_mean and length_neg_mean, when there is no node with a positive resp. negative eect on the phenotype. In these cases, we replace the NA values by 0. This is also the case for the 4 contig-based features, when no assembly was computed due to timeout, as described previously. In this case, we evaluated two methods to deal with the NA values. The rst method, `repVal' replaces the NA values by 0, as for other variables. The second method `remCol' removes the four contig-based variables from the study. Even if we can expect a loss of information by removing variables, this method is worth being tested with regards to the prediction performances, because the computation of the contig-based variable values is time consuming.

Data normalisation.

The training variable matrix x, describing the variable values for all graphs in the training dataset is scaled and centred, so all variables have an average 0 values and a standard deviation of 1.

Once the classier method is selected and optimised on the scaled training dataset, it is used to predict labels of new scaled datasets. The scaling factors used for the training dataset (mean and standard deviation of each column of x) are applied to scale any new dataset.

Benchmarking prediction models.

The main challenge when building a prediction model is to have it to be able to predict correctly on any new independent dataset. Minimising only the model training loss, can generate a model too specic to the training dataset, which is less generalisable to new data [START_REF] Friedman | The elements of statistical learning[END_REF]. We refer in this case to optimistic models and overtting. The overtting is related to the model complexity: the more complex, the better the t on the training dataset will be, however to the detriment of prediction generalisation. This issue is also known as the bias-variance trade-o: too simple models lead to a large bias, while too complex models lead to a large variance.

A simple and widely used method to select, among several, a model oering the best bias-variance trade-o, is cross-validation (CV) [START_REF] Friedman | The elements of statistical learning[END_REF]. The K-fold cross-validation strategy directly estimates the average generalisation error by splitting the dataset into K-folds, learn on K -1 and assess the model performance on the K-th fold. Performances obtained across the K runs can be then aggregated. The model with the best estimated performance is selected, and its prediction performance is assessed on a new independent test dataset.

We include in our study six prediction methods each dening a family of models with distinct parameter values. We use a 10-fold cross-validation strategy to optimise the model hyperparameters determining the model complexity and behaviour and select the best optimised method among the six. Finally, we estimate the prediction performance of the selected model on the test dataset.

We now present the prediction model families we included in this study, as well as the hyperparameters we optimised.

Penalised regression

Penalised regressions are a family of methods for empirical risk minimisation, which explicitly implements the bias-variance trade-o: the minimisation problem can indeed be expressed by two terms, a loss function describing the t to the data, and a regularisation function, which provides a cursor for tuning the model complexity (see Eq 4.2).

min f n i=1 L(y i , f(x i )) + λΩ(f ), (4.2)
where f is a model family, L(y, f (x)) is the loss function to be minimised, Ω a complexity measure for functions f , and λ a parameter which allows controlling the trade-o between model complexity and learning error. Here, we use a logistic loss function for the binary classication tasks, as described in Eq 4.3.

L(y, f (x)) = log(1 + exp -yx β ), (4.3) with y, the graph label vector, X the matrix describing the feature values for each graph and β the vector of coecients to estimate. For this task, an `LP' label corresponds to a value of +1 and an `MGE' label of -1. For the second task, a multiclass classication problem, a multinomial loss function is used, which is a multiclass generalisation of the logistic function1 . The label is attributed to the class with the highest probability. We test three widely used regularisation functions: the l1-penalty (lasso) [START_REF] Tibshirani | Regression shrinkage and selection via the lasso[END_REF], the l2penalty (ridge) [START_REF] Hoerl | Ridge regression: biased estimation for nonorthogonal problems[END_REF] and a mixture of the two (elastic-net) [START_REF] Zou | Regularization and variable selection via the elastic net[END_REF], which are expressed in Eq 4.4. The two main characteristics of the lasso penalty are the shrinkage of the regression coecients and sparsity: penalising the l1 norm leads to estimators in which many coecients are exactly 0. This increases the model bias, however decreases the variance of the prediction results. Indeed, thanks to the shrinkage and sparsity, it lowers the complexity of the model and improves the overall prediction accuracy by preventing the model from overtting the training data. The ridge penalty does not induce sparsity, and thus will not chose one variable among several correlated variable as the lasso does, but will provide close coecient estimates to variables which are close in Euclidean norm. The elastic-net is a compromise between lasso and ridge penalties: it is sparse, and tends to select groups of correlated variables.

λΩ α (β) = λ 1 2 (1 -α)||β|| 2 l2 + α||β|| l1 ⎧ ⎨ ⎩ lasso , if α = 1, ridge , if α = 0, elastic-net otherwise. (4.4)
λ and α are the two hyperparameters to optimise while selecting the best model. We use the R package glmnet [START_REF] Friedman | Regularization paths for generalized linear models via coordinate descent[END_REF] to implement the three penalised methods. We optimise the λ and α values as described in paragraph Model optimisation and selection.

Support vector machine

The support vector machine (SVM) algorithm was designed for binary classication [START_REF] Stitson | Theory of support vector machines[END_REF].

It is based on a linear classier and ts into the penalised risk minimisation framework described in Eq 4.2: it can be expressed with a hinge loss function (Eq 4.5) and a ridge penalty (case α = 0 in Eq 4.4).

L(y, f (x)) = (1 -y(x β + b)) + ,
(4.5) where y is the graph label vector, X the matrix describing the feature values for each graph, and β and b are the estimated parameters dening the hyperplane and its margin, used to separate the data according to their label y, in the input parameter space. The support vectors are X i belonging to the margins. The overtting is controlled by a cost C = 1/λ, which denes the tolerance to classication errors. The lower C, the larger the margin, and the higher the tolerance to misclassied data. A non-linear transformation of the input space X to a feature space F can be considered to apply a linear SVM in F. This can be particularly interesting when the data are not linearly separable. This problem can be solved by the use of kernel methods, which allow to compute dot products dening the transformations [START_REF] Vert | A primer on kernel methods[END_REF]. A kernel K : X ×X → R can 4.3. RESULTS 121 be seen as a measure of similarity between two points x and x . The radial basis function (RBF) kernel (Eq 4.6) is widely applied to SVM:

K(x, x ) = exp(-γ||x -x || 2 ), (4.6)
where γ is the parameter of the kernel. The lower γ is, the slower the similarity decreases with the distance between x and x . Each data point has non-zero similarity to a larger number of samples, making the model less prone to overtting. We use the R package e1071 [START_REF] Friedman | Regularization paths for generalized linear models via coordinate descent[END_REF] to implement two methods: a linear SVM and an RBF-kernelised (radial) SVM. We optimise the C value for the linear SVM and (C; γ) value couples for the radial SVM, by applying the strategy described in paragraph Model optimisation and selection.

Random forest

Random forests belong to a dierent family of classication methods. They are based on decision trees, recursively splitting the dataset into binary parts according to a threshold applied to a variable's value. They end with a division of the input space into multiple regions, and a label is then attributed to each region based on the majority class. As single trees do not provide a stable solution, and do not generalise well,the random forest algorithm proposes to compute several independents trees and attributes the most frequent predicted label among all trees. It also includes a bagging (for bootstrap aggregating) strategy: each tree is computed on a bootstrap sample of the training data, and for each new node in the tree, the variable used for splitting the data is chosen among a random sample of all variables, which helps decorrelating the trees. This generates less predictive individual trees, however improves the generalisation capacity of the method [START_REF] Breiman | Random forests[END_REF]. The main hyperparameters to tune for these models are the number of trees (we used the default value of 500 provided by the R package randomForest [START_REF] Liaw | Classication and regression by randomForest[END_REF] used for the algorithm implementation), the number of randomly selected variables m used in the bootstrap, and the node_size, the minimum size of each nal region. This is correlated to the number of regions dividing the input space: the lower the node_size, the more local (and less generalisable) the model will be.

We optimise both m and the node_size, using the strategy described in paragraph Model optimisation and selection.

Model optimisation and selection

We use functions from the R package mlr [START_REF] Bischl | mlr: machine learning in R[END_REF] to design a hyperparameter tuning strategy: we pick 100 random values within the parameter search space (see Supplementary Table S4.6), and compute performances using a 10-fold cross-validation. We keep the hyperparameter values of the model maximising the accuracy. For all model tuning, we draw performance curves/maps to check that the tested hyperparameter spaces indeed lead to a maximal performance value, and adjust the tested value boundaries when needed (Supplementary Fig. S4.3). Finally the method among the six with the overall best accuracy is retained and its prediction performances are then computed on the independent test dataset.

Results

After a brief presentation of the graph simulation results, we present in this section how we chose the best models for the predictions (12 models were selected: one per nh value plus one gathering all nh values, and one per classication task). We then present some applications of these prediction models to the graphs in Table 3.1, and to the complex graphs described in Fig. 4.1

Graph simulations

For this study, around 12000 graphs were simulated and labelled. Several pre-tests were done before launching all the simulations in order to optimise the simulation strategies and parameters. Globally, the generated graphs showed the expected topology, as presented in Fig. 4.2 and 4.3. For the plasmid-based strategy, the complexity of the graphs depends on the chosen gene family: a conserved gene family produces linear paths while heterogeneous families produce highly branching graphs, as illustrated in Fig. 4.3.

Even though the gene-based strategy generated more regular graph topologies, the pretests encouraged us to apply a lter in order to remove graphs comprising less than 2 + 3 × (nh -1) nodes. Indeed, some gene alignments were so conserved that the complete sequences were collapsed into a few unitigs (Supplementay Fig. S4.4). Because we introduced articially these sequences independently from the others, the generated subgraphs only had 1 to 3 nodes with nh=5, which would never happen in practice. Thanks to this lter, we guarantee a minimal graph neighbourhood. The pre-tests also revealed another limit encountered in the generation of `sequential' multiple SNPs/indels : depending on the variability of the gene in which the mutations were inserted, the neighbourhood of two signicant nodes involved into two distinct mutations does not always overlap, which results into a splitting of the `LP multiple' graph into several `LP single' graphs. This has however no impact on the binary LP/MGE labelling.

Exploratory analysis

A principal component analysis (PCA) was computed on the training dataset, for each value of nh, as illustrated in Fig. 4.4. We rst validated that the simulated graph populations overlapped with graphs obtained from real data. This was the case, even though the `LP' simulated graph distribution was closer to the `MGE insertion' population than In this data projection, 5 colours were used to distinguish between 'LP' labels produced by simulations (red) from those obtained from real data (blue), and between `MGE' from real data (yellow) and from simulations. Within this last class, MGE insertions were coloured in brown while deletion in green.

the real `LP', in the two rst PC projection space. We also observed that, in this space, the `MGE-deletion' class overlapped the `LP' graphs. The `MGE-deletion' graphs dier from the `MGE-insertion' mostly by the sign of their eect on the phenotype apart from that, the same simulation parameters were used. Variables describing the node eects are important in the PC1 composition, and this may explain why both categories of graphs were found distant in this projection.

More precisely, for nh = 5, PC1 was mostly composed of variables describing the unitig allele frequency (bottom-left block in the correlation matrix of the covariates, presented in Supplementary Fig. S4.2), the sum of unitig sequence length (top-right block in Supplementary Fig. S4.2), and the median estimated eect, while PC2 was mostly composed of the estimated eect extreme quantiles and standard deviation, and the dierence of negative versus positive eect sequence length. For nh = 1, when only one neighbour node was considered around the signicant unitigs, PC1 was mostly composed of variables describing the node number and node length, while PC2 was mostly composed of the ratio of signicant nodes, the dierence of negative versus positive eect, sequence length, and of variables describing the node degree.

Model selection

We based the selection on the prediction accuracy of the model, i.e. the overall rate of good predictions. Figs. 4.5 and 4.6 show the mean cross-validation accuracy for the binary LP/MGE (resp. multiclass) classiers, for each value of nh, and for the two methods applied to deal with the NA values: `repVal' method replaced NAs by `0' and `remCol' method removed variables with NAs.

The random forest classier provided the best accuracy in 19 out of 24 models (Figs. 4.5 and 4.6). The radial SVM was a close second while the four other methods presented worse performances. We selected the random forest method for all models (tasks and nh values), and optimised it independently for each model.

The inuence of the nh value on the CV performance was not the same on all methods: the ridge regression performance for instance was particularly aected by the nh value and obtained accuracy values between 0.74 and 0.88 for the multiclass task while the random forest obtained accuracy values between 0.93 and 0.96 for this task. Regardless of the method and the prediction task, the worst performance was obtained for graphs with a small neighbourhood (nh=1 or nh=2), which may reect the importance of the neighbourhood for label prediction. The performances obtained with the random forest models trained across all values of nh (`all nh' in the Tables) were better than the ones obtained for graphs with nh=1 or nh=2, but were never the best.

The method used to deal with the NAs had no major impact on the performances: we thus selected the `remCol' strategy for the rest of the analysis, as computing the contig-related covariates was particularly time-consuming.

Variable importance was computed for all random forest classiers. It represents the average decrease in node impurity over all trees, when splitting on the variable. The node impurity is measured by the Gini index: Globally, we observe that variables describing the node eect were always among the top-5. The high correlation between these variables (as shown in Supplementary Fig. S4.2) explains that several of these variables were found together. Variables describing the sequence length were found in the top-5 of all except one model (the multiclass task, with nh=3). In this model, the standard deviation of the allele frequency presented the third variable importance. Variables describing the allele frequency were also present in all except one LP/MGE models. Variables related to the node degree were found important in two models: the models for LP/MGE prediction with nh=3 and with all nh values together.

G(i) = 1 -K k=1 P i [k] 2 where P i [k] is the proportion of class k in node i.

Label prediction

Prediction performances on the test datasets

We computed the accuracy of the predictions obtained on the real and simulated test datasets with the selected models. Table 4.3 summarises these performances. The performance obtained on the simulated test dataset were close to the one obtained in cross-validation. However, the performances obtained on the real test dataset were lower, specially for the multiclass task, for which the best accuracy was 0.79, obtained with nh=4. In this case, errors occurred mostly from graphs labelled `LP single': 58% (14) of these graphs were correctly predicted and 29% [START_REF] Andersson | Persistence of antibiotic resistance in bacterial populations[END_REF] were predicted as `LP multiple', as shown in Table 4.4. The worst performances were obtained for nh=2, whatever the task. In this case, errors happened exclusively from the `LP' to the `MGE' class for the LP/MGE classier, as shown in contingency Table 4.5. For the multiclass classier, errors occurred mainly from graphs labelled `LP single': only 41% (11) of these graphs were correctly predicted and 26% [START_REF] Andersson | Persistence of antibiotic resistance in bacterial populations[END_REF] were predicted as `MGE deletion', as shown in Table 4.6.

The errors obtained when predicting the simulated test dataset were more balanced between the classes. For instance, for the multiclass task with nh=2, there were 4 errors within the `LP' subclasses and 2 errors within the `MGE' subclasses, and there were Label prediction for graphs from Table 3.1 of Chapter 3

We ran the selected nh5 models for the LP/MGE and multiclass classications in order to predict the labels of the graphs presented in Chapter 3, Table 3.1. The results, presented in Table 4.8 showed a misclassication rate in concordance with the accuracy values presented in Table 4.3. Note that only errors between `LP' and `MGE' classes were highlighted in red for the multiclass classication. All incorrectly LP/MGE predicted labels obtained a probability below 0.90, except for the amikacin aac(6') graph. In this case, as presented in Fig. 4.1B, two variants were represented, and the `LPG' label provided in Table 3.1 concerned only the region presenting the lowest q-value, and representing a SNP in aac(6') gene, while the complete graph represented the insertion of the CML gene in addition. When considering the more detailed labels from Supplementary materials S3.2, S3.3 and S3.4, all graphs labelled either `polymorphic region in a gene' or `pattern in a noncoding region' (purple labels) were predicted with a probability < 0.90. These labels were attributed to complex graphs, often presenting a path of red or blue nodes in a branching environment, such as the graph presented in Fig. 4.1A. This illustrates a limitation of our approach focusing only on easy graphs and not able to predict correctly these more complex graphs. While it would be useful to investigate further and describe better the type of variants represented by these graphs for a better prediction of their label, providing the probability associated to the majority class could already be useful to DBGWAS users: when the probability is < 0.90, DBGWAS is unable to predict an LP/MGE label but informs on the graph complexity. In these case, the user could re-run the third step with a lower SFF or nh value. Indeed, tuning this value can help to lower the complexity of graphs gathering several polymorphic genes. We built one model per nh value, however, the model trained on all graphs (with all nh values together) showed equal performance in average: a single model is sucient to predict the labels whatever the nh value used to generate the graph.

The LP/MGE label prediction performances were very good on simulated graphs (accuracy around 0.97), regardless of the nh value. The performances on real graphs were also pretty high (around 0.92), nonetheless, the gap in performance between simulated and real data was large when predicting a ner label with the multiclass classier. The low performances obtained on the real dataset (around 0.72) can be explained by the limited scope of the simulations focusing on `easy' graphs, together with the low percent of real graphs included in the training dataset. However, obtaining trustworthy labels for real graphs implies manual investigations and is highly time-consuming.

In order to improve the training dataset composition, a particular attention should be given to the real `LP single' graphs which were wrongly labelled. Better understanding diculties of classication would help design new simulation strategies to enrich the current set. We could focus on the graphs for which low probabilities ( < 0.90) were obtained, in particular graphs labelled as patterns or polymorphic regions (as in Supplementary materials S3.2, S3.3 and S3.4). They might represent a type of variant we did not consider or at least which cannot be summarised under either the general LP or the MGE labels. This dataset could be enriched with other labels representing for instance rearrangements, or mosaic genes.

The prediction performances could also be improved by considering other modelling strategies. In our approach, we used descriptors at the subgraph level, and summarised the unitig-level information. Graph kernel methods were developed to mine graph data, based on walk, subtrees, paths, or cycles in the graphs [27,[START_REF] Gärtner | On graph kernels: Hardness results and ecient alternatives[END_REF]. They allow a ner exploration of the graph topologies, and could improve the prediction. Deep graph kernels aims at detect sub-structures in graphs [START_REF] Yanardag | Deep graph kernels[END_REF], which could be useful to detect multiple variants within a single graphs (such as Graph 2 of Fig. 4.1B, which contains a SNPs in aac (6') gene and the insertion of the CML gene) and by predicting the labels locally. Hierarchical strategies could also be set in order to take into account the hierarchy between LP/MGE label and their sub-labels predicted in the multiclass task. Other sub-labels could also be considered.

In the meantime, the results presented in this Chapter could lead to short-term improvements of DBGWAS. First, the probability associated to the predicted label provides information which could be valuable for DBGWAS users. If an LP/MGE label can be predicted with high probability (> 0.90), specic additional features could be computed, such as an alignments between `positive' and `negative' contigs for LP, which would highlight the position of the mutations in the sequence. A sub-label could also be provided when the LP/MGE label is well predicted. And second, if the prediction performance is a proxy for the interpretability of a graph, this work could suggest considering nh=4 as a default value instead of nh=5, as the best performances were obtained with this nh value, for real and simulated datasets.

Conclusions, discussions and perspectives

In this thesis, we were interested by the application of GWAS to bacterial genomes, for the study of antibiotic resistance. Our main species model was P. aeruginosa, which has a large plastic genome. It makes great use of its accessory genome and regulatory pathways, which may involve subtle resistance mechanisms not well described. The prediction of the amikacin resistance status for instance cannot be based only on the presence of the genuine markers such as aminoglycoside-modifying enzymes or MexXYOprM eux system [START_REF] Kos | The resistome of Pseudomonas aeruginosa in relationship to phenotypic susceptibility[END_REF].

This complexity motivated us to work on the adaptation of GWAS tools to the high plasticity of bacterial genomes, mainly by working on the representation of the genetic variations in these genomes.

We evaluated several methods to model the relationship between the phenotype and the genotype, including dierent measures of the resistance, and dierent adjustments for population structure. From these evaluations, we selected the R package bugwas [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF], based on linear mixed models that oered in our experiments the best compromise for dierent congurations of population structures in P. aeruginosa. We aimed at widening the search space compared to our rst RWAS study, in order to screen for variations in the core as well as the accessory genome, without missing noncoding regulatory regions in bacterial genomes such as P. aeruginosa which are particularly plastic. We focused our search on k-mers as they oer the necessary exibility but they are very redundant and do not allow for a direct interpretation of the results. We then searched how to take advantage of a cDBG for variant representation. Bubbles captured simple variations but not polymorphic insertions. The method we developed tests the presence or absence of unitigs: the nodes of a cDBG built from all input genomes. We focused our eorts on post-processing, and proposed a visualisation of the genomic context of the unitigs associated with the phenotype. This synthetic view allows to understand the sequence of interest in its context and informs about its nature: e.g. a local polymorphism, or the acquisition of a gene within a plasmid. We published DBGWAS, a turnkey tool implementing eciently the complete analysis. It only requires a set of genome pre-assemblies and corresponding phenotypes to generate in a few hours (one hour and a half in average) ordered, decorated subgraphs representing sequences associated with the antibiotic resistance. These subgraphs are in most cases good proxy of a particular genomic region such as a polymorphic region in a gene or the insertion of a plasmid carrying a resistance gene. We were able to correctly predict the type of genetic variation represented by the subgraph (local polymorphism or MGE) in 92% of the cases. However the performance was lower to predict subtypes or complex branching subgraphs. DBGWAS could benet from this work as a short-term improvement. The classier could be improved by using ner methods such a graph kernel-based methods, able to take into account the graph topology, locally or globally. In the short-term, DBGWAS could also be extended to oer other association models than the one implemented by bugwas, e.g. models allowing for continuous or ordinal phenotypes. Another quick win would be to add an LD measure within subgraphs (.i.e among their signicant unitigs) or between [START_REF] Macpherson | Keeping pace with the red queen: Identifying the genetic basis of susceptibility to infectious disease[END_REF] 132 CONCLUSION subgraphs (for instance between the most signicant unitigs of each subgraph). DBGWAS unitig-based strategy could be reconsidered to oer a control of the FDR at the subgraph level. A two-step approach could be envisaged, for instance selecting signicant unitigs rst, and then testing the association of their induced subgraph with the phenotype. For this second step, methods testing the combined presence of close variants, such as the intervals of genetic heterogeneity [START_REF] Llinares-López | Genome-wide detection of intervals of genetic heterogeneity associated with complex traits[END_REF], could help to report a genotype measure at the subgraph level: a genetic interval is represented by a presence/absence pattern of at least one of the SNP within the interval. It is computed using an OR operator between all SNP presence/absence pattern. This approach would need to be adapted to t large subgraphs, in which such operation would rapidly lead to patterns containing only presences. Another approach could be a supervised construction of a pattern graph, where any bubble, whose pair of paths is not dierentially observed between the phenotypes, would be replaced by a linear path with a `N' instead of the variable part of its pair of paths. However, this approach, like the previous one, would result in inferring on data already used for a rst selection, and would raise post-selective inference issues.

The tool we set up has already been successfully tested to inspect another bacterial phenotype, the natural transformation in Legionella pneumophila [START_REF] Durieux | Widespread natural transformation in Legionella pneumophila clinical isolates[END_REF]and will be soon tested on non-model eukaryote species to retrieve sex-related markers. Our tool was presented to pharma who had expressed their need to better understand the genetic impacts of the new molecules candidates to become our future antibiotics. The DBGWAS subgraph representation could also be applied to interpret k-mer-based models built to predict an antibiotic resistance status [START_REF] Drouin | Greedy biomarker discovery in the genome with applications to antimicrobial resistance[END_REF][START_REF] Tournoud | Predicting bacterial resistance from whole-genome sequences using k-mers and stability selection[END_REF]. Bacterial GWAS will certainly benet from our DBGWAS tool, however the investigation of antibiotic resistance mechanisms and their genetic basis still requires more general improvements. More eorts can be done to screen the complete genomic variations: rst, in our approach, we do not address the copy number variations (CNV), whereas the number of plasmids in a cell, for instance, can have a direct relationship to the cell resistance level.

DBGWAS could be adapted to take as input raw reads and thus retrieve this information.

Second, DBGWAS does not address co-resistance or cross-resistance: it analyses the phenotypes one by one. Approaches modelling several antibiotic responses could help nd co-markers and deal with the observed correlation between phenotypes [START_REF] Zhou | Ecient multivariate linear mixed-model algorithms for genome-wide association studies[END_REF]. Third, we do not address interactions between variants, which can be driven by epistasis [START_REF] Gygli | Antimicrobial resistance in Mycobacterium tuberculosis: mechanistic and evolutionary perspectives[END_REF][START_REF] Mckinney | Six degrees of epistasis: statistical network models for GWAS[END_REF], nor do we address potential additive eects since we test the variants individually. The genome is not expected to carry alone all information on the variations causing antibiotic resistance: post-genomics could bring missing clues. Bacteria are subject to epigenetics: DNA methylation was reported to aect virulence gene regulation [START_REF] Banas | DNA methylation aects virulence gene expression in Streptococcus mutans[END_REF][START_REF] Casadesús | Programmed heterogeneity: epigenetic mechanisms in bacteria[END_REF]. RNA expression level can be potentially marker of antibiotic resistance [START_REF] Barczak | RNA signatures allow rapid identication of pathogens and antibiotic susceptibilities[END_REF][START_REF] Khaledi | Transcriptome proling of antimicrobial resistance in Pseudomonas aeruginosa[END_REF]. Post-translational mutations may also arise and help the cell adapt and diversify [START_REF] Cain | Beyond gene expression: the impact of protein post-translational modications in bacteria[END_REF][START_REF] Grangeasse | Regulatory potential of post-translational modications in bacteria[END_REF]. Bacterial GWAS studying the antibiotic resistance would benet from advances in multi-omics modelling approaches [START_REF] Boulesteix | Ipf-lasso: Integrative l1-penalized regression with penalty factors for prediction based on multi-omics data[END_REF]. Resistance determinants identied by current GWAS methods are markers of in vitro resistance. The clinical expression of resistance is not always directly reected by these markers [START_REF] Tuite | Rapid nucleic acid diagnostics for the detection of antimicrobial resistance in Gram-negative bacteria: is it time for a paradigm shift[END_REF]. Taking into account the host response, for instance by integrating the host genome or transcriptome as covariates, could model host-pathogen interactions and open a path to personalised antibiotic therapy [START_REF] Macpherson | Keeping pace with the red queen: Identifying the genetic basis of susceptibility to infectious disease[END_REF]. Finally, strain panels have to be carefully prepared, to assure balanced phenotypes and spread among the species, and need to be regularly updated. Indeed, no GWAS computed from `old' strains (before 2010) would be able to nd the recently appeared mcr-1 colistin marker.

The ght against antibiotic resistance and multi-resistance will be long and dicult. Each single step in this ght will count. because of relatively small sample size then it raises a sever concern about the validity of the real data results. Moreover, even though the results presented in 3.3.3 seem to be interesting, the authors should present an enrichment test, or otherwise perform some sort of permutation test for verication.

Isolate id Amikacin

-What are the lengths of the genomes in the real data analysis (the distribution)? How many unique patterns were generated? 3. The authors consider a linear model for the association testing in spite the fact that their outcomes are binary. The authors reason this by reporting worse detection performances for a logistic model in a preliminary experiment. Since a logistic model is more natural and statistically justied, I suspect that lower detection performance of a logistic model implies that it adjusts for the population structure confounder better and therefore it may have a better control for false positives. Of course, it is not possible to assess this a long as no additional details are provided. I would recommend the authors to provide more details here, possibly show an experiment, to justify their use of a linear model over a logistic one. 4. I believe Fig. 5 is somewhat misleading most of the dierent kmers that are represented by the same patterns are likely to be from the same genomic region (if that's not true the authors should show that). Since the interpretation of the results in the kmers approach is also eventually made on the genomic locations of the kmers, it makes little sense to consider several false positives for the kmers approach in case of a false positive pattern.

Minor / Technical issues:

-The authors refer to several Supplementary Tables throughout the main text; however, I couldn't nd any of those in the supplementary le.

-A specic aspect of our approach is that we build our compacted DBG from assembled genomes (more precisely, from contigs) rather than from primary sequence reads. this should be mentioned earlier in the text for clarity.

-There are several content repetitions in the text-for example, the explanation about the potential eect in the presence of population structure. In summary, I feel that a more reasonable approach would be to perform Bacterial GWAS based on unique patterns using the kmers approach (as in Earle et al.). A careful implementation of this approach should be more ecient than constructing DBG. Then, given a set of interesting patterns, the kmers they map to can be used to construct a compressed DBG, as proposed here by Jaillard et al. I believe this approach would be simpler and more ecient and can still benet from the improved visualization and ease of interpretation provided by DBG approach.

Reviewer 2 (-1)

Jaillard et al proposed a very interesting idea to represent genetic determinants with compacted de Bruijn graphs. The genetic markers for antimicrobial resistance can be discovered through GWAS approaches. Traditional GWAS approaches aim to discover signicant SNPs or k-mers that are corresponding to specic phenotypes. Instead, the authors applied GWAS on "unitigs", which are variable-length k-mers represented by the collapsed nodes in compacted de Bruijn graphs. The usage of unitigs subtly resolves the issue of choosing the appropriate "k" in k-mer based approach and provides a more meaningful interpretation than the SNP approach. The idea of "unitigs" is interesting and presents several advantages over existing approaches; however, I have several concerns as mentioned below: Main concerns:

3) It is dicult to understand the performance of the approach, since no data is presented. How many signicant associations were observed in the simulations? How many were expected? 4) No detail is given on the identication of reported causal variants. How many reported causal variants were detected? How many unreported? Minor: What is the meaning of nodes in Figure 4, panels B and C? And where are the unitigs represented in that gures? Maybe thew word node is used instead of unitigs? Furthermore as discussed in Section 2. DBGWAS results for M. tuberculosis resistance to antibiotics. For each antibiotic, top subgraphs were reported with their rank, the q-value of the unitig with the lowest q-value (min q ), the corresponding estimated effect (estimated of the linear model) and the number of susceptible (resp. resistant) strains harbouring this unitig (count per phenotype). The type of event represented by the subgraph, its annotation and some comments and references on this annotation were also provided. Comments were coloured if the annotation was previously described in antibiotic resistance literature: in green if this description concerned the tested antibiotic, in orange otherwise. In current resistance database, the gene presence is described for amynoglycosides. However, this mutation was described in 1999 to increase the affinity of the antibiotic binding site for hydrolysis. There are only 3 susceptible strains in the panel. The 34 first subgraphs show a min(q-value)=4.47e-09, among them some unitigs correspond to the MEX family (see below) Cg = w RDresults for P. aeruginosa resistance to antibioticsB For each antibiotic, top subgraphs were reported with their rank, the q-value of the unitig with the lowest q-value (minq), the corresponding estimated effect (estimated of the linear model) and the number of susceptible (resp. resistant) strains harbouring this unitig (count per phenotype). The type of event represented by the subgraph, its annotation and some comments and references on this annotation were also provided. Comments were coloured if the annotation was previously described in antibiotic resistance literature: in green if this description concerned the tested antibiotic, in orange otherwise. Blue represents multidrug determinants.

APPENDIX

15/47 2 --> 21 the 19 following subgraphs shows the same min(q-value)=2.18E-06, among them some unitigs correspond to the MEX family (see below)

--> 13

There are only 3 non-susceptible strains in the panel. The 13 first subgraphs show a min(q-value)=4.43e-47, among them some unitigs correspond to the MEX family (see below) Resistome-based GWAS results for M. tuberculosis resistance to antibiotics.

For each antibiotic, the 10 first features most associated to the phenotype were reported, with their rank, q-value, and estimated effect (estimated of the linear model). The type of targeted variant, with its gene annotation were also provided. Comments were coloured if the annotation was previously described in antibiotic resistance literature: in green if this description concerned the tested antibiotic, in orange otherwise. The last column presents the corresponding subgraphs found by DBGWAs, with their rank and min q .

Fosfomycin

* when several variants are described for a gene, only the first one (with the min q-value) is given in this table no association found Resistome-based GWAS results for P. aeruginosa resistance to antibiotics. For each antibiotic, the 10 first features most associated to the phenotype were reported, with their rank, q-value, and estimated effect (estimated of the linear model). The type of targeted variant, with its gene annotation were also provided. Comments were coloured if the annotation was previously described in antibiotic resistance literature: in green if this description concerned the tested antibiotic, in orange otherwise. The last column presents the corresponding subgraphs found by DBGWAs, with their min q . Supplementary Material S3.11 Supplementary Material S3.13: Benchmarking DBGWAS, pyseer and HAWK: comparison of time and maximal memory load. The total execution time is presented with the maximal memory consumption in parenthesis, in order of GBs. For pyseer and HAWK, the time and memory for each step is also detailed. All tools were ran on a same machine with 8 Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz cores, 315 GB of RAM and 1 TB of disk space. Each execution used all the 8 available cores. The datasets are described in the Datasets subsection of the Methods section. However, for the three large panels (Large TB, Large SA, and Large PA), here we just chose a random 2,500-genome sub-panel. Moreover, DBGWAS was ran with the default parameters, without optional steps (lineage eect analysis nor annotation of subgraphs). The parameters for pyseer and HAWK were the ones described in the k-mer-based GWAS subsection of the Methods section. We did not consider the time and memory consumed in the last step for these two tools (downstream analysis). The runs taking more than 5 days to nish were interrupted and are shown as Timeout. The runs that exceeded 1 TB of disk space were interrupted and are shown as DQE (Disk Quota Exceeded). runs presented in this table were executed with the default parameters, without optional steps (lineage eect analysis nor annotation of subgraphs), on a single Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz core. The datasets are described in the Datasets subsection of the Methods section. DBGWAS ran in less than 2,5 hours for all experiments in our benchmark. The maximum memory load (given between parenthesis in the Runtime column) was 11 GB of RAM. The panel size and genome length (given between parenthesis in the Panel column) did not drive alone the running performances; the genome complexity played an important role as well. To view the gain in performance of DBGWAS when running on multiple (8) cores, see S3.13 Suppl. Response to the reviewers:

Panel (gen len

We are very grateful to the reviewers for their accurate and valuable comments which helped us to improve the manuscript. We addressed all the reviewers' comments below and we updated the manuscript accordingly.

In particular, as suggested by several reviewers, we worked on the portability of the distributed binary, and used the Holy Build Box We also fixed some other software related issues, like correcting the building process, and improving the interaction of DBGWAS with its third-party dependencies. Furthermore, we drastically modified the benchmark conditions as we upgraded SEER to pyseer, and created dedicated single-species large datasets to assess the computational scalability of the three evaluated tools. For this purpose, we removed the WHO panel and used instead all P. aeruginosa, M. tuberculosis and S. aureus genome assemblies available on the NCBI, and produced simulated phenotypes for them. We also tried to upgrade HAWK from v0.8.3-beta to v0.9.8-beta, since only the last version allows for population structure correction, but unfortunately the results obtained with HAWK v0.9.8-beta were a lot poorer than with the previous version. As such, we decided to keep HAWK v0.8.3-beta in our benchmarks.

Following the reviewers' suggestions, we also modified the text structure of the Results section and integrated parts of the Supplementary materials in the Methods section.

We hope this new version will fulfill the reviewers' expectations. Sincerely, M. Jaillard et al. We thank the reviewer for this remark. First, we acknowledge that the position of the final section of the previously submitted manuscript was misleading. We did not mean that the other GWAS methods would not find novelties. We wanted to highlight that our method was able to find original hypotheses. We hope that the modified order of the sections avoids this ambiguity. We also modified the introduction of this section to avoid any confusion. See in the Results section 'DBGWAS provides novel hypotheses' (check the red text in lines [START_REF] Setakis | Logistic regression protects against population structure in genetic association studies[END_REF][START_REF] Sheppard | Genome-wide association study identies vitamin B5 biosynthesis as a host specicity factor in Campylobacter[END_REF][START_REF] Slatkin | Linkage disequilibriumunderstanding the evolutionary past and mapping the medical future[END_REF]. "In addition to resistance markers, all three k-mer-based approaches reported several unknown variants, not described in the context of resistance."

Second, we would like to clarify an important element regarding the difference between testing k-mers and unitigs : the set of statistical tests performed by our method is identical to the set obtained by testing presence/absence patterns of all k-mers, after duplicate removal. Indeed the presence/absence pattern of each unitig is the same as the pattern of the k-mers it summarizes so the compaction does not create new patterns, and the set of unique patterns obtained after removing duplicates is the same whether using unitigs or k-mers. We apologize if this point was already clear but we wanted to be sure that there was no confusion about it. To avoid any confusion for the reader, we added a paragraph explicitly explaining this in the Methods section 'Unitig presence across genomes' (check the red text in lines 404-408). "Importantly, both k-mers and unitigs lead to the same set of distinct patterns across the genomes. Indeed, every unitig represents (at least) one k-mer, and conversely every k-mer is represented by one (single) unitig. When de-duplicated, the two representations therefore lead to the same set of patterns to be tested for association with the phenotype."

Finally, as shown in Tables 2 and3, the novelties found by the 3 k-mer-based methods are not the same. The differences are not a consequence of testing unitigs rather than k-mers, but arise from several elements: • Even though the 3 methods are based on k-mers, their pre-processings differ and lead to different variant matrix. For example, SEER's informative k-mers are based on several values of k, while DBGWAS and HAWK only use one value. As a side note, as of now we were not able to establish a formal relationship between unitigs obtained by compacting k-mers with a given value of k, and informative k-mers obtained for k in [k_min, k_max].

• DBGWAS, HAWK and SEER use different testing procedures to test a given profile, which will lead to different decisions as to which ones are significant. As pointed out, these differences are not a consequence of the novelty introduced by DBGWAS, as we rely on an existing method (bugwas) for our testing procedure.

•

The different downstream analyses may also impact the interpreted results. k-mers which do not map to a reference cannot be interpreted. By contrast, DBGWAS always returns a subgraph containing these k-mers. Even when no annotation exists, the topology and colors of the subgraphs may hint towards the nature of the causal variant. The pHS87b plasmid output by DBGWAS for amikacin resistance for example would only be found by HAWK or SEER if present in the references used in the downstream mapping, while DBGWAS provides a large linear subgraph with all red nodes pointing towards an unknown resistance-associated MGE.

We now highlight this last point, which, as underlined by the reviewer, is the bulk of our contribution: the downstream representation of unitigs in subgraphs, clustering them by neighborhood provides consolidated information which help in the interpretation -even without available annotation. See in the Results section 'DBGWAS facilitates the interpretation of k-mer-based GWAS' (check the red text in lines 228-236). "The thousands of k-mers generated by HAWK and pyseer are of course also amenable to interpretation: to build our Table 3, we mapped these k-mers to references and extracted annotated variants which showed at least one hit. However, doing so required additional efforts and a working knowledge of the most appropriate annotated references. In addition, k-mers which do not map to the chosen reference cannot be interpreted. By contrast, DBGWAS always returns a subgraph containing these k-mers.

Even when no annotation exists, the topology and colours of the subgraphs may hint towards the nature of the causal variant."

1.2. The annotation of the output graphs is very important, and it is difficult to interpret the results without it. As far as I can tell, the process for making this annotation seems to require some manual curation. Could more guidance on this be provided?

DBGWAS integrates a first-level automated annotation which can be customized depending on the studied topic. Indeed, by adding -nc-db and/or -pt-db options to the DBGWAS command, providing respectively paths to nucleic and/or proteic Fasta files with annotated headers, a Blast is computed during DBGWAS step 3 on all nodes of all output subgraphs. The annotation is consolidated at the subgraph level and also summarized in the summary page, with information of how many nodes each annotation maps to, the minimal E-value, and any other custom fields specified by the user. It can further be used in the subgraph page to query the nodes carrying a specific annotation and thus retrieve a gene location. Importantly, DBGWAS works with any nucleotide or protein Fasta files as annotation databases straight away. However, the user can customize the annotation databases by changing the Fasta sequence headers to aid the interpretability of DBGWAS results. Indeed, DBGWAS reads specific tags and parses organized fields which are then used in the resulting summary page or to fill the annotation table in the subgraph page. A common example is compacting the annotation in the summary page by using abbreviations or gene class names, and expanding them to full names in the subgraph page. Other custom fields can also be included in the annotation table by adding specific tags to the headers. We also provide users with 2 annotated Fasta files, one containing known resistance determinants and the other containing all Uniprot bacterial proteic sequences (see https://gitlab.com/leoisl/dbgwas#dbgwas-in-a-nutshell-running-the-tool-in-one-example). It may happen that the Fasta files used for the automated annotation do not contain hits for some nodes and thus these nodes are finally not annotated. In this case, the user can either provide a more complete annotation file (containing for instance non-coding regions), or can do the annotation afterwards by manually blasting the node sequences (Fasta export can be retrieved with a right-click on the subgraph). Note that a DBGWAS run, which had initially been launched without the annotation step, can be re-annotated afterwards using the -skip2 option. In this case, only step 3 will be launched. We heavily modified the Methods section 'Annotating the subgraphs' (check the red text in lines 497-505) and added these two sections: https://gitlab.com/leoisl/dbgwas#customizing-annotation-databases and https://gitlab.com/leoisl/dbgwas/wikis/Customizing-annotation-databases to the tool's website in order to provide guidance to the user on this aspect. Finally, to help even further the interpretation of the output graphs, we are currently working on a tool which will offer a prediction for the nature of the subgraphs. We are training predictive models over a large number of both real and simulated subgraphs which we know to describe SNPs or MGEs, and applying the trained models to the output of DBGWAS. We will not be able to add this option to the next release of DBGWAS, but it will be described in Magali Jaillard's PhD manuscript and offered as soon as possible in a future release.

1. We agree with the reviewer and thank him for his suggestions.

Here is what we have changed:

we removed the previous S1 Appendix from the supplementary materials and now provide it as a Wiki page available online at https://gitlab.com/leoisl/dbgwas/wikis/DBGWAS-web-based-interactive-visualization , and also referenced on the webpage for the tool at https://gitlab.com/leoisl/dbgwas#learning-how-to-use-the-dbgwas-web-based-interactive-vi sualization ;

we integrated text from (previous) S2 Appendix and removed it from the appendices, and figs S7 and S8 in the Methods section 'cDBG construction' (check the red text in lines 368-381). We kept only figures S9 and S10 as supplementary materials;

we chose to keep the previous S3 Appendix as the new S1 Appendix, since integrating it in the main document would increase significantly the Methods section, which we would rather keep focused on the description of the 3 steps implemented in DBGWAS;

we integrated information from S4 Appendix, which was not in the main document, in the Methods sections 'Significance threshold' (check the red text in lines 447-452) and 'Graph neighbourhoods' (check the red text in lines 467-468) and removed it from the appendices;

we removed S5 Appendix.

Thanks to these modifications, there is only one remaining supplementary Appendix.

1.4.

The WHO panel, used only for time and memory comparisons, should be removed. I think this cross-species collection is an unrealistic use of bacterial GWAS and leads to an inflation of computational resources required for all the methods tested. It would be more useful either to extrapolate times based on knowledge of the processes required, or test on a larger single-species dataset.

The reviewer is right. We removed the WHO panel and replaced it by 3 single-species large datasets, in order to analyse the computational performance at this scale. To do so, we gathered all genome assemblies of Mycobacterium tuberculosis (5,504), Staphylococcus aureus (9,331), and Pseudomonas aeruginosa (2,802) available on the NCBI RefSeq bacterial genome repository, and removed poor quality genomes. For each panel, we generated random binary phenotypes.

Extrapolating time for DBGWAS cannot be done globally, as the time not only depends on the number of analysed genomes, but also on their length and homology/complexity. In order to assess the scalability of DBGWAS, we built several sub-panels from these three large panels at size points of 100, 250, 500, 1,000, 2,500, 5,000 and 9,000 genomes. To build each such sub-panel, we sampled genomes at random from our large panel. The execution of DBGWAS on all these panels was also done on a cluster, instead of a single machine, and used 8 cores each. In order to account for subsampling and machine heterogeneity problems, each sub-panel was randomly built 10 times. We present in (new) S9 Figure the time and memory usage performance curves for all these panels, which allows a better understanding of DBGWAS performance behaviour and estimations of the computational resources usage on small and large panels with different genome plasticities. The longest run was for one of the S. aureus 9,000 genome subpanel, which took less than 5 days and 250 GB of RAM on 8 cores. DBGWAS performance was generally log-linear in the panel size, and is strongly affected by the number of input genomes, as well as their sizes and plasticities. The more clonal a genome population is, the less time and memory are required. Likewise, when comparing DBGWAS against pyseer and HAWK in (new) S2 We now reference treeWAS in the Methods (in lines 412-413):

"Population structures can be strong in bacteria because of their clonality [START_REF] Ali-Ahmad | Structural and functional insights into the periplasmic detector domain of the GacS histidine kinase controlling biolm formation in Pseudomonas aeruginosa[END_REF][START_REF] Amsler | Comparison of broth microdilution, agar dilution, and Etest for susceptibility testing of doripenem against Gram-negative and Gram-positive pathogens[END_REF][START_REF] Drezen | GATB: genome assembly & analysis tool box[END_REF][START_REF] Drouin | Greedy biomarker discovery in the genome with applications to antimicrobial resistance[END_REF]." [START_REF] Drouin | Greedy biomarker discovery in the genome with applications to antimicrobial resistance[END_REF] is the reference to treeWAS. We did not specifically work on LD within (nor between) the subgraphs, even though would be an interesting field to explore. In particular, the subgraph concept may help highlight local LD, which is not straightforward in reference-free k-mer-based methods. However, subgraphs are not always the right entity for local LD as connected unitigs can represent distant regions which just happen to share a subsequence. When we mentioned LD in Table 1, we based our tags on the annotation: we hypothesized for example that subgraphs mapping to the SCCmec cassette were in LD with the mecA gene. We now modified this part by adding a quantitative LD information and provide in Table 1 a measure of the correlation (r² value) of each subgraph with the first subgraph. It is computed between the minor allele presence patterns with the min_q of the first subgraph and the considered subgraph. This measure is a good proxy for LD. As an example, in S. aureus resistance to methicillin, subgraphs annotated as parts of the SCCmec cassette have an r² value > 0.9, and can be considered to be in LD with the causal gene.

1.7

1.8

Results: The datasets used are relatively small for GWAS. Can the authors predict how the tool scales in terms of memory and CPU usage for larger datasets, and give an estimate for 10 3 -10 4 samples? This could also be noted in methods lines 305-315.

We included in the manuscript a new study to evaluate the scalability in terms of time and memory usage of our tool. As mentioned in our answer to major comment 1. The multiple testing burden is not lowered when using unitigs, as both k-mers and unitigs lead to the same de-duplicated pattern matrix (see also response to major comment 1.1). This point is now explicitly mentioned in Section "Unitig presence across genomes" (check red text in lines 404-408), it indeed deserved some clarifications. Moreover, S1 Table now provides for each species-antibiotic couple the number of distinct k-mers, distinct unitigs, and distinct de-duplicated patterns (which is the number of association tests performed).

1.10

Results: I wondered how well the unitig approach would cope with complex regions of the genome, as I was concerned that close SNPs may split up the graph into low frequency paths and lose association power (a known problem with k-mers). [I tested this by using DBGWAS to run an analysis for beta-lactam resistance in S. pneumoniae, which is caused by mosaic alleles of three pbp genes. DBGWAS, with default settings, returned five hits, which using blastn of the sequences of the most significant nodes of the graph against a reference genome could be determined to be pbp2b, pbp2x, pbp2x, pbp1a, and pbp2x (ordered by q-value). I was very impressed by this result, and it could be a useful example for addressing this concern. We thank the reviewer for pointing out pyseer, the updated version of SEER. We fully replaced SEER by pyseer in this work (including the text and the benchmarks).

When running SEER, we used fsm-lite for k-mer counting, Mash v2.0 for population structure estimation, and then SEER itself. Regarding the runtime, on the M. tuberculosis and P. aeruginosa panels, the k-mer counting procedure is the most expensive step. On the S. aureus and the WHO panels on the other hand, the SEER step was the most expensive one. Regarding memory usage, fsm-lite always used several Gigabytes, while Mash and SEER never exceed 150mb. The large memory use of the pipeline was therefore from fsm-lite in the k-mer counting procedure, as suspected by the reviewer. The raw numbers we logged from SEER's executions can be seen here:

We also would like to point out a mistake on our end. We executed fsm-lite as:

fsm-lite -v -l fsm_files.txt -t tmp_idx -s 10 -S 593, following the SEER tutorial at https://github.com/johnlees/seer/wiki/Tutorial . However, we did not realise that the parameters -s and -S should vary according to the panel size. So, all the SEER runs presented in the first submission of this work had this problem. We fixed this on the pyseer runs following the instructions at https://github.com/johnlees/seer/wiki/Usage#count-your-k-mers . Since we use a 1% minor allele frequency cutoff in DBGWAS and pyseer, we set -s = 0.01 * PS and -S = 0.99 * PS, where PS is the panel size.

In order to: 1) avoid errors on executing other tools again; 2) be transparent on how we ran pyseer and HAWK; 3) provide reproducibility of our results; we decided to make public the scripts we used to run pyseer (available here: https://gitlab.com/leoisl/DBGWAS_support/tree/master/scripts/pySEER ) and HAWK (available here: https://gitlab.com/leoisl/DBGWAS_support/tree/master/scripts/HAWK_0_8_3_beta ). These links were added to the Methods section 'k-mer-based GWAS' (check the red text in lines 621 and 637).

To help the readers understand pyseer and HAWK performances, and to solve potential similar readers doubts, we also modified the (new) S2 Table by adding how much time and memory each step of pyseer (fsm-lite, Mash v2.0, and pyseer itself) and HAWK (Count k-mers, HAWK itself, ABYSS and Stats) took, besides the total time and maximal memory of both pipelines. pyseer took longer to run than SEER. We believe that it might be due to: 1) pyseer having more k-mers to analyse, due to our incorrect usage of the fsm-lite parameters in SEER's pipeline; 2) SEER filtering out k-mers by raw p-value at the begin of the process, while we used the --lrt-pvalue parameter when running pyseer, which does lrt-p-value filtering at the very end of the process.

Consequently, pyseer has more computational steps to perform.

The main sections that were updated due to replacing SEER by pyseer were: 1) Results section 'DBGWAS reports expected variants without prior knowledge': SEER and pyseer found the same resistance determinants for P. aeruginosa levofloxacin (new Table 2). pyseer found more "Determinant described for other antibiotics" for M. tuberculosis streptomycin (new Table 3). Overall, the qualitative results are similar;

2) Results section 'DBGWAS is fast, memory-efficient, and scales to very large panels': a breakdown of pyseer's performance is provided in S2 Table ;   3) Methods section 'k-mer-based GWAS', where we describe how we installed and ran pyseer, and provide pyseer's scripts for reproducibility reasons.

Finally, we do not believe that cDBGs offer a more scalable way to count k-mers, since in order to build unitigs, algorithms usually need to first find or count the k-mers themselves. In DBGWAS implementation, for example, the first step is to count k-mers using DSK (G. Rizk, D. Lavenier, R.

Chikhi. (2013) DSK: k-mer counting with very low memory usage, Bioinformatics, 29(5):652-3), in order to build the DBG and then compress it into a cDBG.

1.13

Results: In the method comparison, the most useful statistics to state for each run and method would be discovery power and false discovery rate rather than the number of signals found. The fairest comparison with k-mer methods, rather than the total number of individual k-mers, would be to map these to a reference and compare the number of genes they overlap (or take 1kb windows), which is usually how the downstream interpretation of these results is performed.

We agree that users could map k-mers output by SEER or HAWK to a reference (when available and annotated). By displaying the number of signals found (k-mers for SEER/HAWK, subgraphs for DBGWAS), we wanted to highlight the main contribution of DBGWAS, which is to aggregate the results in a more interpretable form, compact overlapping k-mers with identical presence/absence profiles in a single unitig, and exploit the colored DBG to understand its genomic context. After DBGWAS is run, the user is left with subgraphs which often correspond directly to SNPs, hotspots containing several SNPs or MGEs -admittedly, subgraphs are sometimes less clear, for example when several events are aggregated together, and we now acknowledge this point in the 'DBGWAS facilitates the interpretation of k-mer-based GWAS' section (check the red text in lines 255-274). Notably even if no annotation is available, these subgraphs retain their interpretability asunannotated -SNPs or MGEs.

We modified Section 'DBGWAS facilitates the interpretation of k-mer-based GWAS' (check the red text in lines 228-236) to make it clear that the k-mers output by SEER and HAWK could also be post-processed (we actually perform this post-processing to build Tables 2 and3) but we also think it is useful to show how many k-mers they would output because this post-processing is a non trivial, additional step. Regarding power and FDR, they would require a set of known negative examples to be computed whereas we only have access to a small number of validated positive examples. Consequently, we chose to compare the number of known causal elements detected as significant by every method after post-processing.

1.14

Discussion line 236: What exactly are the 'strong prior assumptions'?

We modified the first paragraph of the Discussion (check the red text in lines 308-310): "It performs as well as the current SNP-and gene-based gold standard approaches for retrieving known determinants, from genome pre-assemblies and without relying on annotations or reference genomes."

1.15

Discussion line 248: The HAWK paper tests the use of k-mers in human genomes (which also contain complex variation and an accessory genome), so may be worth citing again here.

We cite HAWK paper in the Discussion when mentioning work on human tumours (check the red text in line 321): "...they pave the way to GWAS on highly plastic bacterial genomes and would also be useful for microbiomes [START_REF] Chewapreecha | Comprehensive identication of single nucleotide polymorphisms associated with beta-lactam resistance within pneumococcal mosaic genes[END_REF] or human tumours [START_REF] Barczak | RNA signatures allow rapid identication of pathogens and antibiotic susceptibilities[END_REF]." ([13] is HAWK)

1.16

Discussion line 251: I would consider allowing for continuous phenotypes in the initial release -many users will have these. I think the underlying model being fitted is already continuous?

We are currently working on this feature, which still requires some work on the interfaces (currently tailored for binary outputs), and further beta testing to be safe. Unfortunately we will not be able to integrate it in the initial release but plan to add it soon. 1.17 Discussion: Final paragraph. The main advances are the more intuitive variant representation, potentially lower multiple testing burden, and integrated software and visualisation. I would state these in the final paragraph instead of or as well as the general use of GWAS and antibiotic resistance mechanisms, which have been described before.

We modified the last paragraph of the Discussion (check the red text in lines 341-343): "Our integrated software and visualisation tools offer an intuitive variant representation, hence will provide future users with an enhanced insight into genotype to phenotype correlations, in all domains of microbiology, beyond that of antibiotic resistance."

1.18

Methods lines 320-324: While removing duplicate patterns is necessary to get the correct q-values, this could potentially lose information. It would be better to test all unitigs but use an FDR correction based on the number of patterns. This is partly noted in line 351-353, but I was still unclear whether a pattern can still be related to multiple unitigs in the final step (step 3). Looking at the output files I think this is done, but this needs to clarified in the text.

We modified text at the beginning of the Methods section 'Interpretation of significant unitigs (step 3)' to make it clear that step 3 is done at the unitig level, without loss of information (check the red text in lines 439-444): "The LMM is used to identify de-duplicated minor allele presence patterns significantly associated with the phenotype at a chosen FDR level. While the testing step is done at the pattern level, the interpretation of the selected features is done at the unitig level. As a result of the de-duplication procedure, a given pattern may correspond to several distinct unitigs. To faithfully interpret the results, all the unitigs corresponding to the significant patterns are retrieved and are assigned the q-value of their pattern."

1.19

Methods line 342: It needs to be stated exactly how W is calculated from Z.

We detailed the construction of W from Z in the Methods section 'Testing unitigs for association with the phenotype (step 2)' (check the red text in lines 431-432): "$W$ is estimated from the $Z$ matrix, which includes duplicate columns representing both core and accessory genome. More precisely, denoting $Z = U\Lambda V^\top$ the singular value decomposition of $Z$, we use $W = U\Lambda^{\frac{1}{2}}$."

1.20

Methods: The potential sensitivity of results to the SFF concerned me at first, but after seeing the various supplementary material and description I better understood its use. The use of the default value on trial data also seemed appropriate. Might I suggest an alternative option to set the number of connected graphs reported in the output, rather than the top 100 unitigs themselves? Users will care mostly about each graph and its annotation, rather than individual unitigs. From the perspective of downstream lab follow-up, I think it is probably sensible to set a maximum number on these graphs/regions.

We thank the reviewer for the idea. We study how to implement it in a future release, however this proposition has the same cons of the current SFF parameter: it may generate subgraphs with high q-values, as q-values are computed at the unitig level and not at the subgraph level. For now, we are working on improving this by applying a double filter, on both top patterns and q-value threshold together.

1.21

Methods line 549: I didn't like the term resistome/RWAS, and found it confusing when used in the results. Are we sure these variants always explain 100% of resistance and/or are all possible resistance conferring variants? The analysis itself is useful, but it would be clearer to describe this as a comparison between unitigs and known/ positive control resistance SNPs and genes under the same association model.

We replaced 'RWAS' by 'resistome-based association study' and better defined in the Methods (new) section 'Resistome-based association studies' what we mean by 'resistome' (check the red text in lines 585-589): "We benchmarked DBGWAS against a targeted approach to ensure its ability to retrieve all expected resistance determinants. We thus performed association studies under the same model, using as input a collection of known causal resistance SNPs and genes, defining the resistome."

1.22

Table 1: Effect sizes would probably be more usefully represented as odds-ratios. Could ORs also be used as an option to colour the DBG (methods line 383), and stated for the result on line 208 (which does not currently incorporate the population structure used in calculation of the associated q-value).

OR is indeed a more interpretable measure of association between a covariate and a binary phenotype. However, a crude OR estimation would not take into account the effect of population structure and we could observe discrepancies between OR estimation and min_q ordering. That is why we chose to present in Table 1 the effect estimated by DBGWAS, i.e the linear effect of a unitig on a binary phenotype adjusted for population structure. Nevertheless, as suggested by the reviewer, in a future version of our tool based on a logistic model, we could add population-structure-adjusted ORs.

1.23

Table 1: How were the annotations in the final column determined? Was it through the use of unitigs, or previous knowledge?

We used the unitig sequences to find their annotation (thanks to the automated annotation included in DBGWAS, completed when needed by manual annotation using blast) (column 'Annotation'), then we used previous knowledge from the literature (see 'Reference' column in S4-6 Tables) to define if the annotation was already described as a positive. In the case of SNP, we also check the SNP position to define if it had already been described (using the mubii tool for instance).

Figures: I would

1.25

Figure 2: This is the actual output of DBGWAS? Make this clear in the legend and the text, as I think this will appeal to potential users.

We thank the reviewer for the suggestion. We modified the (new) Figure 3

Typos:

1.27 Title: 'A fast and agnostic method'. Agnostic to what? Presumably type/source of variation -this needs to be stated.

We thank the reviewer for his suggestion but we would rather not change the title for the sake of concision. We hope the information given in the abstract / author summary helps to avoid any confusion but we would be happy to update it if the reviewer is concerned it may not be clear enough.

1.28

Title: You may consider changing from kmers to k-mers throughout, which is the more common form (useful for pubmed indexing etc).

We modified as suggested by the reviewer.

1.29

Abstract: First sentence of conclusion should be reworded. Without prior knowledge of what? Also change 'Our novel method proved its efficiency' -> 'Our computationally efficient method was able to'

We rephrased this sentence (check the red text in the Abstract): "Our method is computationally efficient and is able to retrieve phenotype-associated genetic variants such as local polymorphisms and MGEs without relying on prior annotation or reference genomes. We modified the sentence (check the red text in line 333): "classic phenotypic methods."

1.33

Methods line 312: 'size of the genome' -should this be size of the pangenome?

In this particular case, the correct term is 'size of the genome', since the procedure described produces a unitig-presence/absence vector representation of one given genome.

1.34

Methods line 323: 'below 0.01' -note that the user can specify this (important for larger or smaller datasets, as a count rather than frequency is most appropriate).

We modified as suggested (check the red text in lines 402-403): "-the user can specify this threshold using the -maf option."

1.35

Figure 3: This is a table, not a figure.

Previous Figure 3 is now splitted into two tables, new Tables 2 and3.

Appendix S1: I got a 404 error for all the links

It is now fixed. Thank you for pointing this. We were able to verify also that some PDF readers have problems correctly opening URLs spanning more than one line (i.e. including a line break). We made sure that all URLs are correct, but if this problem persists, please try clicking on the URL (copy-paste seems to be more problematic). We verified that all links worked with Adobe Acrobat PDF Reader.

1.37

Tables S3-5: Make sure these are available as supporting data (text file or similar) so they can be used by others, and not just as a PDF.

All GWAS results in (new) S3-S7 Tables are now provided as Excel files.

1.38

Figure S5 legend. There is an incorrectly rendered '<' which should probably be \textless.

It's now fixed. Thank you for pointing this.

Notes on software

I installed and ran DBGWAS on the provided test dataset, then on my own test dataset (as noted above).

Here are some notes I made while running through this process which may help improve usability:

1. [START_REF] Camacho | BLAST+: architecture and applications[END_REF] The static binary did not work for me on two different Linux machines due to a version mismatch of glibc (is this because they had Intel rather than AMD architecture?).

Would it be possible to make a fully static binary, or cross-compile for Intel too?

This response concerns the problems raised by multiple reviewers regarding the difficulties of installing and/or running DBGWAS, like precompiled binary incompatibilities, problems with the building process, etc. We are grateful for the reviewers for pointing out these problems, as we tested the packages in some of our and colleagues' machines, but we had not experienced any problems, so we were totally unaware of them. The detailed input of the reviewers allowed us to solve several problems in this aspect.

Precompiled binary issues

Regarding the precompiled binary, we were able to reproduce the problem stated by Reviewer 1 (item 1.39) by running the DBGWAS precompiled binary v0. However, the DBGWAS package not only relies on the DBGWAS binary, but also on 3 binaries from the Blast suite (blastn, blastx, and makeblastdb), the GEMMA binary and the phantomjs binary. We found the Blast suite binaries and the phantomjs binary to be reasonably portable and thus we did not recompile them. The GEMMA binary, however, did not work on some systems, like the Debian-7. We just forked this repository at https://github.com/leoisl/gemma0.93b , and used Holy Build Box (http://phusion.github.io/holy-build-box/) to create a static portable binary of this specific version of GEMMA. This new GEMMA binary is packaged with DBGWAS in v0.5.2.

Building process issues

Despite all our efforts, it could be that DBGWAS or the other binaries it uses might not work on a particular machine. To cover the case where the DBGWAS precompiled binary does not work, we improved the compilation process. We fixed two issues with DBGWAS compilation: 1) not recognizing CMAKE arguments (like -DCMAKE_BUILD_TYPE=Release, as pointed out by Reviewer 2, item 2.13); 2) wrong CMAKE version (as pointed out by Reviewer 1, item 1.41).

Since we were able to compile DBGWAS using Holy Build Box, which is built CentOS 5 (release date 12 April 2007) with a simple compiler toolchain (GCC 4.8.2, GNU make, CMake 3.6.3), we believe now that the source code can be compiled on a vast number of linux distributions. To cover the cases where the other packaged binaries do not work, we introduced three new parameters allowing the user to change the Blast, GEMMA and phantomjs executable paths: -GEMMA-path, -Blast-path and -phantomjs-path. As such, the user can compile or download their own versions of these executables and tell DBGWAS to use them through these parameters, instead of the ones packaged. Since phantomjs could be complicated to compile, and it is not essential in DBGWAS (i.e.

it only provides the components preview in the summary output page), we introduced the parameter -no-preview allowing DBGWAS to skip this step and thus do not call phantomjs.

Interfacing with R and bugwas

Reviewer 1 pointed out in item 1.42 that the main issue he had was interfacing with R and bugwas. Due to this, we now offer a command line option (-Rscript-path) allowing the path to Rscript to be user-specified.

Validation of the new package (DBGWAS v0.5.2)

To attest that the new precompiled binary truly works on older linux distributions, we tested DBGWAS v0.5.2 precompiled binary on Debian 7.11.0, Ubuntu 14.04.5 and CentOS 7. However, we conjecture that it works on all distributions supported by Holy Build Box.

We are grateful for the reviewers' feedback, which allowed us to improve the compatibility of DBGWAS precompiled binaries and its building process. We do hope they will now be able to use the software more easily.

1.40

The download is very large and takes a long time to extract -is this because of boost? I think it is possible to just include the boost libraries you are using, I would consider doing this.

Thanks for pointing out the problematic large size of the repository. We just include the Boost library version we need, and also as a compressed file -it is extracted only when building the package. However, we hope the users will download the new portable precompiled binary instead of cloning the repository and compiling DBGWAS. DBGWAS v0.5.2 precompiled binary package is indeed still heavy, (182 Mbs). We could verify that more than half of it, 96 MBs, comes from the packaged sample example. The remaining 86 MBs comes mainly from the statically built binaries, which increase a lot the size of the executable due to the packaging of its dependencies in the executable. We could indeed remove the sample examples from DBGWAS package, reducing the package size from 182 MBs to 86 MBs, but we have a slight preference on providing a heavier, but complete package.

1.42

The main issue I had was the interfacing with R and bugwas. The Rscript on my path was the wrong version for bugwas, and (I think) due to the way the command is being run from C++ none of the bash tricks I tried to fix it would work. In the end this required me to edit the hard-coded R command in the source code and recompile from scratch, which is something I think many users would avoid. I would offer a command line option allowing the path to 'Rscript' to be user-specified, but also consider allowing the whole R command to be changed without recompiling.

Please see response of item 1.39

Reviewer #2:

Jaillard et al. present their software tool, DBGWAS, as an alternative to existing bacterial GWAS methods (and possibly GWAS methods more broadly) for identifying genetic variants associated with a phenotype. Their major argument for the utility of their approach is that it strikes a balance between the flexibility of a k-mer based approach for detecting a range of types of genetic variation that may be associated with phenotype, and the interpretability of mapping-based methods. They achieve this by taking 31-mer words from assembled contigs and forming a collapsed de Bruijn graph from them. 'Unitigs' formed in the de Bruijn graph are then attributed to different isolates based on their constituent k-mers. After collapsing redundant presence/absence patterns, these unitig patterns are then tested for association with phenotype using bugwas. A graphical interface aids in visualising and interpreting results. This is a novel contribution to the suite of tools available for performing GWASs, and I think it will prove popular provided the software is easy to install and enough help is provided for interpreting results. I like the idea of this tool, and look forward to trying it on my own data, however I think the presentation and benchmarking of the software in this paper could be improved upon. Critically, installation of the software needs to be more straightforward, and more help needs to be provided in interpreting graphs that don't follow the straightforward structure presented in Fig 2 .  Minor comments:

2.1

Trees showing the population structure for each test dataset, and labelling phenotype on tips would give us a better idea of the structure of the datasets and differences between them.

We thank the reviewer for this comment. DBGWAS provides these trees with tips showing the observed and predicted phenotypes when the user specifies the -newick option and provides a newick file (these trees are produced by the bugwas package). We provide an example of these trees at http://pbil.univ-lyon1.fr/datasets/DBGWAS_support/full_dataset_visualization/ (click on the "Show figures on lineage effect" button). We added a paragraph in the Methods section 'Testing unitigs for association with the phenotype (step 2)' to make this clear (check the red text in lines 421-424): "DBGWAS optionally provides bugwas lineage effect plots when the user specifies a phylogenetic tree using the -newick option. An example of the generated figures is available at http://pbil.univ-lyon1.fr/datasets/DBGWAS_support/full_dataset_visualization/ ."

2.2

Listing counts of isolates carrying hits not previously associated with phenotype is not sufficient to indicate a significant difference, since most isolates carrying a unitig could be all from one clone. Allowing the mapping of the unitigs to a tree would allow better assessment of how convincing a hit is.

The reviewer is right, counts of isolates are not corrected for the population structure and are not sufficient to indicate a significant difference. Our testing procedure relies on bugwas to take into account the population structure, so the resulting beta coefficient and associated q-values are the reliable measures of significance. The node colors in subgraphs output by our step 3 are derived from the estimated beta coefficient from the LMM, not from a crude statistic based on isolated counts. Both in DBGWAS and our results section, counts are only provided as an additional information. We verified that the counts reported for the second subgraph of amikacin resistance for P. aeruginosa (13/47 resistants, 1/233 sensitives) were not triggered by a single clone: as shown on the figure below, the 13 resistant strains carrying the significant unitig (highlighted in orange) belong to two different phylogroups. 11 of them are reasonably spread out in Phylogroup 2 while 2 others belong to Phylogroup 1, which also contains the sensitive strains carrying the unitig (highlighted in blue). We now clarify this point in the Results section (check the red text in lines 199-202): "This annotation was not an artefact of the population structure, properly taken into account by the linear mixed model. Indeed the 13 resistant strains corresponded to distinct clones belonging to two phylogroups, one of them containing the susceptible strain."

Reviewer 3:

Overall I enjoyed the paper as it is a neat idea for tackling the gap between kmer and SNP approaches. It is quite a dense manuscript in terms of content -the authors have clearly done a lot of impressive work-and their method is clearly successfully working. I have a few comments however:

3.1

The paper is fairly statistics heavy, and I think it would benefit from a longer more drawn out explanation of the approach in the introduction. I found it a bit challenging to understand on the first read.

Thank you for highlighting this difficulty. We moved a brief explanation of the pipeline, together with the pipeline overview figure (new Fig 2 ), to the beginning of the Results section, which we hope will help the readers (check the red text in lines 64-75): "We developed DBGWAS, available at https://gitlab.com/leoisl/dbgwas, and validated it on panels for several bacterial species for which genome sequences and antibiotic resistance phenotypes were available. DBGWAS comprises three main steps: it first builds a variant matrix, where each variant is a pattern of presence/absence of unitigs in each genome. Each variant is then tested for association with the phenotype using a linear mixed model, adjusting for the population structure. Finally, it uses the cDBG neighbourhood of significantly associated unitigs as a proxy for their genomic environment. DBGWAS outputs a set of such subgraphs ordered by minq, which is the smallest q-value observed over unitigs in each subgraph. The top subgraphs therefore represent the genomic environment of the unitigs most significantly associated with the tested phenotype. Fig 2 summarises the main steps of the process. A detailed description of the pipeline is presented in the Methods section." 3.2 I think there needs to be more discussion of multiple testing and how significance is defined. In my mind the problem of large numbers of correlated kmers is one of the big problems with the kmer approach, and so any sense of whether the approach described here can make advances would be appreciated. As it stands however I feel the definition of 'significant' associations is arbitrary to the point of being hard to judge how well the results would stand up in a less extreme phenotype than antibiotic resistance (where the hits are very clear)

We acknowledge that the definition of the significance was not enough explicit in the document, and added an additional sentence for the readers, in Method section 'Significance threshold' (check the red text in lines 447-452): "The interpretation step focuses on the unitigs with the lowest q-values. These unitigs are indeed used to build the resulting annotated subgraphs. The unitig selection can be either based on the FDR (q-value thresold) or on a number of presence/absence patterns ordered by increasing q-values. Practically, this is done in DBGWAS using a Significant Features Filter (SFF). For a selection based on a FDR threshold, the SFF value is set between 0 and 1, while any integer value > 1 defines the number of patterns to consider."

To answer your remark about multiple testing, we take the test multiplicity into account by returning q-values rather than uncorrected p-values. Admittedly, unitig presence/absence profiles can be highly correlated. The correlation is typically positive: even if two k-mers are mutually exclusive, their presence profiles are the same since all profiles are converted to their minor allele version before they are tested. Under such positive dependency, the Benjamini-Hochberg procedure that we use still controls the FDR as the q-value it provides is an upper bound on the true FDR. The major problem in this case is that the variance of the FDP around the FDR increases with the level of dependency, and the FDR itself becomes less informative. Unfortunately, to the best of our knowledge there is no better alternative. We discussed this point with multiple testing experts and would like to find better alternatives in the future but we are not making any advance to this problem in this paper.

The use of BH method was made more clear in the Methods, 'Testing unitigs for association with the phenotype (step 2)' (check the red text in lines 434-437): "To tackle the situation of multiple testing caused by the high number of tested patterns, we compute q-values, which are the Benjamini-Hochberg transformed p-values controlling for false discovery rate (FDR) [START_REF] Durieux | Widespread natural transformation in Legionella pneumophila clinical isolates[END_REF]." and we discuss about possible improvements the Discussion (check the red text in lines 322-325): "DBGWAS currently relies on the Benjamini-Hochberg procedure to control the FDR and offers no advance exploiting the dependence among presence/absence patterns. An important improvement would be to control the false discovery rate at the subgraph level instead of the unitig level."

3.3

On a similar note the novel associations are very hard to judge as there is no way to tell if they are truly causal (a pro of the method) or just random noise (a con). I think some work should be done here to at least try to dig into this further -even if purely just splitting samples into replication and discovery samples and looking at how well novel associations in the discovery sample replicate (rather than wet lab work).

We agree that not being able to tell apart truly causal and spurious associations among novel associations is frustrating. We believe however that solving this problem would necessarily require wet lab experiments. Unfortunately, splitting samples into replication and discovery would only say something about the robustness of the statistical association between variants and phenotypes, not their being causal. A SNP which is strongly associated with resistance by LD for example could be validated by this approach, whereas a truly causal SNP with weaker association could fail.

In the absence of wet lab experiments, we chose to (i) assess how well DBGWAS would recover known determinants and (ii) describe novel associations and, when possible, how likely they were to be truly causal. Some of them (e.g. L650M amino-acid change for P. aeruginosa resistance to levofloxacin) evoke possible resistance mechanisms. Others (see (new) Table 1) are likely to be caused by a selection bias in the design of the panels (orange 'CR' (for 'co-resistance') in the last column) or LD (high r² index in the last column). Finally, we also assessed the ability of DBGWAS to tell apart truly causal and spurious associations using simulated data, where we knew the true causal elements. The results were previously presented in a separate bioRxiv pre-print (https://www.biorxiv.org/content/early/2017/03/03/113563) and are now included as an appendix to this manuscript (new S1 Appendix).

3.4

The results are compared to SEER, but I believe pyseer is probably a better comparison for speed.

Figure 2 .

 2 Figure 2.3 qui en a résulté nous a encouragé à exploiter cette couche d'information supplémentaire: en eet, les mutations de la région QRDR ( quinolone resistance determining region) connues pour conférer la résistance à la levooxacine apparaissent très clairement avec cette visualisation: les n÷uds rouges représentent les allèles très présents dans les souches résistantes et les n÷uds bleus ceux très présents dans les souches sensibles.

  a trade-o between the model bias (model adjustment) and variance (generalisation to other data). This trade-o is explicitly expressed in the model, which is composed of a loss function (model adjustment) and a penalty (regularisation of the model complexity), as shown in Eq. 5.

Figure

  Figure 1.1: Overview of the phenotypic, genomic and resistome data of 672 Pseudomonas aeruginosa isolates included in the present analysis. The phylogenetic tree is inferred from core gene content and

Figure 1 . 3 :

 13 Figure1.3: Synoptic representation of the resistome-wide association study (RWAS) results. Only genes and mutations either known to be associated or subsequently found to be associated with resistance against the nine tested antibiotics are displayed. (A) Provides the results for the presence versus absence of genes; and (B) focuses on specic mutations within genes. Genes and mutations are reported in columns and antibiotics in rows. Note that rows were ordered by decreasing phenotype prevalence, and in (A) columns were ordered by increasing allele frequency. Green cells indicate that a signicant new association has been detected. Blue cells represent a known determinant signicantly associated with minimum inhibitory concentration (MIC) variability. Conversely, grey cells indicate known determinants not signicantly associated with MIC variability. Cells with extreme allele frequencies are shown in light grey. In (A), presence and absence gene counts in each drug sub-panel are noted in the cells (presence counts are in bold and above, absence counts in italic and below). Finally, the nature of the mutation is colour coded on the top of (B). The bottom panel represents the extent of linkage disequilibrium between mutations.

1. 2 .

 2 MANUSCRIPT PUBLISHED IN IJAA (2017) 53 oprD showed a signicant association with meropenem MIC variability. Most of these mutations are in strong linkage-disequilibrium (LD) (Fig. 1.3B

  from the cDBGs and test for association with the phenotype, and a comparison of several ways to model the phenotype. Part of this preliminary work was presented as a poster in 2015 at the Statistical analysis of massive genomic data conference in Evry, and at talks in 2016 at the Statistical Methods for Post Genomic Data (SMPGD) conference in Lille and Journées Ouvertes en Biologie, Informatique et Mathématiques (JOBIM) conference in Lyon. biallelic and a triallelic SNP distant of > k bp C. Two biallelic SNPs in complete LD, distant of < k bp D. Two biallelic SNPs without LD, distant of < k bp

Figure 2 . 1 :

 21 Figure 2.1: Examples of cDBGs obtained with dierent congurations of SNPs. (A) A single biallelic SNP is represented by a simple bubble. Each path of the bubble represents an allele. (B) Two SNPs form two distinct bubbles if they are distant of at least k nt. Multiallelic SNPs generate bubbles with more that two paths. (C) Two SNPs form a single bubble if they are distant of less than k nt and if they are in complete LD. (D) Independent close SNPs generate complex bubbles.

Figure 2

 2 .1, while other panels of the Figure provide other examples of the local structure of the cDBG obtained for situations involving one or two SNP positions. In these examples, the topology of the graph depends on the number of alleles observed at the mutated position, on the distance d between the SNPs, and on the linkage disequilibrium (LD) between the loci.

Figure 2 . 3 :

 23 Figure 2.3: Coloured cDBG of the gyrA gene from 665 strains of P. aeruginosa, built with k = 41. This graph representation is generated by decorating a cDBG with two metadata:

  summarise the information contained in a multiple alignment, by oering a local view of each variant, as illustrated in Figure 2.4. Moreover the decorated cDBG oers an easier way to highlight the most common haplotypes: frequent paths are represented as large circles while rare variants as small circles. Using this mapping, SNPs on nucleotide position 247 (corresponding to the aa position 83) and 258 (aa position 87) are retrieved (red paths) and we get an additional information on their prevalence: the mutation C →T in position 247 is more prevalent than any mutation on position 258.

Figure 2 . 8 :

 28 Figure 2.8: DBG construction. For this example, k=4. A) the 4-mer TTCG present in both sequences overlaps two other 4-mers (TCGC and TCGA) but these two 4-mers dier by their 4th base and we obtain a fork pattern. B) both branches of the fork join on the shared 4-mer TAGT, and this creates a bubble pattern representing here the SNP C to A. C) linear paths of the graph are compacted ; the remaining graph contains fewer nodes representing longer kmers (unitigs): two 4-mers and two 7-mers instead of eleven 4-mers before compaction. Compacted nodes have variable length.

  Rather than representing genomes by presence/absence patterns of SNPs, full genes or xed-length kmers, we propose to use presence/absence patterns of these unitigs. We discuss in Section Unitigs, SNPs and xed-length kmers how they generalize in an adaptive fashion existing representations based on presence/absence patterns of xed length kmers or of SNPs dened by alignments against a reference genome.Unitigs, SNPs and xed-length kmersWhen dealing with a clonal panel of very similar genomes, genomic variants in prokaryote genomes are classically dened as the presence/absence of SNPs identied by alignment of

Figure 2 . 10 :

 210 Figure 2.10: Flowchart of post-processing. The owchart is illustrated with the results

CHAPTER 2 .Figure 2 . 11 :

 2211 Figure 2.11: Preprocessing. Panel A shows the number of xed-length kmers (red) and unitigs (blue) in the data as a function of k. Panel B shows the corresponding distribution of variable length kmers associated with each unitig. Panel C shows which proportion of kmers and unitigs correspond to unique presence/absence patterns in the data.

  Consequently, the true determinants are not ranked among the rst patterns, leading to decreased performances on Supplementary FigureS2.7. Correcting for the population structure limits this ination of β for negative patterns associated with the population structure.Conversely, assuming there is indeed no unmodeled eect of the population structure on levooxacin resistance, corrected models may just underestimate the eect of true determinants whose presence is associated with the population structure, as in our second simulation. For example, if a causal SNP is shared by a clade which is consequently enriched in resistant samples and all the other SNPs shared by this clade also are causal, correcting for the population structure only decreases the estimated eect of the true determinant, leading to decreased performances on Supplementary FigureS2.7.

Figure S2. 6

 6 Figure S2.6 and real data (Supplementary Figure S2.7B) regardless of the eect of the population structure on the phenotype: it outperforms both the uncorrected and the xed eect approaches in the presence of a population eect and is only moderately aected by the absence of such eect.

TPR vs nb of positive kmers/unitigs for amikacin resistance

  of positives (in million)

90 CHAPTER 3 .Figure 3 . 1 :

 90331 Figure 3.1: Compacted DBG construction over a set of sequences diering by a single point mutation. In this example two sequences s1 and s2 of length 12 dier by a single letter. (A) All k-mers (k = 4) present in these sequences are listed. A link is drawn between two k-mers when the k -1 = 3 last nucleotides of the rst k-mer equal the 3 rst nucleotides of the second k-mer. (B) The bubble pattern represents the SNP C to A; each branch of the bubble represents an allele. (C) Linear paths of the graph are compacted; the compacted DBG of the example only contains four nodes (unitigs) and represents the same variation as the original DBG, which contained 13 nodes (k-mers).

  Histidine kinase/response regulator LPG r 2 = 0.17

Figure 3 . 3 :

 33 Figure 3.3: Dierent types of genetic events identied by DBGWAS. Each subgraph represents a distinct genetic event.Colours are continuously interpolated between blue for susceptible unitigs and red for resistant ones. Untested unitigs, present in > 99% or < 1% of the strains, are shown in grey. Nodes found to be not signicative are shown with a transparency degree. The node size relates to its allele frequency: the larger the node, the higher the allele frequency. Circled black nodes map to annotated genes. The two tables in each panel provide information on the sugraph nodes. As an example, the subgraph in panel (A) is composed of 27 unitigs, 5 of which were signicantly associated with resistance. All unitigs of this subgraph mapped to the gyrA gene. The subgraphs presented in the four other panels correspond to the top subgraphs (with lowest minq) obtained for dierent panels/phenotypes. All subgraphs are snapshots taken from DBGWAS interactive visualisation and are available online.

102 CHAPTER 3 .

 1023 DBGWAS SOFTWARE FOR CDBG-BASED GWAS

  . The objects returned by DBGWAS are the connected components of the graph induced by the neighbourhoods of all signicant unitigs in the cDBG. As illustrated in Fig 3.6, nearby signicant unitigs might belong to the same U = Significant unitigs N = Neighbour node within ne=2 edges O

106 CHAPTER 3 .

 1063 DBGWAS SOFTWARE FOR CDBG-BASED GWAS

Figure 4 . 2 :

 42 Figure 4.2: Simulations for the LP class. .

120 CHAPTER 4 .

 1204 PREDICTING DBGWAS GRAPH LABELS

Figure 4 . 3 :

 43 Figure 4.3: Simulations for the MGE class. Examples of graphs simulated from the insertion or deletion of simple gene or gene within a plasmid. The gene-based methods produces similar topologies while the diversity of the graphs generated from plasmid can be very important, depending on the gene family inner variability (from low in the case of CMY to very high, for CAT).

Figure 4 . 4 :

 44 Figure 4.4: PCA for 3 values of nh, using the `repVal' method to deal with NAs.

Figure 4 . 6 :

 46 Figure 4.6: Cross-validation mean accuracy, multiclass prediction. Mean accuracy obtained by 10-fold cross-validation for each model, for all values of nh, and for both NA methods: `repVal' replaced NA values by `0' and `remCol' removed variables with NA values.

  Core genes are defined from 15 annotated reference genomes, and are then searched by homology in the assemblies (B) The distribution of several characteristics of the assemblies is compared

  in a core gene rpoB RRDR hot-spot region described for rifampicin resistance. Palomino, 2014, also found for XDR 2each side of repeated transposase for IS6110. IS6110 is an inserted sequence used in the diagnosis of TB and in TB epidemiology. It may be associated due to lineage effect Millan, 2013, also found for XDR not in a core gene rpoB RRDR described for rifampicin resistance. Almost all rifampicin-resistant strains are also resistant to isoniazid. gene rpoB I1187T (outside the RRDR) I1187T. In LD with the 5 next sugraphs. each side of repeated transposase for IS6110. IS6110 is an inserted sequence used in the diagnosis of TB and in TB epidemiology. It may be associated due to lineage effect Millan, 2013, also found for kanamycin 5 12/90

  region between an hypothetical protein and a VOC family protein gene fosB belongs to the VOC family and is described for fosfomycin resistance

  annotated either in non-coding region or in putative transmembrane protein)The overall allele frequencies are very low, showing a lack of power for suitable detection. Note that only one node shows the minq. Other nodes have q-values >= 2.18E-06 (which is the minq of the 19 next subgraphs)

  83E-01 SNP in an accessory gene PDC gene presence described for beta-lactam resistance -01 SNP in an accessory gene PDC gene presence described for beta-lactam resistance 01E-01 SNP in a core gene gyrA SNP described for quinolones resistance

  noncoding reg. near ICE element noncoding reg. near ICE element integrative & conjugative plasmid noncoding reg. near ICE element noncoding reg. near ICE element mutation on aac(6') mutation on aac(6') mutation on aac(6') mutation on aac(6') mutation on aac(6') mutation on aac(6')

  (http://phusion.github.io/holy-build-box/) to make the precompiled binaries more portable. It should now work on most glibc-based x86 and x86-64 Linux distribution released since 2007 (e.g.: Debian >= 6, Ubuntu >= 10.04, Red Hat Enterprise Linux >= 5, CentOS >= 5, etc).

  suggest a re-ordering such that the overview figure (currently 4) is first, and put figure 1 in the supplementary (as the DBG representation is clearly shown with the real data in figures 2 and 5). We liked the idea to present (previous) Fig 4 at the beginning of the document, and integrated it to introduce the Results section, as Fig 2. We chose to keep Fig 1 in the main document, as it helps readers not familiar to k-mer-based methods to understand the link between the DNA sequences and the nodes of the graph.

  legend accordingly (check the red text in Figure3's caption ):"All subgraphs are snapshots taken from DBGWAS interactive visualisation and are available online."1.26FiguresS2-S6. These are hard to read as figures, as they contain a lot of information. They are however useful for those readers interested in the SFF. Could they also be hosted online somewhere for interactive use?These figures are compilations of the raw outputs from several runs of DBGWAS, and cannot be used interactively. However we added the 35 runs used to generate these figures in the page providing all experiment results. /pbil.univ-lyon1.fr/datasets/DBGWAS_support/experiments/index.html#DBGWAS_all_results_ different_SFF . We now reference this link in S2-S6 Figs.

  [START_REF] Balding | A tutorial on statistical methods for population association studies[END_REF].0. DBGWAS uses bugwas, which requires a modified GEMMA version 0.93 to work. /github.com/danny-wilson/gemma0.93b .

1. 41 I

 41 managed to compile from source ok, but the minimum version of cmake required is v3.1.0 (not v2.0 as stated) due to one of the dependencies. //phusion.github.io/holy-build-box/) to build the portable binary (see response of item 1.39), and this CMAKE version also solve this issue. Thanks for pointing this out.

  U , of size n × p, of established genotype counts where p is the number of retained genotypes. Novel candidate genotypes were evaluated for locus and variant allelic counts independently for each candidate genotype x. If we denote Y i as the MIC values for isolate i = 1, . . . , n assuming that Y i can fall into j = 1, . . . , J i1 + . . . + π ij , where π ij denotes the probability that the i th observation falls in the j th MIC category. The cumulative logit regression model is then:

	CHAPTER 1. THE RESISTOME OF PSEUDOMONAS AERUGINOSA
	ordered categories (from the lowest tested antibiotic concentration to the highest), we
	then considered the following cumulative link model for each candidate P (Y i	j) =

π

Integron occurences and upstream AR genes loca on C) Diversity of integron casse e AR content

	D	cassette #16	cassette #15	cassette #14	cassette #13	cassette #12	cassette #11	cassette #10	cassette #9	cassette #8	cassette #7	cassette #6	cassette #5	cassette #4	cassette #3	cassette #2	cassette #1
	ANT(2'') Ia
	aadA17
	cmlA1
	AAC(6') Ib3
	aadA6
	aadA24
	aadA7
	AAC(6') Ib'
	AAC(6') Ib H
	aadA2
	CARB
	sul1
	OXA
		3	3	3	3	3	3	3	3	5	5	5	5	6	8	10	27 (In51)	Occurrence nb:
	These gene families were enriched in P. aeruginosa integrons, as shown by the Poisson distribution tests (Fig. 1.2A). Enrichment
	was dened as a higher proportion of a gene found in an integron compared with other
	genome locations.

A)

) Phylogene c view of integron casse es

	AZPAE12142 AZPAE14697 AZPAE14859 VTK 107743 AZPAE14936 AZPAE14866 AZPAE12145 AZPAE1241 7 AZPAE149 56 VTK 115478 VTK 111136 VTK 104416 VTK 106676 VTK 111143 VTK 10670 4 AZPA E1213 8 AZPA E149 98 VTK 1111 38 AZPA E149 40 AZPA E150 60 VTK 1154 88 AZP AE1 4499 AZP AE1 4831 AZP AE1 470 1 VTK 107 725 VTK 107 748 VTK 107 723 VTK 107 753 VTK 107 731 AZP AE 145 70 AZ PAE 150 44 VT K 107 750 VT K 107 749 AZ PA E1 483 6 VT K 10 44 78 VT K 10 44 77 VT K 10 77 37 AZ PA E1 21 49 VT K 10 61 93 VT K 11 11 45 AZ PA E1 48 93 VT K 11 54 73 AZ PA E1 50 20 VT K 11 10 66 VT K 11 10 76 AZ PA E1 50 37 AZ PA E1 50 31 VT K 10 77 71 AZ PA E1 48 14 AZ PA E1 50 70 AZ PA E1 48 24 AZ PA E1 48 15 AZ PA E1 49 97 AZ PA E1 49 64 AZ PA E1 49 65 AZ PA E1 48 51 AZ PA E1 49 73 AZ PA E1 38 66 VT K 11 55 20 A ZP A E 14 93 1 A ZP A E 15 06 2 A ZP A E 14 93 9 A ZP A E 12 14 6 A ZP A E 14 52 6 A ZP A E 14 88 2 V T K 10 66 83 A Z PA E 14 94 2 A Z PA E 14 81 1 A Z PA E 14 92 2 A Z PA E 14 98 4 A Z PA E 15 02 9 V T K 11 55 04 A Z PA E 14 71 8 A Z PA E 1 3 8 7 7 A Z P A E 1 4 9 2 9 A Z P A E 1 4 8 7 6 A Z P A E 1 4 8 4 8 A Z P A E 1 2 1 3 7 A Z P A E 1 4 9 6 1

Occurrence nb: B) Most frequent integron organisa on (In51)

	50				CHAPTER 1. THE RESISTOME OF PSEUDOMONAS AERUGINOSA
				aadA6 Intl1 & promoter	9.318	Downstream distance to Intl1 (kb) 8 6 4 2	0	aadA2 CARB sul1 OXA ANT(2'') Ia strB strA aadA6 AAC(6') Ib'	0	Number of AR genes found within or external to Intl1 genomic region 50 100 150 200	224	AR gene(s) found in 2/3 of integrons	Integron(s) found in 1/3 of isolates
										tetG
										VIM
										cmlA1
				orfD				AAC(6') Ib H floR aadA24
	attI 1/27	attC 2/27	24/27 (wild In51)	qacE 1 sul1				AAC(6') Ib3 cat GES aadA7 dfrB6 dfrB1 AAC(6') 29a IMP arr dfrA5 tetC AAC(6') 31 AAC(6') IIa aadA13 VEB AAC(6') 33 aadA17 aadA4 AAC(3) Ic AAC(1) AAC(3) Ia aadA5		AAC(6') Ib H stands for AAC(6') Ib Hangzhou	Enrichment with Poisson distribution p value < 0.05	Other region of the genome	10kb upstream of Intl1	163 (63.9%) w/ AR gene	229 (34.1%) w/ Intl1 match(es)
			A Z PA E 14 90 3 A Z PA E 14 96 7			Group 3 (n=18)	Group 2 (n=221)	Group 1 (n=433)	Integron w/o AR gene	Integron w/ AR gene, found less than 3 times
				11 55 18 PA A Z E 13 84 8 V T K 11 11 33 V T K 11 11 10 V T K 11 10 64 V T K 10 77 70 V T K 10 67 08 A Z PA E 14 97 2 V TK 11 11 35 V TK 11 11 03 A ZP A E 14 89 8 A ZP A E 14 69 5 V TK 11 10 93 A ZP A E 15 02 4 VT K 11 10 78 AZ PA E1 48 45 AZ PA E1 50 25 AZ PA E1 50 45 AZ PA E1 49 48 AZ PA E1 46 99 AZ PA E1 48 50 VT K 10 77 56 VT K 10 77 57 AZ PA E1 50 11 AZ PA E1 50 16 VT K 10 77 40 AZ PA E1 48 16 AZ PA E1 49 05 AZ PA E1 49 06 AZ PA E1 50 35 VT K 11 55 05 VT K 10 77 28 AZ PA E1 50 27 AZ PA E1 50 64 AZ PA E1 45 09 VT K 10 45 72 AZ PA E1 50 26 AZ PA E1 50 59 AZ PA E1 49 32 VT K 111 098 AZ PA E1 439 3 AZ PA E1 435 9 VT K 115 479 AZP AE 148 92 VTK 115 513 VTK 115 481 AZP AE1 440 4 AZP AE1 439 5 VTK AZP AE1 AZP AE1 385 AZP AE1 AZPA E150 AZPA E147 AZPA E150 39
												n

  Using the uncorrected or xed eect approaches leads to very similar lists of 15 patterns.

	The top 15 patterns correspond to 47 unitigs for amikacin (resp. 22 for levooxacin) or
	1222 (resp. 262) kmers. The 5-neighboring DBG induced by these unitigs has 8 (resp.
	6) connected components whose unitigs consistently map to a small number of annotated
	events (Supplementary Figures S2.8 and S2.9).
	The annotation of the 8 components found for amikacin highlights the importance of
	the accessory genome in resistance. Indeed, all top patterns map within or near mobile
	elements: more than half the connected components represent coding or non-coding neigh-
	borhood of transposase or integrase. By contrast, half of the 6 components found in the
	levooxacin experiment represent SNPs in core gene, recognizable by paths of node with a

  regions are causal, the noncoding region may have a strong association with resistance because of LD, and be among the top patterns in our test whereas the coding region is not because of noise, nite sample or model misspecication. Methods targeting only coding regions would miss the marker in this case. Finally, the gene presence/absence approach would miss the SNP that we identify in the AAC accessory gene. It could have detected the presence of the full gene as being associated with resistance to amikacin, but with less power: only one mutated version of the gene is involved in resistance. Fixedlength kmer approaches are able to target any region of all genomes. However in the case of an event dened by the presence of a complete plasmid such as pHS87b, a xed length kmer representation would lead to identifying disconnected regions. Identifying the whole plasmid rather than sets of disconnected hits makes it easier to understand which mechanism underlies the selected patterns.

Discussion

We have introduced unitigs as a new and ecient mean to represent candidate genetic determinants in GWAS. Unitigs correspond to variable length kmers: genomic regions which are constant across samples map to single long kmers while more polymorphic regions are supported by several shorter kmers, leading to higher resolution. This representation generalizes both SNPs obtained by alignments against reference genomes and xed-length kmers. Compared to the former, it is more exible and can deal with highly plastic genomes. Compared to the latter, it is less redundant and leads to a drastic reduction in the number of candidate entities that need to be tackled without loss of information, leading to easier computation and interpretation of the result. Furthermore, extracting neighboring De Bruijn subgraphs provides additional insight as to what type of genomic event underlies a unitig which is detected as being associated with a phenotype of interest. Experiments on P. aeruginosa illustrate that our representation is able to capture very dierent genomic features ranging from SNPs to large gene insertions.

  This tool was presented at talks at the Intelligent Systems for Molecular Biology(ISMB 2017) conference in Prague, at the Statistical Methods for Post Genomic Data (SMPGD 2018) conference in Montpellier, and at the European Congress of Clinical Microbiology and Infectious Diseases (ECCMID 2018) in Madrid. The manuscript hereafter, accepted in 2018 for publication in PLOS Genetics, describes DBGWAS, the choices made in its design and implementation (Method section), and explains largely how to read and interpret DBGWAS output results. It includes a benchmark of DBGWAS to other resitome-based and kmer-based GWAS methods. It was written for potential microbiologist users and submitted in a generalist journal to reach this audience. In this context, we included new bacterial panels, most of them comprising around one thousand genomes. A total of 28 GWAS were run, for 3 species (M. tuberculosis, S. aureus and P. aeruginosa ) and 28 phenotypes (9 to 10 per species).

Table 3 .

 3 1: Resistance determinants identied by DBGWAS for S. aureus (SA), M. tuberculosis (TB) and P. aeruginosa (PA) panels.

	Annotation Type Knowledge on markers + 7000 bp of SCCmec MGE mecA Pos 6000 bp of SCCmec MGE r 2 = 0.96 2000 bp of SCCmec MGE r 2 = 0.94 1500 bp of SCCmec MGE r 2 = 0.93 parC QRDR LPG Pos gyrA QRDR LPG Pos ermC + circular plasmid MGE Pos fusA LPG Pos fusC + SCCfusC cassette MGE Pos 1,500 bp of SCCfusC MGE r 2 = 0.98 200 bp of SCCfusC MGE r 2 = 0.98 purN LPG r 2 × 10 -3 Pos = 0.19 = 2 folA LPG btw. hyp. prot. & VOC prot. LPN r 2 = 0.44 ybaK LPG r 2 = 0.29 Pos = 0.38 mqo1 LPG r 2 aac(6') seq. of plasmid carrying aac(6') = 0.40 seq. of plasmid carrying aac(6') = 0.48 seq. of plasmid carrying aac(6') odhB gene within a plasmid MGE MGE r 2 MGE r 2 MGE r 2 LPG r 2
	eect 0.949 0.865 0.813 0.957 -0.893 0.955 0.823 -0.910 0.924 0.924 0.924 -0.888 0.969 -0.966 -0.966 -0.632 0.873 0.751 0.634 0.579 -0.831
	× 10 -188	× 10 -72	× 10 -61	× 10 -37	× 10 -104	× 10 -76	× 10 -100	× 10 -136	× 10 -49	× 10 -43	× 10 -43	× 10 -22	× 10 -24	× 10 -18	× 10 -18	× 10 -10	× 10 -205	× 10 -75	× 10 -53	× 10 -40	× 10 -33
	SA 2 214/882 7.94 Fusidic acid Erythromycin 1 110/510 2.69 2 Ciprooxacin 1 4 3 2 Methicillin unitigs Panel Phenotype Rank Sign. 1 71/565 7.68 99/735 3.39 11/190 2.14 13/117 2.29 7/57 8.67 7/31 2.21 1 7/50 2.75 3 22/260 5.35 3 1/72 5.35 5 5/64 2.02 Trimethoprim 1 7/54 8.38 2 3/41 9.30 3 11/70 9.30 4 Gentamicin 2/30 6.82 1 173/1193 1.30 2 127/367 9.02 3 4 5 2/23 9.01 1/29 1.04 2/56 1.49

minq

Est.

Table 3 .

 3 2: Resistance determinants found by the four methods for P. aeruginosa levooxacin resistance.

	Legend	resistome-based	DBGWAS	pyseer	HAWK
	Time (mem)	37m (7.2 GB)	21m (3.2 GB)	24h22m (14.5 GB)	39m (4.2 GB)
	Nb reported	2 variants	5 subgraphs	224 k-mers	8 reassembled k-mers
	Known	gyrA (2.11 × 10 -22 ) gyrA (7.21 × 10 -29 )	gyrA (1.97 × 10 -17 ) gyrA (2.82 × 10 -14 )
	positive	parC (1.83 × 10 -5 )	parC (5.68 × 10 -6 )	parC (5.68 × 10 -9 )
			HK/RR (1.87 × 10 -2 )		tnp (1.66 × 10 -14 )
	Unknown		tnp		NC near tnp
			topA
	This table presents the annotation of the features identied by the tested methods with default parameters. The total
	number of reported features, as well as the execution time and memory load (in Gigabytes) are given in the header. For
	k-mer-based methods, annotations were retrieved by mapping unitig/k-mer sequences to the resistance and Uniprot

Table 3 .

 3

	3: Resistance determinants found by the four methods for M. tuberculosis strepto-mycin resistance.
	Legend	resistome-based	DBGWAS	pyseer	HAWK
	Time (mem)	1h31m (2.1 GB)	42m (4.3 GB)	14h14m (102.4 GB)	3h01m (3.7 GB)
	Nb reported	28 variants	24 subgraphs	85,011 k-mers	2,038 reassembled k-mers
	Known	rpsL (1.96 × 10 -33 )	rpsL (3.70 × 10 -31 )	rpsL (4.85 × 10 -55 )	rpsL (5.72 × 10 -47 )
	positive	rrs (5.40 × 10 -8 )	rrs (2.86 × 10 -9 )	rrs (1.63 × 10 -14 )	rrs (3.45 × 10 -20 )
		katG (2.61 × 10 -30 ) katG (1.06 × 10 -28 )	katG (2.12 × 10 -71 )	katG (1.44 × 10 -57 )
		rpoB	rpoB	rpoB	embB
		gidB	embB	embB	kasA
		gyrA	gyrA	ubiA	embC
	Determinant	embB	gidB	pncA	gyrA
	described	fabG1 promoter	rpoC	fabG1 promoter	iniA
	for other	pncA	fabG1 promoter	gyrA	embA
	antibiotics	rpoC	ubiA	gidB	embR
		inhA		ethA	gidB
				embA	tsnR
				embC	rpoB
					pncA
					ethA
			espG1 (1.20 × 10 -3 ) NC near tnp/PE (1.13 × 10 -19 ) NC near tnp/PPE (2.93 × 10 -57 )
			rpsN	Rv0270	tnp
			NC near tnp/PPE	Rv2665	Rv2825c/Rv2828c
	Unknown		rnj	Rv2743c	13E12 repeat family protein
	(top list)		Rv2672	Rv2522c	PPE
			espA promoter	NC near tnp/PPE	CRISPR repeats, down Cas genes
			Rv2456c promoter	guaA	mmpL14
			whiB6	kdpD	esxM
			...	...	...

This table presents the annotation of the features identied by the tested methods with default parameters. The total number of reported features, as well as the execution time and memory load (in Gigabytes) are given in the header. For k-mer-based methods, annotations were retrieved by mapping unitig/k-mer sequences to the resistance and Uniprot databases (see Interpretation of signicant unitigs (step 3) subsection of the Methods section), and completed when needed by Blast on NCBI Nucleotide database. Green cells correspond to resistance determinants already described in the literature, orange cells to resistance determinants described for association with other antibiotics. The annotations not found by the resistome-based strategy are written in bold. Grey cells represent unknown determinants. Within each category, annotations are ordered by increasing minimum p/q-values. p/q-values are reported only for the most signicant annotations. For each method, the annotation with the lowest p/q-values is underlined. `NC' means noncoding region, `tnp' transposase, `PE' stands for PE-family protein and `PPE' for PPE-family protein.

Table 3 .

 3 4: Microbial panels.

	Species	Genome plasticity	Range of genome length	Panel name Source	Phenotype	Number of available genomes
						rifampicin	1,197
						isoniazid	1,287
						ethambutol	1,041
						streptomycin	1,166
	M. tuberculosis very low	4.4 Mbp	TB	[51]	kanamycin ooxacin ethionamide	671 696 420
						MDR	1,211
						XDR	689
				Large TB	[83]	random	5,000
						methicillin	501
						ciprooxacin	991
						erythromycin	991
						penicillin	991
						tetracycline	991
	S. aureus	low	2.7-3.1 Mbp	SA	[79]	fusidic acid trimethoprim gentamicin	991 323 991
						rifampin	991
						mupirocin	490
						vancomycin	501
				Large SA	[83]	random	9,000
						amikacin	280
						levooxacin	117
						meropenem	280
						piperacillin	280
	P. aeruginosa	high	5.8-7.6 Mbp	PA	[200]	colistin polymyxin B chloramphenicol	164 117 103
						cefepime	280
						fosfomycin	113
				Large PA	[83]	random	2,500

  plasmid sequences, only 146 families are retained. Prepare a core genome of C = 50 genes. Sample Res, a resistance gene family among the 146 mapped in at least 15 plasmids. for i in 1..N = 282 do if X i = 1 then Add in genome i a plasmid containing a Res gene; if X i = 0 then Add in genome i a plasmid NOT containing any Res gene ; end Algorithm 2: MGE simulations based on the plasmid strategy In this strategy, only one variant associated to the phenotype is integrated the insertion of a resistance gene carried by a plasmid. Only the rst graph expected to represent

		Single		Multiple
	Examples of
	real graphs
	taken from TB
	resistance to
	rifampicin and
	streptomycin
			« sequential »	« hotspot »
	'nb_mut' per gene	1	2 to 4	2 to 4
	'dist' bw mutations	NA	130 18 bp	20 10 bp
	Examples of
	graphs obtained
	by simulation

Table 4 .

 4 1: Features describing the graphs and used to model their label. Total number of nodes in the graph sig_node_number ns, Number of signicant nodes. sig_node_ratio Ratio of signicant nodes: ns/ng. Sum of length of nodes with a positive eect. length_neg_sum sn, Sum of length of nodes with a negative eect. length_pos_mean Mean length among nodes with a positive eect. length_neg_mean Mean length among nodes with a negative eect.

		Feature name	Feature description
	Graph size ng, Graph complexity node_degree* node_number Distribution of node degrees. The degree indi-
			cates the number of edges connected to a node.
		sign_node_degree* Distribution of degree for signicant nodes only
	Allele frequency	allele_fq_mean	Mean allele frequency.
		allele_fq_sd	Standard deviation of allele frequencies.
		di_alleles	Absolute dierence of allele frequencies between
			phenotype 1 and phenotype 0.
	Node eect	node_eect*	Distribution of estimated eect for all nodes.
		sign_node_eect* Distribution of estimated eect for signicant
			nodes only.
		pos_eect_ratio	Ratio of signicant nodes with a positive eect
			(nsp), among signicant nodes: nsp/ns.
	Sequence length	sum_length	Sum of sequence length of all nodes.
		length_pos_sum sp, di_length Absolute dierence of negative versus positive ef-
			fect sequence length, normalised by the maximal
			sum: |sp -sn|/max(sp; sn).
		max_contig_pos cp, Length of the longest contig we were able to
			reassemble from positive node sequences.
		max_contig_neg cn, Length of the longest contig we were able to
			reassemble from negative node sequences.
		di_contig	Absolute dierence of negative versus positive
			eect contig, normalised by the maximal contig
			length: |cp -cn|/max(cp; cn)
		contig_homology Homology score betwen the longest contig re-
			assembled from positive, and negative eect
			nodes.

Table 4 .

 4 2: Random forest models: top-5 variables sorted by variable importance

		LP-MGE	multiclass
		sign_node_eect_sd sign_node_eect_Qu0.05
		di_length sign_node_eect_Qu0.95
	nh=1	sign_node_eect_Qu0.05	length_neg_sum
		sign_node_eect_Qu0.95 sign_node_eect_Median
		di_alleles	pos_eect_ratio
		sign_node_eect_sd sign_node_eect_Qu0.05
		di_length	length_neg_sum
	nh=2	sign_node_eect_Qu0.05	length_neg_mean
		length_pos_sum	pos_eect_ratio
		pos_eect_ratio sign_node_eect_Qu0.95
		di_length	node_eect_Median
		sign_node_eect_sd sign_node_eect_Qu0.95
	nh=3	allele_fq_sd	allele_fq_sd
		node_degree_Qu0.95	pos_eect_ratio
		sign_node_degree_Qu0.95 sign_node_eect_Qu0.05
		di_length	node_eect_Median
		sign_node_eect_sd sign_node_eect_Qu0.05
	nh=4	allele_fq_sd sign_node_eect_Qu0.95
		node_eect_Median	length_pos_sum
		pos_eect_ratio	di_length
		di_length	node_eect_Median
		sign_node_eect_sd	length_neg_sum
	nh=5	node_eect_Median sign_node_eect_Qu0.05
		sign_node_eect_Qu0.95 sign_node_eect_Qu0.95
		allele_fq_sd	pos_eect_ratio
		di_length sign_node_eect_Qu0.05
		sign_node_eect_sd sign_node_eect_Qu0.95
	all nh	sign_node_eect_Qu0.95	length_neg_sum
		sign_node_degree_Qu0.95	pos_eect_ratio
		allele_fq_sd	node_eect_Median

Table 4 .

 4

2 shows the top-5 variables used in each model, ordered by variable importance.

Table 4 .

 4 3: Accuracy obtained on the test datasets, for both classication tasks

		LP/MGE		Multiclass
	nh real graphs simulated graphs real graphs simulated graphs
	1	0.93	0.95	0.73	0.93
	2	0.78	0.96	0.68	0.95
	3	0.92	0.97	0.70	0.96
	4	0.97	0.98	0.79	0.96
	5	0.91	0.97	0.70	0.95
	all nh	0.93	0.97	0.75	0.94

Table 4 .

 4 4: Contingency table obtained for the multiclass classier on the real test dataset, for nh=4

				predicted
			LP multiple LP single MGE deletion MGE insertion
	truth	LP multiple LP single	10 7	3 14	0 2	0 1
		MGE deletion	0	0	0	0
		MGE insertion	0	0	0	2 4

Table 4 .

 4 5: Contingency table obtained for the LP/MGE classier on the real test dataset, for . 11) errors between the classes: from both `LP' subcategories to both `MGE' subcategories (resp. from `MGE' to `LP' subcategories), as shown in Table 4.7.

	4.3. RESULTS

Table 4 .

 4 8: Labels predicted for graphs from Table3.1. Binary and multiclass models selected for nh=5 were used to predict known labels. The three antibiotics included in the train datasets are shown with an asterisk. Prediction errors at the LP/MGE levels are highlighted in red. Probabilities associated to the predicted label are added in parenthesis. around the unitigs signicantly associated to the phenotype to build the graphs.

	Label Tab.3.1 Label Suppl. S3.2-S3.4 Pred. LP/MGE (prob) Pred. subclass (prob) MGE MGE with gene annotation MGE (1) MGE insertion (.97) MGE MGE MGE (1) MGE insertion (1) MGE MGE MGE (1) MGE insertion (1) MGE MGE MGE (.91) MGE insertion (.90) LPG hot-spot in a core gene LP (1) LP single (.95) LPG hot-spot in a core gene LP (1) LP single (.95) MGE MGE with gene annotation MGE (1) MGE insertion (1) LPG polymorphic region in a gene MGE (.50) MGE deletion (.55) MGE MGE with gene annotation MGE (1) MGE insertion (1) MGE MGE MGE (1) MGE insertion (1) MGE MGE MGE (.88) MGE insertion (.76) LPG polymorphic region in a gene MGE (.73 ) MGE deletion (.68) LPG SNP in a gene LP (.98) LP single (.57) LPN pattern in a noncoding region LP (.74) MGE deletion (.53) LPG polymorphic region in a gene MGE (.71) MGE deletion (.89) LPG polymorphic region in a gene LP (.76) LP single (.33) MGE MGE with gene annotation MGE (.99) MGE insertion (1) MGE MGE MGE (1) MGE insertion (1) MGE MGE MGE (1) MGE insertion (1) MGE MGE MGE (.99) MGE insertion (.99) LPG polymorphic region in a gene LP (.88) LP single (.90) LPG hot-spot in a core gene LP (1) LP multiple (.98) LPG SNP in a core gene LP (1) LP single (.93) LPG SNP in a core gene LP (.93) LP single (.51) LPG SNP in a core gene LP (.94) LP single (.45) LPG SNP in a core gene LP (1) LP single (.81) LPG hot-spot in a core gene LP (1) LP multiple (.91) LPG SNP in a core gene LP (.94) LP single (.47) LPG SNP in a core gene LP (.88) LP multiple (.42) LPG hot-spot in a core gene LP (.97) LP multiple (.84) LPG SNPs in a core gene LP (.95) LP single (.73) LPG hot-spot in a core gene LP (1) LP multiple (.91) LPG SNP in a core gene LP (1) LP multiple (.64) LPG SNP in a core gene MGE (.88) MGE deletion (.60) LPN SNP in a core gene promoter LP (.92) LP multiple (.76) LPG hot-spot in a core gene LP (1) LP multiple (.81) LPG SNP in a core gene LP (.90) LP single (.63) LPG SNP in a core gene LP (1) LP single (.99) LPG SNP in a core gene LP (1) LP multiple (.80) LPN SNP in a core gene promoter LP (1) LP single (.97) LPG SNP in an accessory gene + ac-cessory gene MGE (.94) MGE insertion (.97) LPG polymorphic region in a gene MGE (.74) MGE insertion (.53) MGE MGE MGE (1) LPG hot-spot in a core gene LP (.88) LPG hot-spot in a core gene LP (1) LPG SNP in a core gene LP (.96) MGE insertion (1) LP single (.65) LP single (.91) LP single (.84)
	Panel Phenotype Rank Annotation	SA 2 fusC Fusidic acid Erythromycin 2 gyrA Ciprooxacin * 1 parC 4 1500 bp of SCCmec 3 2000 bp of SCCmec 2 6000 bp of SCCmec Methicillin 1 mecA+ 7000 bp of SCCmec QRDR QRDR 1 ermC + circular plasmid 1 fusA + SCCfusC cassette 3 1,500 bp of SCCfusC 3 200 bp of SCCfusC 5 purN Trimethoprim 1 folA 2 btw. hyp. prot. & VOC prot. 3 ybaK 4 mqo1 Gentamicin * 1 aac(6') gene within a plasmid 2 seq. of plasmid carrying aac(6') 3 seq. of plasmid carrying aac(6') 4 seq. of plasmid carrying aac(6') 5 odhB Rifampicin 1 rpoB RRDR 2 katG 3 embB Streptomycin M306V 1 rpsL (30S ribos.protein S12) 2 katG 3 rpoB RRDR 4 embB TB M306V 5 rrs, 16S rRNA C517T 6 gyrA QRDR 7 espG1 Ooxacin 1 gyrA QRDR 2 ubiA (Rv3806c) 3 Rv3909 Ethionamide 1 fabG1 promoter 2 gyrA QRDR 3 rrs, XDR * 16S rRNA A1401G 1 rpoB I1187T (out. RRDR) 1 Rv2000 3 espA Amikacin promoter 1 aac(6')	PA Levooxacin 2 DEAD/DEAH box helicase 3 plasmid mapping on pHS87b 1 gyrA QRDR 2 parC QRDR 3 Hist. kinase/resp. regulator

retained

Table S1 .

 S1 Meropenem Levooxacin Colistin Cefepime Piperacillin . . . 3: Association results for established determinants. This table describe the results of the RWAS for known determinants. The rst 3 columns detail the determinant, columns 4 and 5 give the association score, column 6 gives the determinant minor allele frequency, columns 7 and 8 describe the antibiotic, and the last column mentions if the determinant was kept in the model built to nd new associations. This table provides only a short view of the complete published Supplementary Table.

	148							APPENDIX
	variant_id	type	p-value	q-value frequency	antibiotic	kept as covariate
	gyrA:T83I variant 1.29E-61 2.32E-60	3.94E-01		Levooxacin	TRUE
	parC:S87L variant 3.52E-40 3.17E-39	2.63E-01		Levooxacin	TRUE
	gyrA:D87N variant 9.14E-08 5.49E-07	5.21E-02		Levooxacin	TRUE
	AAC(6')-Ib9	locus 2.57E-07 1.15E-06	2.65E-01		Levooxacin	FALSE
	parC:S87W variant 1.32E-03 4.37E-03	3.42E-02		Levooxacin	TRUE
	parC:E91K variant 1.46E-03 4.37E-03	1.49E-02		Levooxacin	TRUE
	AAC(6')-Ib-H.	locus 1.20E-02 3.00E-02	4.46E-02		Levooxacin	FALSE
	VTK_100073 gyrB:E468D variant 1.33E-02 3.00E-02 S S VTK_102200 S S AAC(6')-Ib' locus 2.37E-02 4.75E-02 VTK_102323 R I AAC(6')-Ib3 locus 5.17E-02 9.31E-02 VTK_102327 S S gyrB:S466Y variant 8.37E-02 1.37E-01 VTK_104414 S S parE:A473V variant 1.25E-01 1.75E-01 VTK_104415 S S gyrB:467/468 variant 1.27E-01 1.75E-01 VTK_104416 S R gyrB:S466F variant 2.14E-01 2.75E-01 VTK_104417 S S gyrA:D87Y variant 6.13E-01 7.36E-01 VTK_104430 S I gyrB:I529V_2 variant 7.46E-01 7.90E-01 VTK_104431 S S gyrB:I529V_1 variant 7.46E-01 7.90E-01 VTK_104432 S S gyrA:T83A variant 9.86E-01 9.86E-01 VTK_104477 R S rmtD locus 2.31E-09 6.00E-08 VTK_104478 R I APH(3')-VIa locus 9.82E-09 1.28E-07 VTK_104566 S S AAC(6')-Ib9 locus 3.41E-07 2.95E-06 VTK_104571 S S AAC(6')-Ib3 locus 2.79E-06 1.81E-05 VTK_104572 S S AAC(3)-IIa locus 3.64E-06 1.89E-05 VTK_105072 S S AAC(6')-29a locus 4.50E-04 1.95E-03 VTK_105076 S S AAC(6')-Ib-H. locus 2.82E-03 1.05E-02 VTK_105352 S S AAC(6')-33 locus 1.21E-02 3.92E-02 VTK_105355 S S AAC(6')-29b locus 1.43E-02 4.13E-02 VTK_105356 S S AAC(3)-IIIb locus 2.29E-02 5.95E-02 VTK_105406 S S ANT(4')-IIb locus 9.18E-02 2.17E-01 VTK_105617 S R APH(3')-VIb locus 1.11E-01 2.40E-01 . . . . . . . . . APH(2)-IIa locus 1.22E-01 2.40E-01 rmtF locus 1.29E-01 2.40E-01	S 8.93E-03 S 5.65E-02 S 3.57E-02 S 2.68E-02 S 1.79E-02 S 1.49E-03 R 4.46E-03 S 1.79E-02 S 1.93E-02 S 1.93E-02 S 7.44E-03 S 1.19E-02 S 2.38E-02 S 2.65E-01 S 3.57E-02 I 5.95E-03 R 1.34E-02 R 4.46E-02 R 4.46E-03 R 8.93E-03 R 5.95E-03 R 1.49E-03 R 1.04E-02 . . . 1.49E-03 1.49E-03	S S S S NA NA NA NA NA NA NA NA NA NA NA NA S S S S S S S . . .	S Levooxacin I Levooxacin S Levooxacin S Levooxacin I Levooxacin S Levooxacin R Levooxacin R Levooxacin I Levooxacin S Levooxacin S Levooxacin S Amikacin R Amikacin S Amikacin S Amikacin S Amikacin I Amikacin I Amikacin S Amikacin S Amikacin I Amikacin I Amikacin R Amikacin . . . Amikacin Amikacin	FALSE S . . . FALSE R . . . FALSE R . . . TRUE S . . . TRUE R . . . FALSE R . . . TRUE R . . . FALSE R . . . TRUE R . . . TRUE R . . . FALSE R . . . TRUE S . . . TRUE R . . . TRUE S . . . TRUE S . . . TRUE S . . . TRUE R . . . TRUE R . . . TRUE R . . . TRUE R . . . TRUE R . . . FALSE R . . . TRUE R . . . FALSE . . . . . . FALSE
	APH(3')-Ib	locus 2.00E-01 3.47E-01	8.93E-03		Amikacin	TRUE
	AAC(6')-Iai File S1: Integrase sequences (rst sequence only) locus 2.22E-01 3.61E-01 1.49E-03 AAC(6')-Ib' locus 3.27E-01 5.00E-01 5.65E-02		Amikacin Amikacin	FALSE TRUE
	AAC(3)-Ic >tr |Q58G63|Q58G63_PSEAI DNA integrase IntI1 (Fragment) OS=Pseudomonas locus 3.63E-01 5.24E-01 4.46E-03 Amikacin TRUE . . . . . . . . . . . . . . . . . . . . . aeruginosa GN=intI1 PE=4 SV=1 mexT locus 1.14E-01 3.41E-01 9.84E-01 Chloramphenicol FALSE MKTATAPLPPLRSVKVLDQLRERIRYLHYSLRTEQAYVNWVRAFIRFHGVRHPATLGSSE nfxB locus 6.15E-01 6.34E-01 9.79E-01 Chloramphenicol TRUE VEAFLSWLANERKVSVSTHRQALAALLFFYGKVLCTDLPWLQEIGRPRPS nalC locus 6.34E-01 6.34E-01 9.97E-01 Chloramphenicol FALSE
	. . .	. . .	. . .	. . .	. . .		. . .	. . .
				143

Table S1 .

 S1 4: Association results for new candidates. This table describe the results of the RWAS for new candidates. The rst 2 columns describe the antibiotic, the following 4 columns detail the determinant, column 7 gives the determinant minor allele frequency, columns 8 and 9 give the association score, and the last column mentions the eect sign (a positive sign represents an increase of the MIC).

	antibiotic	locus_name allele position (bp) frequency p-value	q-value eect sign
	Amikacin	mexX locus	NA	9.85E-01 5.97E-10 4.70E-06	+
	Amikacin	gyrA	c	247	6.06E-01 4.09E-09 1.61E-05	-
	Amikacin	mexY locus	NA	9.79E-01 3.39E-08 8.91E-05	+
	Amikacin	OXA locus	NA	1.50E-01 2.01E-06 3.96E-03	+
	Colistin	mexS locus	NA	9.55E-01 1.23E-05 2.93E-02	+
	Colistin	ampD	-	0	2.68E-02 2.38E-05 2.93E-02	+
	Cefepime	OXA	a	545	2.23E-02 1.46E-05 3.61E-02	+
	Cefepime	OXA	a	622	1.25E-01 2.57E-05 3.61E-02	+
	Cefepime	OXA	g	644	1.26E-01 2.57E-05 3.61E-02	+
	Cefepime	OXA	a	767	2.38E-02 2.57E-05 3.61E-02	+
	Meropenem	gyrA	c	247	6.06E-01 8.02E-13 6.33E-09	-
	Meropenem	oprD	c	1266	2.13E-01 2.67E-07 6.04E-04	-
	Meropenem	parC	c	259	7.02E-01 2.72E-07 6.04E-04	-
	Meropenem	oprD	g	1200	1.98E-01 3.13E-07 6.04E-04	-
	Meropenem	oprD	c	1283	2.35E-01 4.59E-07 6.04E-04	-
	Meropenem	oprD	g	1278	2.17E-01 4.59E-07 6.04E-04	-
	Meropenem	oprD	g	1343	2.17E-01 8.32E-07 9.36E-04	-
	Meropenem	oprD	c	1134	2.37E-01 1.28E-06 1.26E-03	-
	Meropenem	oprD	a	758	8.04E-02 3.98E-06 3.48E-03	-
	Meropenem	oprD	c	180	7.59E-02 7.16E-06 5.51E-03	-
	Meropenem	oprD	c	1182	2.44E-01 9.59E-06 5.51E-03	-
	Meropenem	oprD	c	641	7.20E-01 9.79E-06 5.51E-03	+
	Meropenem	oprD	c	650	2.41E-01 9.79E-06 5.51E-03	-
	Meropenem	oprD	c	875	2.40E-01 9.79E-06 5.51E-03	-
	Meropenem	oprD	c	712	7.38E-01 1.07E-05 5.62E-03	-
	Meropenem	oprD	c	522	7.32E-01 1.39E-05 6.87E-03	+
	Meropenem	oprD	a	1082	2.38E-01 2.10E-05 9.52E-03	-
	Meropenem	oprD	c	683	7.44E-01 2.30E-05 9.52E-03	-
	Meropenem	oprD	a	827	2.17E-01 2.30E-05 9.52E-03	-
	Meropenem	oprD	c	386	7.17E-01 2.79E-05 1.08E-02	+
	Meropenem	ampO	a	892	8.93E-03 2.88E-05 1.08E-02	-
	Meropenem	oprD	a	437	2.26E-01 3.15E-05 1.08E-02	-
	Meropenem	oprD	g	446	7.35E-01 3.15E-05 1.08E-02	-
	Meropenem	oprD	c	396	2.51E-01 3.46E-05 1.14E-02	-
	Meropenem	oprD	c	410	7.26E-01 4.88E-05 1.43E-02	+
	Meropenem	oprD	a	1051	9.58E-01 5.80E-05 1.63E-02	-
	Meropenem	oprD	c	1336	7.29E-01 6.19E-05 1.68E-02	-
	Meropenem	oprD	c	55	9.43E-01 6.45E-05 1.69E-02	-
	Meropenem	mexZ	-	489	1.79E-02 7.38E-05 1.84E-02	+
	Meropenem	oprD	a	1200	7.13E-01 7.50E-05 1.84E-02	-
	Meropenem	oprD	c	1173	7.40E-01 7.69E-05 1.84E-02	-
	Meropenem	oprD	c	1309	7.35E-01 1.16E-04 2.69E-02	-
	Meropenem	oprD	c	1330	4.52E-01 1.23E-04 2.77E-02	+
	Meropenem	mexX	c	1185	9.81E-01 1.45E-04 3.18E-02	-
	Meropenem	mexD	c	1752	9.91E-01 1.85E-04 3.94E-02	+

  3 several kmers or unitigs can have the same presence/absence pattern on a given set of genomes, so we also represent the proportion of kmers or unitigs which are ltered out from our GWAS because they correspond to duplicated kmers or unitigs (light grey) I don't understand why kmers (unitigs) with the same PA pattern in a set of genomes should be duplicated. I thought that they are simply conserved (or in other words not polymorphic). Am I missing something? Authors should explain this, since readers can have my same diculties in understanding this statement. Mentionned → mentioned to any know genetic → to any known genetic there are still unreported → these are still unreported

		Kanamycin					(17/17)			Streptomycin						(23/23)			Ethambutol			(11/31)			Isoniazid			(6/25)			Rifampicin
	2	1	7	7	6	5	4	3	2	1	9	8	7	6	5	4	3	2	1	6	5	4	3	2	1	5	4	3	2	1
	2/28	4/38	3/20	2/20	13/69	8/31	6/45	25/113	6/37	5/30	3/34	2/21	8/34	4/33	6/36	6/37	14/61	21/87	6/44	3/26	1/22	6/36	6/44	30/113	9/51	4/65	1/19	5/41	6/37	36/115
	1.72E-09	1.24E-77	9.43E-04	9.43E-04	9.18E-05	2.86E-09	1.40E-09	2.87E-16	1.06E-28	3.70E-31	2.12E-04	1.43E-04	3.04E-05	8.79E-06	6.93E-06	4.05E-12	6.90E-15	5.55E-23	2.63E-23	1.63E-02	8.39E-03	1.75E-03	1.01E-08	6.36E-25	4.84E-119	3.90E-02	1.79E-02	4.02E-08	4.35E-20	4.84E-70	minq
	6.91E-01	8.13E-01	7.46E-01	7.46E-01	-2.16E-01	-5.35E-01	-2.71E-01	-3.39E-01	-4.28E-01	5.44E-01	-3.84E-01	-2.33E-01	-3.24E-01	2.72E-01	-2.51E-01	-2.78E-01	-3.67E-01	-3.84E-01	-3.94E-01	-4.23E-01	4.89E-01	-1.96E-01	-2.44E-01	-3.96E-01	-7.21E-01	-6.57E-01	7.27E-01	-2.24E-01	-3.55E-01	-5.77E-01	effect	Estimated
	0/484	8/484	1/677	1/677	615/677	670/677	582/677	536/677	509/677	660/677	706/709	639/709	697/709	32/709	658/709	494/709	683/709	565/709	618/709	470/472	459/472	460/472	462/472	451/472	460/472	16/531	373/531	507/531	455/531	518/531	Pheno0 (susceptible)	count per phenotype:
	62/187	144/187	19/489	19/489	325/489	450/489	216/489	131/489	73/489	310/489	274/332	223/332	284/332	112/332	201/332	50/332	200/332	64/332	126/332	796/815	805/815	515/815	364/815	271/815	124/815	58/666	445/666	258/666	118/666	271/666	Pheno1 (non-susceptible)	count per phenotype:
	SNP in a core gene	SNP in a core gene	SNPs in a core gene	SNP on core gene	hot-spot in a core gene	SNP in a core gene	SNP in a core gene	hot-spot in a core gene	SNP in a core gene	SNP in a core gene	SNP in a core gene	SNP in a core gene	SNP in a core gene	SNP in a core gene	SNP in a core gene promoter	SNP in a core gene	hot-spot in a core gene	hot-spot in a core gene	SNP in a core gene	SNP in a core gene	SNP in a core gene	SNP in a core gene promoter	SNP in a core gene	hot-spot in a core gene	SNP in a core gene	hot-spot in a core gene	SNP in a core gene	SNP in a core gene	SNP in a core gene	hot-spot in a core gene
	rpoB I1187T (outside the RRDR)	rrs, 16S rRNA A1401G	30S ribosomal protein S14	espG1	gyrA QRDR	rrs, 16S rRNA C517T	embB M306V	rpoB RRDR	katG	rpsL (30S ribos.protein S12)	ubiA (Rv3806c)	rpsL (30S ribos.protein S12)	embB Q497R	rrs, 16S rRNA A1401G	mabA(fabG1)-inhA	katG	gyrA QRDR	rpoB RRDR	embB M306V	inhA	Rv3812	mabA(fabG1)-inhA	embB M306V	rpoB RRDR	katG	gyrA QRDR	Rv0226c	embB M306V	katG	rpoB RRDR
	Position not described in the litterature.	described for kanamycin resistance		Cell wall and cell processes	hot-spot region described for quinolones resistance	described for streptomycin resistance	described for ethambutol and rifampicin resistance	hot-spot region described for rifampicin resistance.	described for isoniazid resistance	described for streptomycin resistance	described for ethambutol resistance	described for streptomycin resistance	described for ethambutol resistance	described for kanamycin resistance	described for ethionamide and isoniazid resistance	described for isoniazid resistance	hot-spot region described for quinolones resistance	hot-spot region described for rifampicin resistance.	described for ethambutol and rifampicin resistance	described for ethionamide and isoniazid resistance	PE-PGRS family protein PE_PGRS62	described for ethionamide and isoniazid resistance	described for ethambutol and rifampicin resistance	hot-spot region described for rifampicin resistance.	described for isoniazid resistance	hot-spot region described for quinolones resistance	transmembrane protein	rifampicin resistance	this mutation was described for ethambutol resistance, but also for	described for isoniazid resistance	hot-spot region described for rifampicin resistance.
		Palomino, 2014			Palomino, 2014	Palomino, 2014	Shi, 2007	Palomino, 2014	Palomino, 2014	Palomino, 2014	Safi, 2013	Palomino, 2014	Palomino, 2014	Palomino, 2014	Lee, 2000	Palomino, 2014	Palomino, 2014	Palomino, 2014	Shi, 2007	Lee, 2000	also found for MDR	Lee, 2000	Shi, 2007	Palomino, 2014	Palomino, 2014	Palomino, 2014		Shi, 2007	Palomino, 2014	Palomino, 2014
		1	not found	not found	12 (1.51E-04)	7, 8, 10	13 (1.61E-04)	6, 9	2, 3	1, 4, 5	not found	9	16 (4.91E-04)	8	12 (7.30E-05)	4, 5	7	3, 6	1	101 (7.26E-07)	not found	71 (2.40E-14)	4, 5, 7, 9	3, 10	1, 2	9	not found	6, 7		2, 3	1, 4, 5, 8

  In their manuscript,Jaillard, Lima and colleagues describe a new method for performing genome-wide associations studies in bacteria. Rather than focussing on changes to the underlying association model, they instead propose changing the variants being tested from a k-mer to unitig extracted from the population de Bruijn graph. I think this is a very clever idea, and a natural extension to current bacterial GWAS methods. This is timely, as this community is becoming more comfortable with thinking of and viewing genetic variation through graphs. They test their method on antibiotic resistance in a number of species, now becoming a standard test for bacterial GWAS methods, and successfully find known and potentially new resistance mechanisms. I thought the paper was very well written, and a lot of work has clearly gone into the analysis (including extensive supplementary material). After reading through the paper, I became very excited to try the software myself, which did not disappoint. I was able to get it running on the provided test dataset with only minor issues. I then tried it on my own set of test data, and got excellent results from the tool. I fully support the publication of this manuscript in PLOS Genetics. The method itself will be useful to bacterial genomics researchers, and the investigations performed in the paper also contain interesting nuggets of information for those particularly interested in bacterial GWAS. I have some comments listed below that I would like to see the authors consider before publication, though these are mostly minor changes or suggestions. Finally, I note from the cover letter that the PLOS Genetics editors may have had concerns with 'previous publication' of some of this material on bioRxiv. It is my opinion that this should in no way negatively affect publication of this submission, which is clearly a distinct piece of work.

	Reviewer 1:	John Lees	Main comments	1.1 The main advantage of this method is its representation of variants, rather than	improvements or changes to the underlying model. As such, it would be nice if the	examples of biological novelty provided were arrived at clearly through the use of unitigs	rather than k-mers. In the final section of the results, could the existing methods	(bugwas/SEER/HAWK) make the same discoveries using k-mers? Can the authors make it	clear how their use of unitigs as variants lead to potentially novel results, rather than use	of bacterial GWAS generally?

fast, memory-efficient, and scales to very large panels

  Table, we replaced the WHO panel by a random 2500-genome sub-panel for each species (Large TB, Large SA, and Large PA). We added several sections in the text to describe the modifications we did here. The large panels are introduced in the Methods section 'Datasets' (check the red text in lines 532-534) and detailed in the new Methods section 'Large panels' (check the red text in lines 575-584). The study of the scalability of DBGWAS to these very large panels is detailed in the new Results section 'DBGWAS is ' (check the red text in lines 275-284 and S9 Fig).The comparison of the computational efficiency between DBGWAS, pyseer and HAWK was extended and is described in the same subsection (check the red text in lines 285-303).We completely updated the Author summary and the Discussion (check the red text in lines 306-310) sections as suggested by the reviewer, in order to remove any ambiguity.

	Minor comments	1.5 Author summary: 'Any possible type of genetic variation'. Do de Bruijn graphs	represent copy number variants, large structural changes and inversions well? If not,	a short discussion in the introduction about exactly which variants can be found	(SNPs, short and large indels?) and which can't would be useful. Also, only common	locus variants will work using this approach. This statement is also made at the start	of the discussion, and should be modified there too.	1.6 Introduction: Another bacterial GWAS method that should be referenced is	treeWAS	(http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005958).

  Introduction: A useful feature of traditional SNP-based GWAS is the local linkage-disequilibrium, which can be seen on Manhattan plots and increases power to find signals. I think the analogue here is the inclusion of nearby nodes in the graph. A discussion about LD in the context of unitigs would therefore be useful. 'LD' appears in table 1, but I am not sure how it is defined.

  4, scalability does not only depend on the number of genomes but also on the nature of the genomes. The new S9 Figure highlights the performance of DBGWAS for 3 different panels, and increasing sizes. Please see the answer to major comment 1.4 for more details.

	Results: A further potential advantage of using unitigs is the smaller number of	patterns, and therefore lower multiple testing burden. For the test datasets, could you add	the number of k-mer as well as having the unitig patterns in supplementary table 1, and	state this advantage in the text?
	1.9

  We thank the reviewer for this very valuable example of mosaic genes. We found this example useful and very illustrative, and we created a new section on DBGWAS gitlab page for user examples (see https://gitlab.com/leoisl/dbgwas#user-case-studies ). We added the reviewer's results in this section, and used it as an illustrative example in section 'DBGWAS facilitates the interpretation of k-mer-based GWAS' of our manuscript (check the red text in lines 249-254). We noted however that the subgraphs in the output were not annotated. So, if the reviewer wishes to either send us all DBGWAS output folder or the raw input, we could recompute the third step with an annotation.The amino-acid changes are indeed not obtained directly from DBGWAS. DBGWAS highlights the local polymorphism thanks to the red-versus-blue unitigs, and looking at the sequences (length and base pairs) of the red/blue unitig often provides a resolution at the SNP level. However, a mapping on UniProt referenced sequences (with amino-acid positions) was necessary to provide the information presented in lines 103, 211. We added a sentence to explain how we retrieved these positions (check the red text in lines 110-111): "Mapping the sequence of these unitigs on the UniProt database revealed an amino-acid change at L83S, right in the enzyme binding site."

	7.2 Gb RAM and 2.6 hrs CPU. Dataset details:	http://pyseer.readthedocs.io/en/master/tutorial.html]. Perhaps this potential concern	could be noted in the text, and how DBGWAS would cope with such highly variable	regions. Either this example or a simulated phenotype with adjacent SNPs each	contributing some variance explained could be instructive.	1.11 Results: A few times specific amino acid changes are mentioned (e.g. lines 103, 211),	which I think are known causal variants. Is it possible to achieve this single mutation	resolution with the unitig approach in any of the datasets? An attempt, or discussion of,	such fine-mapping would be interesting. It should also be made clear exactly	how/whether these specific mutations relate to the DBGWAS output.	1.12 Results: I am surprised that SEER used so much memory and run-time, and I think	this is probably due to quirks in the static binary release. I would appreciate it if our	updated version, pyseer (https://goo.gl/EYmS4D), could be used in this comparison	instead. Also, could the authors clarify whether the large memory use was from SEER	itself, or during k-mer counting? (If cDBG offers a more scalable way to count k-mers,	than that's great.)
																If the authors find this example	useful at all the output from DBGWAS is here:	https://www.dropbox.com/s/equet6znoylzzkk/mass_pen.tar.bz2?dl=0. Resource usage:

  Experiments took one hour and a half on average, and produced a compact set of meaningful subgraphs, thereby facilitating the interpretation of the results." 1.30 Author summary: Sentence starting 'Thanks to the use of cDBG'. I don't understand this sentence. We wrote a new version of the author summary, where we removed this sentence. 1.31 Results line 191: 'blue or red' -> state this in terms of the actual phenotype We modified the sentence (check the red text in line 91): "...with a fork separating susceptible (blue) and resistant (red) strains." 1.32 Discussion line 259: 'the classic methods' -explain what these are.

  5.1 on Debian-7.11.0: debian@debian:~/051_test/bin$ ./DBGWAS ./DBGWAS: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by ./DBGWAS) ./DBGWAS: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./DBGWAS) DBGWAS also uses GEMMA for the statistical test, but GEMMA binary also failed on Debian-7.11.0: debian@debian:~/051_test/bin/DBGWAS_lib$ ./gemma.0.93b ./gemma.0.93b: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /home/debian/051_test/bin/DBGWAS_lib/sharedobjects/libgsl.so.0) We agreed that a good solution to build a portable binary was to use Holy Build Box (http://phusion.github.io/holy-build-box/) //pmelsted.wordpress.com/2015/10/14/building-binaries-for-bioinformatics/) on how he did it for kallisto (NL Bray, H Pimentel, P Melsted and L Pachter, Near optimal probabilistic RNA-seq quantification, Nature Biotechnology 34, p 525--527 (2016)). By doing so, the new precompiled DBGWAS binary (v0.5.2) is more portable: it should work on pretty much any glibc-based x86 and x86-64 Linux distribution released since 2007 (e.g.: Debian >= 6, Ubuntu >= 10.04, Red Hat Enterprise Linux >= 5, CentOS >= 5, etc).

	blog
	following Páll Melsted's	(https:

http://pbil.univ-lyon1.fr/datasets/DBGWAS_support/full_dataset_visualization

https://gitlab.com/leoisl/dbgwas/wikis/Customizing-annotation-databases

https://gitlab.com/leoisl/dbgwas/wikis/DBGWAS-web-based-interactive-visualization

https://pyseer.readthedocs.io/en/master/tutorial.html

https://github.com/nvalimak/fsm-lite

https://gitlab.com/leoisl/DBGWAS_support/tree/master/scripts/pySEER

https://gitlab.com/leoisl/DBGWAS_support/tree/master/scripts/HAWK_0_8_3_beta

https://biorxiv.altmetric.com/details/36093427/twitter

http://udl.stanford.edu/tutorial/supervised/SoftmaxRegression

loci represented as polymorphic in the alignment lead to 3 bubble patterns in the cDBG, and numerous redundant k-mers. In the second case, genomes are so polymorphic that an alignment is not possible. The cDBG summarizes well the common regions and the links between them, while the collection of unique k-mers still contains redundancy.

Patterns are the columns of the X matrix, containing the unique unitig minor allele description profiles (see Methods section). Association tests are computed on the patterns. Supplementary Material S3.14: DBGWAS time and maximal memory load on a single core. All

We thank the reviewer for pointing out pyseer, the updated version of SEER. We fully replaced SEER by pyseer in this work (including the text and the benchmarks). As this was also a concern of Reviewer 1, we provide more details in item 1.12 on what changed in the manuscript and in the benchmarks by replacing SEER by pyseer.

Availability and implementation: The code and data used in the experiments will be made available upon acceptance of this manuscript. Contact: magali.dancette@biomerieux.com

We benchmarked DBGWAS against a targeted approach to ensure its ability to retrieve all expected resistance determinants. We thus performed association studies under the same model, using as input a collection of known causal resistance SNPs and genes, dening the resistome. In this validation study, we used bugwas with the same phenotypes and population structure matrix W , so the resistome-based analyses and DBGWAS only dier by their input variant matrix (unitigs versus SNPs or genes presence/absence). For P. aeruginosa resistome, we use a variant matrix previously described [START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF], which includes presence/absence of known resistance gene variants, as well as the SNPs called against these reference gene variants. For M. tuberculosis resistome, we built the variant matrix using the same approach as for P. aeruginosa [START_REF] Jaillard | Correlation between phenotypic antibiotic susceptibility and the resistome in Pseudomonas aeruginosa[END_REF]: we called the SNPs from a list of 32 known resistance genes and promoters [47,[START_REF] Gygli | Antimicrobial resistance in Mycobacterium tuberculosis: mechanistic and evolutionary perspectives[END_REF][START_REF] Palomino | Drug resistance mechanisms in Mycobacterium tuberculosis[END_REF]. The time and memory usage required for the complete analysis (from the mapping of the resistance genes and positions on the genome assemblies to the association study) are provided in Tables 3.2 and 3.3. We sort the annotated features by q-values. S3.10 Suppl and S3.11 Suppl summarise all top variants using their q-value ranks, while Tables 3.2 and 3.3 report the annotations of all variants with a q-value < 0.05 for P. aeruginosa levooxacin and M. tuberculosis streptomycin resistance, respectively. k-mer-based GWAS pyseer We installed pyseer [START_REF] Lees | Sequence element enrichment analysis to determine the genetic basis of bacterial phenotypes[END_REF][START_REF] Lees | pyseer: a comprehensive tool for microbial pangenome-wide association studies[END_REF] commit ID d17602500a4530b0e68a679ed675fdb12942f56f (9 commits ahead of pyseer v1.1.1). pyseer pipeline is composed of four steps: 1) k-mer counting; 2) population structure estimation; 3) running pyseer; 4) downstream analysis. To use the correct parameters, we followed the pyseer tutorial 5 . For k-mer counting, we used fsm-lite 6 , ltering out all k-mers with a minor allele frequency smaller than 1%. For population structure estimation, we used Mash v2.0 [START_REF] Ondov | Mash: fast genome and metagenome distance estimation using MinHash[END_REF]. To run pyseer, we used 8 cores and a LRT p-value threshold of 0.05. Downstream analysis involved getting the k-mers which exceeded the signicance threshold (which can be found using the scripts/count_patterns.py script), sorting them by LRT p-value, blasting them against the two databases presented in the Interpretation of signicant unitigs (step 3) subsection, and keeping the best hit for each k-mer. For reproducibility purposes, the scripts we used to run pyseer can be found online 7 .

HAWK

We rstly ran HAWK [START_REF] Rahman | Association mapping from sequencing reads using k-mers[END_REF] v0.9.8-beta, as it allows correcting for population structure. Unfortunately, it was unable to nd the known causal variants reported for P. aeruginosa levooxacin and M. tuberculosis streptomycin resistances by other methods (see Tables 3.2 and 3.3). We therefore kept in our benchmarks an earlier version, HAWK v0.8.3-beta, which presented better qualitative performance for these two evaluated panels. HAWK pipeline is composed of ve steps: 1) k-mer counting with a modied version of jellysh [START_REF] Marçais | A fast, lock-free approach for ecient parallel counting of occurrences of k-mers[END_REF]; 2) running HAWK; 3) assembling signicant k-mers with ABYSS [START_REF] Jackman | ABySS 2.0: resourceecient assembly of large genomes using a bloom lter[END_REF]; 4) getting statistics on the assembled sequences; 5) downstream analysis. The rst four steps were Simulation of genomes with LP mutations.

We build synthetic genomes by preparing a sequence s of C = 150 core genes, and among them we pick M = 50 genes which will receive an LP mutation. In order to simulate LP mutations in both core and accessory genes, we apply an independent gene frequency threshold f taking values between 0.15 and 1 to build a vector of mutated gene presence/absence G i ∼ B(f ): if G i = 0, the M genes are removed from the core gene sequence of the i-th genome.

Several types of LP are then created, to ensure some variability within the LP class. First, the nb_mut parameter allow to distinguish between single and multiple LP in a gene, as presented in Fig.

Replace position by Base; end end end Algorithm 3: Denition of the LP types A total of 5868 graphs with an `LP' label were generated using this strategy, among them 1467 graphs on average of each of the following types: accessory-single, accessory-multiple, core-single and core-multiple. This corresponds to 1175 graphs per nh value, on average.

As the simulations are based on a nite set of genes, a stratication is also a applied to limit the dependency between the training and test datasets. The simulated training dataset is assigned the 1522 rst gene alignments, over 1920. Doing so, the training dataset comprises a total of 9420 simulated graphs and the test dataset 2575 simulated graphs.

The test dataset is used to assess nal generalisation performances of the prediction model selected from the training dataset analysis.

Appendix

Table S1.1: Phenotypes. This table gives for each isolate included in the panel, its CLSI status (I, R or S), for each of the drug. Missing values (NA) appear when the isolate was not phenotyped for a given drug. This table provides only a short view of the complete published Supplementary Table.

APPENDIX

The core genes (present in all genomes) are retrieved by sequence homology A collection of (aligned) core genes is built (each contains n homolog sequences) Some core genes are concatenated to build n simplified synthetic genomes. Supplementary Figure S2.1: Simulation of simplied genomes using a core gene collection. This gure illustrates how synthetic simplied genomes were build from a set of assemblies and annotations. This process was used to evaluate the bubble approach (steps (A) to (D), in Chapter 2) as well as to build the core genomes used to produce simulated graphs (steps (A) to (C), in Chapter 4). Supplementary Figure S2.2: bugwas applied to the unitig patterns, for the levooxacin resistance phenotype. This annotated Manhattan plot provides the -log 1 0 p-values computed by the linear mixed model implemented in bugwas on the unitigs of a pan-cDBG built with k = 31. Unitigs are ordered by PCs [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF], and annotations were added to highlights the genuine levooxacin variants and the new variant found within the 15 rst patterns. with unitigs is more ecient for interpretation of the results and consider working with kmers as cumbersome: Assuming a pattern is found to be associated with resistance in our test, its interpretation in a xed-length kmer paradigm can be cumbersome: it typically requires to map all kmers corresponding to the pattern to all genomes as there is no single reference genome in this context and to make sense of these mappings.

However, it sounds like an implementation issue that can be fairly easily solved in the kmers approach using dictionaries: each unique kmer used can map to the genomes and genomic locations from which it was extracted. In addition, a reverse dictionary can be generated to map between each unique pattern to the set of its corresponding kmers (during the construction of the patterns). The authors also suggest that using unitigs provide advantage in the interpretation step. They demonstrate this using a nice set of gures, which make the point that using unitigs indeed provides a good approach for visualization of the results. Yet, the authors did not provide an alternative visualization based on the kmers approach.

2. Core details are missing:

-Did the authors lter out genetic variants prior to analysis based on low minor allele frequency (MAF)? If so, what threshold was used? Fig. 4c suggests that the authors may have ltered out unitigs with MAF < 2%. I suspect this threshold is not stringent enough given the sample size used: consider the levooxacin phenotype for which values were available for 117 strains. The 2% threshold in this case means that some patterns should have only a very small number of occurrences of the minor allele (e.g., 3). In this case, the probability that these 3 samples have relatively extreme phenotypic values merely by a chance (and therefore yield a signicant p-value) is relatively high. Since many patterns are tested, I would expect to see some spurious associations only based on this low MAF threshold. The authors can conrm that using permuted data where no true associations are anticipated. This approach can be also used to determine an appropriate MAF value.

-The authors didn't report p-values for their experiments. If the p-values are deated APPENDIX 1) The authors claimed that they proposed an alignment-free GWAS method. However, in the method section, they mentioned that the unitigs from the newly assembled DBG are aligned against the original genome assemblies using Bowtie2. The claim of "alignmentfree" seems to contradict with the proposed method.

2) The major disadvantage of SNP-based approach is the challenge of aligning highly plastic genomes to a single reference genome. The proposed approach built the compacted DBG from assembled genomes of multiple strains. Isn't it true that the SNP-based approach can be simply improved by using a meta-reference constructed from multiple strains as well? A direct comparison between these two ideas would make it easier to evaluate the advantages of unitigs. The SNP-based approach was mentioned multiple times in the introduction, but there wasn't any experiment conducted directly on the SNP-based approach.

3) The method is evaluated on a highly plastic genome, P. aeruginosa, with 282 strains. However, it is still within a single species. It would be more interesting to see how the method performs across dierent species. 4) In the introduction, the authors stated that general k-mer approaches require more computational resources, such as more memory for storage and more time for loading and interpretation. However, the authors never demonstrated the memory usage and running time of the unitigs approach. It is dicult to judge the performance of this approach.

5) The simulated dataset is generated using a multivariate logistic model, but the proposed solution uses multivariate linear regression. Section 2.2 claimed that logistic model did not perform well on preliminary experiments, but the authors never discussed the reasons for this observation.

Minor concerns: 1) Even if it is a popular jargon, "plastic genome" could be described or explained at least once in the paper.

2) S2.1, "constant kmer" is a confusing term. I think it refers to "shared" kmers, which is being used in the following paragraph.

3) S2.1, "in the remainder" sounds weird. It should be "in the remainder of the paper". 4) S2.1 "adaptive fashion existing representations" -> adaptive fashion "of the" existing representation.

5) The axis fonts and legends are too small to read in Figures 4 and5. 6) Some of the references are not consistent. For example, both abbreviation and full journal names are seen (Nat. methods and Nature methods).

Reviewer 3 (0)

The authors present an approach based on compacted De Brujin graphs to perform GWAS in bacteria. The approach is very interesting, and might be of use for bacterial GWAS. However, the presentation of the results suers from several drawbacks. Major: 1) No comparison with previously developed approaches is presented. Authors only compare results obtained without adjusting for population structure and including population structure as a random or xed eect.

2) Figure 5 is hard to understand: On the x-axis you have up to 1 Million positive calls (which is quite a high number for bacterial genomes). On the y-axis you plot the true positive rate. However, since true positive rate is TP/P, you should have found more than 800,000 reported causal variants. Or maybe, you computed TPR using a number of Positives dierent from the values used on the x-axes.

APPENDIX kmer collection

Compacted DBG Genomes A) Similar genomes (aligned)

B) Polymorphic genomes (cannot be aligned)

Supplementary Material S3.1: Alignment to a reference (when possible), cDBG, and kmers obtained for similar (A) and very polymorphic genomes (B). In the rst case, the Annotation Comment : green = has been described for the studied phenotype orange = has been described for another phenotype white = not described for resistance References SNP rank (if found by the resistome SNP approach) and q-value if not in DBGWAS results for S. aureus to antibiotics. For each antibiotic, top subgraphs were reported with their rank, the q-value of the unitig with the lowest q-value (minq), the corresponding estimated effect (estimated of the linear model) and the number of susceptible (resp. resistant) strains harbouring this unitig (count per phenotype). The type of event represented by the subgraph, its annotation and some comments and references on this annotation were also provided. Comments were coloured if the annotation was previously described in antibiotic resistance literature: in green if this description concerned the tested antibiotic, in orange otherwise.

Computing Time

Panel size (on a log scale) Time (on a log scale)

Memory usage

Panel size (on a log scale)

Memory in GB (on a log scale) Supplementary Material S3.12: Large scale analysis on computational resources usage. This gure describes how DBGWAS scales in terms of time and memory usage for large datasets, containing up to 9,000 genomes. The large panels used here are described in the Large panels subsection of the Methods section. To understand better DBGWAS performance behaviour, we present performance curves for each panel at size points of 100, 250, 500, 1,000, 2,500, 5,000 and 9,000 genomes. The executions were done in a cluster, instead of a single machine, and used 8 cores each. In order to reduce subsampling and machine heterogeneity problems, each sub-panel was randomly built 10 times and we present the time and memory usage for all these executions. Although these two measures not only depends on the number of input genomes but also on their length and complexity, this gure allows estimations of the computational resources usage on small and large panels with dierent genome plasticities. Supplementary Material S3.17: Number of subgraphs generated using dierent signicance thresholds. This table shows the number of subgraphs generated when dening the signicant unitigs as the ones with the 100 lowest q-values (default SF F = 100, 'top 100') or when using a 5% false discovery rate (FDR) threshold (SFF = 0.05, '5% FDR'). Dierent datasets lead to dierent q-values, even by several orders of magnitude. For instance, a single FDR threshold leads to selecting a large number of unitigs generating several hundreds subgraphs for SA (S. aureus) panel.

APPENDIX

Appendix S3.1: Evaluation of association models. We evaluate two models controlling for population structure: (i) using the rst principal components as covariates with a xed eect [START_REF] Price | Principal components analysis corrects for stratication in genome-wide association studies[END_REF] (implemented in the PLINK software [START_REF] Chang | Second-generation PLINK: rising to the challenge of larger and richer datasets[END_REF]) and (ii) linear mixed models [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF][START_REF] Kang | Ecient control of population structure in model organism association mapping[END_REF][START_REF] Yu | A unied mixed-model method for association mapping that accounts for multiple levels of relatedness[END_REF], and compare them to (iii) a model not accounting for the population structure.

We evaluate the three models by their ability to detect (a) true positive unitigs simulated under dierent population structures, and (b) unitigs from real data mapping genuine variants described in the literature.

Evaluated models

Let Z be the full matrix of unitig minor allele frequency patterns (before de-duplication) and X be the matrix of unique patterns (after de-duplication) as dened in the Methods section of the main manuscript. For each pattern X ij , we test H 0 : β = 0 versus H 1 : β = 0 in the following linear model, relating binarized antibiotic susceptibility phenotypes to X ij candidate genetic determinant and population structure:

the eect of the tested candidate on the phenotype, W ∈ R l a factor representing the population structure, and α ∈ R l the eect of this population structure on the phenotype. Denoting Z = U ΛV the singular value decomposition (SVD) of Z, we use:

(i) W = U q (matrix formed by the rst q columns of U ) and a xed eect α;

(ii) W = U Λ and a random eect α ∼ N (0, σ 2 a ), σ 2 a > 0;

(iii) α = 0.

For the rst two models, we compute p-values for H 0 using a likelihood ratio test. For the random eect model, we use bugwas [START_REF] Earle | Identifying lineage eects when controlling for population structure improves power in bacterial association studies[END_REF] to test H 0 , providing the pre-computed population structure W as described above.

Simulated data

We simulate resistance phenotypes based on the 282 P. aeruginosa genomes, arbitrarily xing which patterns X have a non-zero eect β on the phenotype Y : we sample the phenotype Y i of each sample i from a multivariate logistic model:

We generate synthetic data under model Eq 4.8 with two scenarios. The rst scenario illustrates a case where there is a population eect on the observed resistance, which is not explained by the set of patterns in the tested design X. The second scenario illustrates the case where there is little population eect observed on the phenotype, except for that caused by the association of modeled causal patterns X with W , i.e., outside of Xβ in Eq 4.8. To simulate the rst scenario, we arbitrarily assign the 2nd and 6th columns of W = U Λ 1 2 to have non-zero eects α. We then select 10 distinct patterns from X as true determinants. To do so, we compute the largest dot product of each pattern with the APPENDIX rst six columns of W , and choose our true determinants among those whose largest dot product is below the fth percentile of dot products calculated across all patterns. This allows us to simulate the case where true determinants are independent from the population structure (their eect is not inated by the W α term). The odd ratios e β j are xed to 6 for these patterns.

A) data simulated with population effect B) data simulated w/o population effect Supplementary Material S3.18: Evaluation of test models on simulated data. Scenarios (A) and (B) intend to illustrate the model ability to detect true positives in the presence or in the absence of a population eect on the observed resistance. In the rst case, the ROC curve shows that taking the population structure into account increases the power, while in the second case, correcting for the population structure when there is not, decreases the power to detect true determinants. Using a random eect model is however more robust and leads to a smaller power loss than using a xed-eect model.

We also randomly select 290 patterns from X as non-determinants, i.e., with a β j = 0 eect in the model, so p = 300 in our simulations. The population structure can lead to spurious discoveries, as we do not control the dot product between columns of W and these patterns with zero eect. Finally in order to control the amplitude of the population eect, we normalize W α to 6 times the median value of the |X j β j | across non-zero β j , where X j denotes the j-th column of X.

To simulate the second scenario, we use the same settings as before, but we select the 10 true determinants among those that have a large dot product with W , rather than a small one, and set all α eects to zero.

We apply the three versions of our univariate test described in Eq 4.7, with q = 10 for model (i), to both scenarios over 100 data generations and plot ROC curves (Fig S3 .18 in S1 Appendix). As expected, for the rst scenario, the test which does not account for the population structure has very low power to detect patterns associated with the phenotype: by construction, some patterns with zero actual eect have large dot products with W α, which inates the estimate of their eect and leads to false discoveries. Taking the population structure into account in the model improves the power by limiting this ination. For the second scenario, we observe the opposite eect: correcting for the population structure decreases the power to detect true determinants. Assuming there is a population eect when there is no such eect in reality, leads to articially deating the estimated eects of patterns which are associated with the population structure. S3.5: Results of the `ordinal-DBGWAS' on the `full' P.aeruginosa panel. We ran DBGWAS' rst step, and used the matrix of presence/absence patterns to test unitigs associations using the ordinal model of Eq 1.1. We produced the unitig subgraphs with DBGWAS' third step. In this table, for each antibiotic, the genuine variants integrated to the model are provided, as well as a recall of the RWAS new candidates (mutations are shown by a * and gene presence/absence by a +). The last column shows the new candidates found with DBGWAS (each subgraph is represented by [ ]). Whatever the approach, new candidates were found only for few phenotypes, certainly due to the limits of the panel for the other antibiotics. The DBGWAS strategy provided new insights by describing candidates out of the resistome (highlighted in orange).

Prior

New Reviewer 1:

The authors have answered or responded to all my comments from the previous submission. They have clearly put a substantial amount of eort into this revision, both in the manuscript and updating the software. I am convinced that, thanks to the authors' eorts, unitigs will come to replace k-mers as the variant of choice in bacterial GWAS.

The nal section of the results and tables 2/3 demonstrate this well. Additionally, with the authors' changes I was able to run the software without compilation -I think this will help their software be used more extensively. I also thank the authors for putting the extra time in to use our updated pyseer method. The only thing I was surprised by was that the disk usage would probably not have been exceeded if the output of fsm-lite was piped through gzip (at least, I have never seen anything over tens of Gb, even with similar numbers of samples). However, I see this may not have been clear in the tutorial the authors followed. Perhaps this could be noted, but it is not necessary for the authors to re-run any of their analysis. Finally, the full set of output les noted in point 1.10 is available here, if needed: https://www.dropbox.com/s/0jg9812y1ywb31g/mass_pen_dbgwas_all.tar.bzip2

John Lees

Reviewer 2:

I'm extremely satised with the changes that have been made to the manuscript, software, and accompanying documentation. The new release of the software is now working on my computing cluster. I'm very happy for the manuscript to be published in its current form.

Choice of benchmarking datasets:

2.7

The dataset composed of genomes of different species seemed like an especially unusual choice, as I haven't seen any studies do this before. For a k-mer based approach in particular this seems incredibly unlikely to identify any shared resistance mechanisms. I'm unsure what the purpose of this inclusion of this dataset was, but I think this part of the analysis should be removed.

Thank you for this comment. We removed the unrealistic WHO panel and replaced it by 3 single-species large datasets with random phenotypes, in order to analyse the computational performance at a comprehensive scale. More details are given in item 1. [START_REF] Alekshun | Molecular mechanisms of antibacterial multidrug resistance[END_REF] DBGWAS is doing the same set of association tests as one would with plain k-mers. Our contribution compared to testing plain k-mers lies in the ability of DBGWAS to aggregate the results in a more interpretable form, compacting overlapping k-mers with identical presence/absence profiles in a single unitig, and exploiting the colored DBG to understand its genomic context. Comparing with a k-mer approach in terms of results therefore amounts to comparing different ways to interpret the set of significant k-mers. Plain k-mers would need to be aligned against annotated references, leading to a lot of manual inspection. We thought that a relevant baseline would be HAWK and pyseer, which are other ways to work with k-mers.

Comparing with plain k-mers in terms of runtime and memory, amounts to quantifying the overhead caused by our step 3, which we now show in new Table S2.

Regarding SNP/gene-based approaches, we chose to compare the results of DBGWAS with those obtained using a resistome approach: for each species and each drug, we built a design matrix describing the presence of known causal genes and the SNPs within these genes in the genome of each sample, and applied the same statistical test used by DBGWAS to this matrix. Our rationale was to check that DBGWAS did not miss causal variants that could be recovered by SNP/gene-based approaches (regardless of its ability to discover new elements). We now provide an estimation of the runtime and memory usage required to build the resistome matrix for the examples presented in Tables 2 and3.

2.9

For gene-based analyses its common to use gene presence/absence analysis based on a pangenome created from assemblies (e.g. the output from Roary or similar). This pangenome-based analysis isn't reference dependent, so the critique in the text that standard gene-based approaches are limited based on the choice of reference is inaccurate.

Thank you for this remark. We modified the text in the Introduction (check the red text in lines 8-15): "The most common approaches are based on single nucleotide polymorphisms (SNPs), defined by aligning all genomes of the studied panel against a reference genome [1, [START_REF] Alam | Dissecting vancomycinintermediate resistance in Staphylococcus aureus using genome-wide association[END_REF][START_REF] Alekshun | Molecular mechanisms of antibacterial multidrug resistance[END_REF] against a pangenome built from all the genes identified by annotating the genomes [START_REF] Andrews | Determination of minimum inhibitory concentrations[END_REF], and on gene presence/absence, using a pre-defined collection of genes [START_REF] Ali-Ahmad | Structural and functional insights into the periplasmic detector domain of the GacS histidine kinase controlling biolm formation in Pseudomonas aeruginosa[END_REF][START_REF] Andersson | Persistence of antibiotic resistance in bacterial populations[END_REF]. The use of a reference genome becomes unsuitable when working on bacterial species with a large accessory genome -the part of the genome which is not present in all strains.

On the other hand, methods focusing on genes are unable to cover variants in noncoding regions, including those related to transcriptional and translational regulation [START_REF] Aubert | Oxacillinase-mediated resistance to cefepime and susceptibility to ceftazidime in Pseudomonas aeruginosa[END_REF][START_REF] Baaijens | De novo assembly of viral quasispecies using overlap graphs[END_REF]. Moreover, some poorly studied species still lack a representative annotation [START_REF] Balding | A tutorial on statistical methods for population association studies[END_REF]."

Note: [START_REF] Andrews | Determination of minimum inhibitory concentrations[END_REF] refers to roary

2.10

The manuscript cited for HAWK is the BioRxiv version, which is quite different to the version recently accepted by eLife. Notably, the version of the software reported in BioRxiv did not allow correction for population structure. Also, the current version only includes two principal components when correcting for population structure by default, which tends to be inadequate for bacterial GWASs. In their benchmarking with real bacterial sequence data they use 10 PCs, which is more appropriate, but it's unclear from the methods whether this procedure was followed in the benchmarking in this paper. If including results from a comparison with HAWK, using the version that corrects for population structure is essential.

We thank the reviewer for pointing out the new paper and version for HAWK. We agree that in order to add HAWK to a bacterial GWAS benchmark, correcting for population structure is essential.

We ran the new version of HAWK, HAWK v0.9.8-beta, in the two panels we used to compare resistome-based association studies, DBGWAS and pyseer qualitatively: P. aeruginosa levofloxacin resistance (new Table 2) and M. tuberculosis streptomycin resistance (new Table 3).

Unfortunately, HAWK found no significant k-mers for either of these two panels. By investigating HAWK's code and discussing with its author (our interaction is available here: https://github.com/atifrahman/HAWK/issues/5 ), we realised that HAWK v0.9.8-beta was using very strict k-mer filters. More precisely, we removed the following filters: https://github.com/atifrahman/HAWK/blob/master/hawk.cpp#L503-L510 , https://github.com/atifrahman/HAWK/blob/master/convertToFasta.cpp#L47-L50 , a n d https://github.com/atifrahman/HAWK/blob/master/convertToFasta.cpp#L71-L74 in the hope of retrieving some significant k-mers, to be able to assemble them and then check the causal variants they represent. These modifications did allow us to retrieve 2 contigs for P. aeruginosa levofloxacin resistance and 7 contigs for M. tuberculosis streptomycin resistance. Unfortunately, the downstream analysis of these contigs revealed that they did not correspond to the expected known positive causal variants identified by the resistome-based association study. On the other hand, the previous version of HAWK, HAWK v0.8.3-beta, which does not correct for population structure, was able to find 8 contigs for P. aeruginosa levofloxacin resistance and 2,038 contigs for M. tuberculosis streptomycin resistance. For the first panel, it found one of the two known positive causal variants, and for the second panel, it found the two. Thus, although HAWK v0.9.8-beta is theoretically the correct version of the tool to run, since it is more appropriate for bacterial GWAS, corrects for population structure, and is more recent than HAWK v0.8.3-beta, our qualitative comparison showed that the results obtained with HAWK v0.8.3-beta are far superior than with HAWK v0.9.8-beta. Moreover, the results we obtained with HAWK v0.9.8-beta required modifications of filters that we believed were the source of problems, which might not be the correct way to fish back the significant k-mers. A deeper analysis of why the k-mers are being filtered out in these datasets would be needed, but we thought that further debugging of HAWK v0.9.8-beta's code to make it correctly execute on our datasets was out of the scope of this work.

We briefly explained this decision in the Methods section "k-mer-based GWAS" (check the red text in lines 624-629): "We firstly ran HAWK [START_REF] Barczak | RNA signatures allow rapid identication of pathogens and antibiotic susceptibilities[END_REF] v0.9.8-beta, as it allows correcting for population structure. Unfortunately, it was unable to find the known causal variants reported for P. aeruginosa levofloxacin and M. tuberculosis streptomycin resistances by other methods (see Tables 2 and3). We therefore kept in our benchmarks an earlier version, HAWK v0.8.3-beta, which presented better qualitative performance for these two evaluated panels."

2.11

A more appropriate comparison would be SEER and a SNP/gene based tool (perhaps bugwas since it's the tool underlying DBGWAS) as these are the methods most potential users will be using currently. I think it would be valuable to demonstrate that DBGWAS runs in a comparable time scale and produces more/clearer true positives than a GWAS of SNPs and genes. I think collapsing many gene hits into a single mobile element in the results would be very appealing to people, as would highlighting multiple SNPs in the same gene within a single graph.

We thank the reviewer for this suggestion. Our Methods section 'Resistome-based association studies' features SNPs and genes tested using bugwas, and following the reviewer's suggestion we added a specific subsection entitled 'DBGWAS facilitates the interpretation of k-mer-based GWAS' in the Results section, in order to better highlight that DBGWAS indeed collapses multiple SNPs in a single subgraph (check the red text in lines .

Choice of benchmarking conditions:

2.12 While performance of these methods on a single core is interesting, this seems like an unrealistic test scenario, since methods would be likely to be run in a parallel computing environment (or even using multiple cores on a laptop). Does this method remain competitive when the tools are given access to multiple cores? SEER and HAWK can be run in parallel to drastically reduce run time and it's not clear if DBGWAS can.

We now present two benchmarks where all methods use multiple [START_REF] Andrews | Determination of minimum inhibitory concentrations[END_REF] cores.

The first one is a new benchmark to assess the scalability of DBGWAS. We built several panels from three single-species large datasets with random phenotypes. We present in (new) S9 Figure the time and memory usage performance curves, which provides a better understanding of DBGWAS performance behaviour and estimations of the computational resources usage on small and large panels with different genome plasticities. For more details, please see our response to item 1.4.

The second one is an update of the previous benchmark comparing DBGWAS, pyseer and HAWK, presented in (new) S2 Table . We updated SEER to pyseer, added three large panels, detailed the computational resource usage of all steps of pyseer and HAWK, and ran all tools on 8 cores in this benchmark. We also kept DBGWAS performance on 1 core in (new) S1 We thank the reviewer for their efforts in installing DBGWAS in spite of these errors. The difficulties encountered during the installation and execution of the tool were also a concern of Reviewer 1. We answered all Reviewers' queries on installation and running issues (including this one) in the response of item 1.39. There, we provide a full update of what we have done to make the execution of the statically compiled binary as straightforward as possible, as well as the compilation of the source code.

I did have a look at the example results in the online browser tool. I noticed many

of the hits formed compacted de Bruijn graphs which were less straightforward to interpret than the examples in the paper. I wasn't sure how the unitigs corresponded to the genome/plasmids. In these cases I would have needed to extract the sequences and map them to understand what the results meant. The collapsing of k-mers would be a benefit in this case, but I think the interpretability of these graphs relative to a k-mer analysis has been overblown a bit. In particular, if the authors could explain the graphs which don't form a linear or circular structure, but rather a complex network of unitigs that all appear to be quite interconnected, some of which are accompanied by a large number of protein annotations, this would be helpful. A more extensive set of examples and their interpretation laid out in a manual or a wiki on the GitLab page could address this.

The interpretation of the less straightforward graphs is also one of our concerns. A work initiated on these more connected subgraphs allowed us to find some clues on why these graphs are so complex. We identified that such graphs with a low number of unitigs (http://pbil.univ-lyon1.fr/datasets/DBGWAS_support/experiments/Paeru_Amikacin_visualisations/ components/comp_3.html) often integrate a path of red (positively-associated) nodes lying in a non-coding region between variable accessory genes (here, ICE elements). They seem to be markers of some mobile genetic elements, however as these paths stand in a noncoding region between variable genes, their neighbor unitigs branch to various other unitigs, making the structure complex and hard to interpret.

For similar reasons, when genes involved in gene mobility, such as transposases or intergrases, are captured in a subgraph, the number of unitigs in the subgraph explodes (http://pbil.univ-lyon1.fr/datasets/DBGWAS_support/experiments/Paeru_Amikacin_visualisations/ components/comp_0.html). Indeed, these genes often exist in several copies in each genome and are found in variable genomic environments. When represented at a bacterial population scale, this generate loops and multiple branches, making such subgraphs very complex to interpret. Complex graphs also arise when several variants are aggregated because they are close to each other in at least one strain of the studied panel, and their neighborhood (as defined with DBGWAS -nh parameter) overlap (this is the case of AAC6' acetyltransferase and CML efflux pump in http://pbil.univ-lyon1.fr/datasets/DBGWAS_support/experiments/Paeru_Amikacin_visualisations/c omponents/comp_6.html). In this case, the graph can be simplified by breaking some edges and splitting the subgraph into several subgraphs. This can be done by modifying the parameters of DBGWAS third step (-nh and -SFF). For now, this step indeed requires trial and error to fine-tune the choice of -SFF and -nh values. We recommend to re-run the third step with lower -nh and/or -SFF values (new Methods section 'Re-running from step 2 or step 3' -check the red text in lines 523-528), and also in Methods section 'Graph neighborhoods'.

We now acknowledge the fact that some subgraphs have no straightforward interpretation using the examples above in the 'DBGWAS facilitates the interpretation of k-mer-based GWAS' section (check the red text in lines 255-274).

The automated detection of SNP, MGE or of more complex graph -and the automation of a -nh/-SFF parameter tuning is however not trivial, it is a project in itself. We produced a beta version of a prediction tool able tell apart SNPs from MGEs. To build this tool, we trained predictive models over real and simulated data, producing subgraphs which we knew corresponded to SNPs or MGEs. We will not be able to include it in the next release of DBGWAS, but it will be described in Magali Jaillard's PhD manuscript and added to a future release as soon as possible.

Final comments: Supplementary Figure S4.1: Example of a gene insertion which might be (wrongly) taken for a SNP. This graph, obtained by simulation, shows indeed a single red node in a branch which is opposed to a branch with three blue nodes. However when looking at the sequence length, the red node represents the complete 663 pb of AAC(6')-Ib4 aminoglycoside acetyltransferase gene, while the three blue nodes only represent 41 pb once the two overlapped sequence of length k -1 pb are removed.