Many bacterial toxins are proteins and formaldehyde act as a permanent denaturating agent. The denaturated toxins have lost the toxicity but the property to stimulate the immunity remains.
To my knowledge, the main reaction occurs with the epsilon-amino group of lysines. Once modified cross-linking of one modified lysine to another lysine occurs (to form a so-called methylene bridge). I believe additional reactions can also take place but less efficiently and more slowly. Because lysines account on average for about 5% of the total amino acids in proteins, most proteins are sensitive to formaldehyde. Once modified the protein are often altered in their functional properties, which could lead to inactivation of a toxin for instance.
I agree with comments reported by Dr Hudrisier. Formaldehyde is a very reactive substance and the epsilon-amino groups of lysines are favourite sites for reactions since they're less sterically hindered. But also other amino groups may react. All these reactions brings changes in the toxin structure, these changes are reflected in the loss of toxicity. However, most of the protein structure remains unaltered and this preserves its antigenic determinants, the portions of the protein structure that stimulate the production of antibodies.
But the composition of amino acids in the toxins changes from toxins to toxins(lysins cannot be universal moiety for all sort of proteins right??), is it reaction is same for all sort of toxins... how about endo toxins reacting with formaldehyde?? can it happen??am not sure.
Lysines account for a significant percentage of total amino acids in proteins. Therefore the chance to get an accessible lysine in a given protein is very strong. But you're right: I'm sure one can find proteins where there is no lysin or no accessible lysin. But in this case, dont' forget, as pointed out by Alessandro and myself, that additionnal amino acids are affected by formalehyde treatment. I have no examples of formaldehyde-resistant protein to provide!
As far i know, formaldehyde interacts not only with lysine but also with N-terminal amino acid residue and the side-chains of arginine, cysteine, histidine. During these interaction methylol groups, Schiff-bases, and methylene bridges are formed. It causes the conformational change in toxin structure which causes the conversion of toxin to toxoid. I think The two following links might help you. Have a nice day......
look up the mannich reaction, its one of the most notable formaldehyde reactions and is well documented due to its use in pharmaceutical industry. When it comes to proteins just because theres a amine does not mean it will react, if you plot out your side chain pKa's aswell as the localised pKa (average of the neighbouring 3 residues in each direction of the peptide chain) you may well find the Keq is not as favourable for the reaction due to electron densities in given regions.I tend to use protein modelling software to show electrostatic potentials when trying to predict how and where reactions occur. Its important to remember that the initial reaction is an acid base condensation reaction then the following reaction tends to be more aggressive due to carbon free radical/ weird enol formation stabilizing to whatevers nearby and available depending on electron densities.