Ecology of nitrification and denitrification