Thiolated nucleic acids 1 or 2 are immobilized on Au-coated cantilevers and hybridized with the complementary nucleic acids 1a or 2a associated with magnetic particles. The duplexes 1/1a or 2/2a include specific sequences for the scission by Apa I or Mse I, respectively. The cantilevers positioned in a flow cell are subjected to an external magnetic field, leading to the deflection of the cantilevers. Upon the specific scission of the DNA duplexes by Apa I or Mse I, the magnetic particles are disconnected from the cantilevers leading to their retraction to the rest position. The deflection/retraction of the cantilevers are followed by a conventional atomic force microscope optical detection system.