Cosmological constraints from galaxy clustering in the presence of massive neutrinos