  We compute explicit transgression forms for the Euler and Pontrjagin classes
of a Riemannian manifold $M$ of dimension 4 under a conformal change of the
metric, or a change to a Riemannian connection with torsion. These formulae
describe the singular set of some connections with singularities on compact
manifolds as a residue formula in terms of a polynomial of invariants. We give
some applications for minimal submanifolds of Kaehler manifolds. We also
express the difference of the first Chern class of two almost complex
structures, and in particular an obstruction to the existence of a homotopy
between them, by a residue formula along the set of anti-complex points.
Finally, we take the first steps in the study of obstructions for two almost
quaternionic-Hermitian structures on a manifold of dimension 8 to have
homotopic fundamental forms or isomorphic twistor spaces.
