, MicroPhan: 746189 to E.J.), and the France G enomique National Infrastructure, funded as part of the Investissemnt d'Avenir program managed by the Agence Nationale pour la Recherche (ANR-10-INBS-09 to C.C.). This publication has been written with the support of the AgreenSkillsþ fellowship program which has received funding from the EU's Seventh Framework Programme (Grant Agreement No. FP7-609398; AgreenSkillsþ contract). We are grateful to the genotoul bioinformatics platform Toulouse Midi-Pyrenees (Bioinfo Genotoul) for providing help and/or computing and/or storage resources. The authors are grateful to the CBGP-HPC computational platform. The funders had no role in study design, ECOFA department (to J.R.), the Marie-Curie AgreenSkillsþ fellowship program cofunded by the EU's Seventh Framework Programme (FP7-609398 to A.M.-M.), the Marie Sk?odowska-Curie fellowship program H2020-MSCA-IF-2016

A. Armenteros and J. J. , SignalP 5.0 improves signal peptide predictions using deep neural networks, Nat Biotechnol, vol.37, issue.4, pp.420-423, 2019.

S. Altschul, Gapped BLAST and PSI-BLAST: a new generation of protein database search programs, Nucleic Acids Res, vol.25, issue.17, pp.3389-3402, 1997.

D. Arndt, PHASTER: a better, faster version of the PHAST phage search tool, Nucleic Acids Res, vol.44, issue.W1, pp.16-21, 2016.

M. K. Asplen, Specialisation of bacterial endosymbionts that protect aphids from parasitoids, Ecol Entomol, vol.39, issue.6, pp.736-739, 2014.
URL : https://hal.archives-ouvertes.fr/hal-02641002

M. Bailly-bechet, M. Vergassola, and E. Rocha, Causes for the intriguing presence of tRNAs in phages, Genome Res, vol.17, issue.10, pp.1486-1495, 2007.
URL : https://hal.archives-ouvertes.fr/hal-00434705

A. Bankevich, SPAdes: a new genome assembly algorithm and its applications to single-cell sequencing, J Comput Biol, vol.19, issue.5, pp.455-477, 2012.

G. M. Boratyn, Domain enhanced lookup time accelerated BLAST, Biol Direct, vol.7, issue.1, p.12, 2012.

S. R. Bordenstein, Bacteriophage flux in endosymbionts (Wolbachia): infection frequency, lateral transfer, and recombination rates, Mol Biol Evol, vol.21, issue.10, pp.1981-1991, 2004.

J. Bourret, S. Alizon, and I. G. Bravo, COUSIN (COdon Usage Similarity INdex): a normalized measure of codon usage preferences, Genome Biol Evol, vol.11, issue.12, pp.3523-3528, 2019.
URL : https://hal.archives-ouvertes.fr/hal-02495056

J. W. Brandt, G. Chevignon, K. M. Oliver, and M. R. Strand, Culture of an aphid heritable symbiont demonstrates its direct role in defence against parasitoids, Proc R Soc B Biol Sci, vol.284, p.20171925, 1866.

T. C. Bruen, H. Philippe, and D. Bryant, A simple and robust statistical test for detecting the presence of recombination, Genetics, vol.172, issue.4, pp.2665-2681, 2006.

B. N. Cass, Conditional fitness benefits of the Rickettsia bacterial symbiont in an insect pest, Oecologia, vol.180, issue.1, pp.169-179, 2016.

P. P. Chan, B. Y. Lin, A. J. Mak, and T. M. Lowe, tRNAscan-SE 2.0: improved detection and functional classification of transfer RNA genes, p.614032, 2019.

H. Charles and H. Ishikawa, Physical and genetic map of the genome of Buchnera, the primary endosymbiont of the pea aphid Acyrthosiphon pisum, J Mol Evol, vol.48, issue.2, pp.142-150, 1999.

F. Chen, A. J. Mackey, J. K. Vermunt, and D. S. Roos, Assessing performance of orthology detection strategies applied to eukaryotic genomes, PLoS One, vol.2, issue.4, p.383, 2007.

X. L. Chen, sRNA-Xcc1, an integron-encoded transposon-and plasmid-transferred trans-acting sRNA, is under the positive control of the key virulence regulators HrpG and HrpX of Xanthomonas campestris pathovar campestris, RNA Biol, vol.8, issue.6, pp.947-953, 2011.

G. Chevignon, B. M. Boyd, J. W. Brandt, K. M. Oliver, and M. R. Strand, Culturefacilitated comparative genomics of the facultative symbiont Hamiltonella defensa, Genome Biol Evol, vol.10, issue.3, pp.786-802, 2018.

M. Citron and H. Schuster, The c4 repressors of bacteriophages P1 and P7 are antisense RNAs, Cell, vol.62, issue.3, pp.591-598, 1990.

D. Darriba, ModelTest-NG: a new and scalable tool for the selection of DNA and protein evolutionary models, Mol Biol Evol, vol.37, issue.1, pp.291-294, 2020.

P. H. Degnan and N. A. Moran, Evolutionary genetics of a defensive facultative symbiont of insects: exchange of toxin-encoding bacteriophage, Mol Ecol, vol.17, issue.3, pp.916-929, 2007.

P. H. Degnan and N. A. Moran, Diverse phage-encoded toxins in a protective insect endosymbiont, Appl Environ Microbiol, vol.74, issue.21, pp.6782-6791, 2008.

A. B. Dennis, V. Patel, K. M. Oliver, and C. Vorburger, Parasitoid gene expression changes after adaptation to symbiont-protected hosts, Evolution, vol.71, issue.11, pp.2599-2617, 2017.

M. B. Dion, F. Oechslin, and S. Moineau, Phage diversity, genomics and phylogeny, Nat Rev Microbiol, vol.18, issue.3, pp.125-138, 2020.

M. R. Doremus and K. M. Oliver, Aphid heritable symbiont exploits defensive mutualism, Appl Environ Microbiol, vol.83, issue.8, pp.3276-3292, 2017.

M. R. Doremus, Breakdown of a defensive symbiosis, but not endogenous defences, at elevated temperatures, Mol Ecol, vol.27, issue.8, pp.2138-2151, 2018.

O. Duron, Arsenophonus insect symbionts are commonly infected with APSE, a bacteriophage involved in protective symbiosis, FEMS Microbiol Ecol, vol.90, issue.1, pp.184-194, 2014.

R. C. Edgar, MUSCLE: multiple sequence alignment with high accuracy and high throughput, Nucleic Acids Res, vol.32, issue.5, pp.1792-1797, 2004.

M. Gouy, S. Guindon, and O. Gascuel, SeaView Version 4: a multiplatform graphical user interface for sequence alignment and phylogenetic tree building, Mol Biol Evol, vol.27, issue.2, pp.221-224, 2010.
URL : https://hal.archives-ouvertes.fr/lirmm-00511794

J. Guo, Nine facultative endosymbionts in aphids. A review, J Asia-Pac Entomol, vol.20, issue.3, pp.794-801, 2017.

A. K. Hansen, G. Jeong, T. D. Paine, and R. Stouthamer, Frequency of secondary symbiont infection in an invasive psyllid relates to parasitism pressure on a geographic scale in California, Appl Environ Microbiol, vol.73, issue.23, pp.7531-7535, 2007.

S. Haynes, Diversity of bacteria associated with natural aphid populations, Appl Environ Microbiol, vol.69, issue.12, pp.7216-7223, 2003.

K. R. Hopper, The defensive aphid symbiont Hamiltonella defensa affects host quality differently for Aphelinus glycinis versus Aphelinus atriplicis, Biol Control, vol.116, pp.3-9, 2018.

P. Jones, InterProScan 5: genome-scale protein function classification, Bioinformatics, vol.30, issue.9, pp.1236-1240, 2014.

E. Jousselin, Assessment of a 16S rRNA amplicon Illumina sequencing procedure for studying the microbiome of a symbiontrich aphid genus, Mol Ecol Resour, vol.16, issue.3, pp.628-640, 2016.
URL : https://hal.archives-ouvertes.fr/hal-01449134

L. Kall, A. Krogh, and E. Sonnhammer, An HMM posterior decoder for sequence feature prediction that includes homology information, Bioinformatics, vol.21, issue.1, pp.251-257, 2005.

I. Kalvari and J. Argasinska, Rfam 13.0: shifting to a genome-centric resource for non-coding RNA families, Nucleic Acids Res, vol.46, issue.D1, pp.335-342, 2018.

I. Kalvari and E. P. Nawrocki, Non-coding RNA analysis using the Rfam database, Curr Protoc Bioinf, vol.62, issue.1, p.51, 2018.

K. Katoh and D. M. Standley, MAFFT multiple sequence alignment software version 7: improvements in performance and usability, Mol Biol Evol, vol.30, issue.4, pp.772-780, 2013.

R. Lanfear, P. B. Frandsen, A. M. Wright, T. Senfeld, and B. Calcott, PartitionFinder 2: new methods for selecting partitioned models of evolution for molecular and morphological phylogenetic analyses, Mol Biol Evol, vol.34, issue.3, pp.772-773, 2017.

P. A. Lenhart and J. A. White, A defensive endosymbiont fails to protect aphids against the parasitoid community present in the field, Ecol Entomol, vol.42, issue.5, pp.680-684, 2017.

D. J. Leybourne, J. Bos, T. A. Valentine, and A. J. Karley, The price of protection: a defensive endosymbiont impairs nymph growth in the bird cherryoat aphid, Rhopalosiphum padi, Insect Sci, vol.27, issue.1, pp.69-85, 2020.

L. Li, OrthoMCL: identification of ortholog groups for eukaryotic genomes, Genome Res, vol.13, issue.9, pp.2178-2189, 2003.

P. ?ukasik, Horizontal transfer of facultative endosymbionts is limited by host relatedness, Evolution, vol.69, issue.10, pp.2757-2766, 2015.

A. Manzano-mar-in, A freeloader? The highly eroded yet large genome of the Serratia symbiotica symbiont of Cinara strobi, Genome Biol Evol, vol.10, issue.9, pp.2178-2189, 2018.

A. Manzano-mar-in, Serial horizontal transfer of vitaminbiosynthetic genes enables the establishment of new nutritional symbionts in aphids' di-symbiotic systems, ISME J, vol.14, issue.1, pp.259-273, 2020.

A. J. Martinez, S. R. Weldon, and K. M. Oliver, Effects of parasitism on aphid nutritional and protective symbioses, Mol Ecol, vol.23, issue.6, pp.1594-1607, 2014.

S. Masui, S. Kamoda, T. Sasaki, and H. Ishikawa, Distribution and evolution of bacteriophage WO in Wolbachia, the endosymbiont causing sexual alterations in arthropods, J Mol Evol, vol.51, issue.5, pp.491-497, 2000.

A. S. Meseguer, Buchnera has changed flatmate but the repeated replacement of co-obligate symbionts is not associated with the ecological expansions of their aphid hosts, Mol Ecol, vol.26, issue.8, pp.2363-2378, 2017.
URL : https://hal.archives-ouvertes.fr/hal-02623952

I. Milne, Using Tablet for visual exploration of secondgeneration sequencing data, Briefings Bioinf, vol.14, issue.2, pp.193-202, 2013.

A. L. Mitchell, InterPro in 2019: improving coverage, classification and access to protein sequence annotations, Nucleic Acids Res, vol.47, issue.D1, pp.351-360, 2019.

N. A. Moran, P. H. Degnan, S. R. Santos, H. E. Dunbar, and H. Ochman, The players in a mutualistic symbiosis: insects, bacteria, viruses, and virulence genes, Proc Natl Acad Sci U S A, vol.102, issue.47, pp.16919-16926, 2005.

E. P. Nawrocki and S. R. Eddy, Infernal 1.1: 100-fold faster RNA homology searches, Bioinformatics, vol.29, issue.22, pp.2933-2935, 2013.

. Nov-akov-a-e, V. Hyp-sa, and N. A. Moran, Arsenophonus, an emerging clade of intracellular symbionts with a broad host distribution, BMC Microbiol, vol.9, issue.1, p.143, 2009.

K. Okonechnikov, O. Golosova, and M. Fursov, Unipro UGENE: a unified bioinformatics toolkit, Bioinformatics, vol.28, issue.8, pp.1166-1167, 2012.

K. M. Oliver, J. Campos, N. A. Moran, and M. S. Hunter, Population dynamics of defensive symbionts in aphids, Proc R Soc B Biol Sci, vol.275, pp.293-299, 1632.

K. M. Oliver, P. H. Degnan, G. R. Burke, and N. A. Moran, Facultative symbionts in aphids and the horizontal transfer of ecologically important traits, Annu Rev Entomol, vol.55, issue.1, pp.247-266, 2010.

K. M. Oliver, P. H. Degnan, M. S. Hunter, and N. A. Moran, Bacteriophages encode factors required for protection in a symbiotic mutualism, Science, vol.325, issue.5943, pp.992-994, 2009.

K. M. Oliver and C. H. Higashi, Variations on a protective theme: Hamiltonella defensa infections in aphids variably impact parasitoid success, Curr Opin Insect Sci, vol.32, pp.1-7, 2019.

G. Padalon-brauch, Small RNAs encoded within genetic islands of Salmonella typhimurium show host-induced expression and role in virulence, Nucleic Acids Res, vol.36, issue.6, pp.1913-1927, 2008.

V. Patel, Cultivation-assisted genome of Candidatus Fukatsuia symbiotica; the enigmatic 'X-type' symbiont of aphids, Genome Biol Evol, vol.11, issue.12, pp.3510-3522, 2019.
URL : https://hal.archives-ouvertes.fr/hal-02623378

S. Polin, L. Gallic, J. F. Simon, J. C. Tsuchida, T. Outreman et al., Conditional reduction of predation risk associated with a facultative symbiont in an insect, PLoS One, vol.10, issue.11, p.143728, 2015.
URL : https://hal.archives-ouvertes.fr/hal-01276733

R. Raychoudhury and J. H. Werren, Host genotype changes bidirectional to unidirectional cytoplasmic incompatibility in Nasonia longicornis, Heredity, vol.108, issue.2, pp.105-114, 2012.

P. Rice, I. Longden, and A. Bleasby, EMBOSS: the European molecular biology open software suite, Trends Genet, vol.16, issue.6, pp.276-277, 2000.

F. Ronquist, MrBayes 3.2: efficient Bayesian phylogenetic inference and model choice across a large model space, Syst Biol, vol.61, issue.3, pp.539-542, 2012.

J. A. Russell, Uncovering symbiont-driven genetic diversity across North American pea aphids, Mol Ecol, vol.22, issue.7, pp.2045-2059, 2013.

J. P. Sandströ-m, J. A. Russell, J. P. White, and N. A. Moran, Independent origins and horizontal transfer of bacterial symbionts of aphids, Mol Ecol, vol.10, issue.1, pp.217-228, 2001.

T. Sasaki, N. Massaki, and T. Kubo, Wolbachia variant that induces two distinct reproductive phenotypes in different hosts, Heredity, vol.95, issue.5, pp.389-393, 2005.

R. Schmieder and R. Edwards, Quality control and preprocessing of metagenomic datasets, Bioinformatics, vol.27, issue.6, pp.863-864, 2011.

T. Seemann, Prokka: rapid prokaryotic genome annotation, Bioinformatics, vol.30, issue.14, pp.2068-2069, 2014.

G. Talavera and J. Castresana, Improvement of phylogenies after removing divergent and ambiguously aligned blocks from protein sequence alignments, Syst Biol, vol.56, issue.4, pp.564-577, 2007.

M. Touchon, J. A. Moura-de-sousa, and E. P. Rocha, Embracing the enemy: the diversification of microbial gene repertoires by phage-mediated horizontal gene transfer, Curr Opin Microbiol, vol.38, pp.66-73, 2017.

T. Tsuchida, R. Koga, H. Shibao, T. Matsumoto, and T. Fukatsu, Diversity and geographic distribution of secondary endosymbiotic bacteria in natural populations of the pea aphid, Acyrthosiphon pisum, Mol Ecol, vol.11, issue.10, pp.2123-2135, 2002.

F. Van-der-wilk, A. M. Dullemans, M. Verbeek, and J. F. Van-den-heuvel, Isolation and characterization of APSE-1, a bacteriophage infecting the secondary endosymbiont of Acyrthosiphon pisum, Virology, vol.262, issue.1, pp.104-113, 1999.

S. R. Weldon, M. R. Strand, and K. M. Oliver, Phage loss and the breakdown of a defensive symbiosis in aphids, Proc R Soc B Biol Sci, vol.280, p.20122103, 1751.

P. Worning, L. J. Jensen, P. F. Hallin, H. H. Staerfeldt, and D. W. Ussery, Origin of replication in circular prokaryotic chromosomes, Environ Microbiol, vol.8, issue.2, pp.353-361, 2006.

E. A. Zemskov, W. Kang, and S. Maeda, Evidence for nucleic acid binding ability and nucleosome association of Bombyx mori nucleopolyhedrovirus BRO proteins, J Virol, vol.74, issue.15, pp.6784-6789, 2000.

Y. Zhou, Y. Liang, K. H. Lynch, J. J. Dennis, and D. S. Wishart, PHAST: a fast phage search tool, Nucleic Acids Res, vol.39, pp.347-352, 2011.