To visualize these effects we first adjusted for variation due to rearing location (room), by calculating residuals from a quasibinomial general linear model of the focal Order’s read counts (out of the total reads per fish) regressed on rearing room. Here we plot the mean (and ±1 s.e. confidence intervals) for this residual abundance, for various groups of fish to illustrate infection and host effects. a Fusobacteriales exhibit a significant decrease in cestode-infected fish, both males (black) and females (gray). b Lactobacillales are more abundant in males (black) than in females (gray) regardless of infection status. c Clostridiales abundance is reduced in infected males, but not infected females (black = males, gray = females). d Rhodobacterales are more common in females for uninfected fish, but more common in males for infected fish (black = males, gray = females). e Caulobacterales are more abundant in F2 hybrids than in either backcross, regardless of infection status (black = uninfected, gray = infected). f Rhodobacterales are more abundant in fish with a greater fraction of Roberts lake ancestry, but only among uninfected fish; infection leads to a higher Rhodobacterales abundance that is similar across fish genotypes (black = uninfected, gray = infected). Supplementary Fig. 5 shows the same plots, but with all data points included to show the small effect size relative to high among-individual variation.