Metagenomic assembly deciphered the type-dependent effects of surfactants on the fates of antibiotics resistance genes during sludge fermentation and the underlying mechanisms.