Searching for electromagnetic counterparts of gravitational wave transients