Few viruses can boast of being the inspiration for hit dance tunes. But then ebola – which can kill up to 90% of victims, has no vaccine or cure, and causes horrific internal and external bleeding – is not your average pathogen. When an epidemic struck west Africa's music-crazy nations of Guinea and Liberia, it spawned mass panic – and the outbreak of a new dance accompanied to a infectious rap song.

"Ebola, Ebola in town. Don't touch your friend! No kissing, no eating something. It's dangerous!" warns the chorus of Ebola in Town, looped over a catchy, trippy electro-dance beat. At one point, the rapper describes an attempt to escape ebola by fleeing to neighbouring Guinea only to discover, in lyrics that suggest a stalking ex-lover, the disease lurking there too. Clubbers bitten by the musical bug have come up with a "no touching" jig in roadside bars of the capital, Monrovia.

"With such a high illiteracy rate, and such important messages to get across, sometimes a catchy or humorous song is the best way. I still remember ones that were made when I was a child in school here in Liberia," said bank manager Ethel Knuckles, in her 30s.

Such musical comic relief follows in the tradition of others such as Ivory Coast's Crazy Chicken dance, inspired by the bird flu virus. Aside from comic relief, in a region with weak public health systems, the ebola song also communicates vital information needed to curb the virus, which is spread through contact with fluids of infected people or animals, like urine, blood and saliva. This week, Sierra Leone confirmed four people had died in a district that borders southern Guinea, where the outbreak began.

Health workers have raced to contain ebola's transmission. When it appeared for the first time in Guinea this March – from where it later jumped to Liberia – popular text messages claimed an antidote could be found in of a concoction of hot chocolate, coffee, milk, sugar and raw onions. In Liberia, many initially dismissed ebola as a way for health officials to rake in money. Few took official advice to abstain from sex – coyly referred to as "no eating something" in the song – seriously.

Hosted by fruit bats, a local delicacy, the "molecular shark" has so far killed 145 people, around two thirds in Guinea.

"Timing and appropriate healthcare are crucial to whether ebola spreads, and whether victims survive. It needs to be taken very seriously but there's a tendency for people to develop a kind of paranoid psychosis about ebola," said Sakouba Keita of Guinea's health ministry.

For those who do beat the odds, Ebola in Town's call for "no touching" pre-empts the stigma that often awaits. Health workers say the terrified reactions towards survivors recalls the early days of the HIV epidemic, and can even affect relatives.

In Bakary's case, he went to the mosque to offer a thanksgiving prayer when his brother-in-law survived. "I was instantly left standing alone in the mosque. In broad daylight, people were treating me like a leper," the civil servant said by phone from Guinea's capital of Conakry. "My boss put me on forced sick leave and I haven't been called back yet." The family's children were pulled out of their private school after other parents told their classmates to avoid them.

An added complication is that medics on the frontline often face the greatest prejudice.

"You have to be scared of anyone who goes around dressed up like a cosmonaut," said Fanta Mamadou, a market trader in Nzérékoré, Guinea's second city, where residents initially refused to open their doors to health workers dressed head-to-toe biohazard suits. Communities with little knowledge of the virus also attacked a treatment clinic at the epicentre of the epidemic, fearing relatives could catch the bug while being held in precautionary quarantine.

"Stigmatisation has now become the main challenge we are dealing with," said Marc Poncin, emergency co-ordinator of Doctors Without Borders, whose suspected or confirmed cases have dwindled to seven in Guinea. An epidemic is officially over once 42 days have passed with no new cases.

Medical workers make a point of accompanying recovered patients on their return home. "We always hug the patient in front of the family to show it is possible to live normally with a cured person," Poncin said.

For some survivors, being stigmatised is the least of their worries. "It feels miraculous to be given a second chance," said a former patient who gave only her first name, Rose. "The first thing on my mind when I got home was to hold my children, then give the house a good spring clean."