Optical and electrochemical detection of DNA