Organic carbon quantity and quality jointly triggered the switch between dissimilatory nitrate reduction to ammonium (DNRA) and denitrification in biofilters.