Barely a week goes by without some dispiriting tale of racism seeping into the public consciousness: the endless stream of Ukip supporters expressing some ill-conceived and unimaginative hate; football hooligans pushing a black man from a train. I am partly of Indian descent, a bit swarthy, and my first experience of racism was more baffling than upsetting. In 1982, my dad, sister and I were at the Co-op in a small village in Suffolk where we lived, when some boys shouted “Coco and Leroy” at us. Fame was the big hit on telly at the time, and they were the lead characters. My sister and I thought this was excellent: both amazing dancers and supremely attractive: we did bad splits all the way home.

As someone who writes about evolution and genetics – both of which involve the study of inheritance, and both of which rely on making quantitative comparisons between living things – I often receive letters from people associating Darwin with racism, usually citing the use of the words “favoured races” in the lengthy subtitle to his masterpiece, On the Origin of Species. Of course, Darwin doesn’t discuss humans in that great book, and “races” was used to describe groups within non-human species. Contemporary use of language must be taken into account.

Darwin was not a racist. He did not, unlike many of his contemporaries, think human “races” might be separate creations. He was a staunch abolitionist, impressed and influenced by his friend and taxidermy tutor John Edmonstone at Edinburgh, who was a freed black slave. However, Darwin’s half-cousin Francis Galton, most certainly was a racist. He wrote that the Chinese were a race of geniuses, that “Negroes” were vastly inferior, that “Hindoos” were inferior in “strength and business habits” and that the “Arab is little more than an eater up of other men’s produce; he is a destroyer”.

Obviously, these views are as absurd as they are unacceptable today, as bewildering as calling two half-Indian kids the stage names of two African-American actors. Galton is a problem figure, simultaneously a great scientist and a horror. Among his myriad contributions to science, he invented statistical tools we still use today, and formalised biometrics on humans in new ways. He coined the phrase “nature versus nurture”, which has persistently blighted discussions of genetics, implying that these two factors are in conflict, when in fact they are in concert. It was Galton who gave us the word “eugenics”, too, an idea that didn’t carry the same poisonous stigma it does today. He was enthusiastic about improving the British “stock”, prompted by the paucity of healthy recruits for the Boer war.

Genetics has a blighted past with regards to race. Even today important figures express unsupportable racist views

Churchill desired the neutering of the ‘feeble-minded’. Photograph: Popperfoto/Getty

Many prominent figures were influenced by Galton: Marie Stopes argued forcefully for the compulsory “sterilisation of those unfit for parenthood”. Both Theodore Roosevelt and Churchill desired the neutering of the “feeble-minded”, as was the parlance in Edwardian days. At University College London, Galton founded the Eugenics Records Office, which became the Galton Laboratory for National Eugenics. By the time I studied there in the 1990s, it had long since dropped that toxic word to become the Galton Laboratory of the Department of Human Genetics.

Genetics has a blighted past with regards to race. Even today, important figures from its history – notably James Watson, co-discoverer of the double helix – express unsupportable racist views. The irony is that while Galton spawned a field with the intention of revealing essential racial differences between the peoples of the Earth, his legacy – human genetics – has shown he was wrong. Most modern geneticists are much less like Galton and more like Darwin. A dreadful book published last year by former New York Times science writer Nicholas Wade espoused views about racial differences seemingly backed by genetics. As with Watson, the reaction from geneticists was uniformly dismissive, that he had failed to understand the field, and misrepresented their work.

‘A horror’: Francis Galton. Photograph: Corbis

We now know that the way we talk about race has no scientific validity. There is no genetic basis that corresponds with any particular group of people, no essentialist DNA for black people or white people or anyone. This is not a hippy ideal, it’s a fact. There are genetic characteristics that associate with certain populations, but none of these is exclusive, nor correspond uniquely with any one group that might fit a racial epithet. Regional adaptations are real, but these tend to express difference within so-called races, not between them. Sickle-cell anaemia affects people of all skin colours because it has evolved where malaria is common. Tibetans are genetically adapted to high altitude, rendering Chinese residents of Beijing more similar to Europeans than their superficially similar neighbours. Tay-Sachs disease, once thought to be a “Jewish disease”, is as common in French Canadians and Cajuns. And so it goes on.

We harvest thousands of human genomes every week. Last month, the UK launched the 100,000 Genomes project to identify genetic bases for many diseases, but within that booty we will also find more of the secret history of our species, our DNA mixed and remixed through endless sex and continuous migration. We are too horny and mobile to have stuck to our own kind for very long.

Race doesn’t exist, racism does. But we can now confine it to opinions and not pretend that there might be any scientific validity in bigotry.

• This article was amended on 29 June 2015. An earlier version said Darwin did not think human races might be separate sub-species. In fact he did refer to human races as sub-species.