Ludwig van Beethoven is just as famous for his music — and his hair — in death as he was in life.
The 19th-century composer created masterpieces such as his 5th Symphony with its iconic first four notes, and Eroica, which is credited as his greatest piece.
But throughout his career Beethoven was dogged by a series of health conditions, leading what he called "a wretched existence".
Now, in an attempt to find a genetic root of what ailed him, an international team of scientists has sequenced Beethoven's DNA from a tuft of hair cut from his wild thatch on his deathbed.
"We have confidently mapped about two-thirds of his genome," said Tristan Begg, the study's lead author and a PhD student at the University of Cambridge.
Beethoven began to lose his hearing in his 20s and suffered from debilitating bouts of vomiting and diarrhoea that recurred throughout his life.
As time went on, he also experienced signs of liver disease leading up to his death at the age of 56 on March 26, 1827.
While the genome, published on Thursday in the journal Current Biology, can't tell us exactly what killed him, it reveals he had a genetic predisposition to liver disease and was infected by hepatitis B at some point in his life.
"We see a very significant risk factor for liver disease, particularly in interaction with other factors; alcoholism is a big one, hepatitis B as well," Mr Begg said.
How do we know it was Beethoven's hair?
Over the past 196 years, scientists have debated what could have caused the famous musician's poor health, with some earlier research based on hair analysis suggesting he may have had lead poisoning.
Beethoven gave locks of hair to friends while he was alive — a common practice in the 19th century — and several more were cut off when he died.
The team sourced eight locks held in collections around the world that had been attributed to him.
The first step was to work out which ones were authentic using DNA analysis of the hair, as well as DNA from living relatives, and historic records.
They were able to rule out three locks of hair, including one known as the Hillier lock. This sample, which had led to the earlier suggestion of lead poisoning, actually came from a woman.
The other five hair locks contained DNA that matched a male individual from 19th-century Europe.
The history of two of these locks, known as the Halm-Thayer and the Stumpff locks, had also been carefully documented and had unbroken lines of ownership.
How much does the genome tell us?
Mr Begg and his colleagues sequenced the Stumpff lock, which was the best-preserved of the five locks.
They then matched this DNA with data from a large genomic database to identify mutations that may explain Beethoven's ailments.
But the team was unable to find any genetic variations associated with early-onset hearing loss.
Beethoven did not have variants associated with lactose intolerance or coeliac disease, making it less likely he had these conditions.
They also found no genetic evidence of complex gastrointestinal conditions such as inflammatory bowel disease, Crohn's disease or ulcerative colitis.
"We can't place Beethoven with any kind of high risk for inflammatory bowel disease," Mr Begg said.
But the analysis did reveal Beethoven had a number of genetic variants associated with liver disease, with one in particular standing out.
Liver genes, alcohol and hepatitis B
The PNPLA3 genetic variant is involved with multiple stages of disease, said Devanshi Seth, who is head of the Alcoholic Liver Disease Research Program at the Centenary Institute at the University of Sydney.
"The risk increases by threefold in people who drink alcohol and have two other genetic variants," said Professor Seth, who was not involved in the study.
While Beethoven had the PNPLA3 variant which increased his risk, he did not have the two specific additional variants, so we do not know exactly how much his risk was increased by his drinking, she said.
There was also evidence of hepatitis B in Beethoven's DNA, although it is unclear when he fell ill from the infectious disease.
"When you drink more alcohol, the hepatitis B virus can progress to cirrhosis and maybe even cancer," Professor Seth said.
"Having one [risk factor] is bad enough, but having two diseases which are damaging the liver faster and further is not good."
In one of the conversation books Beethoven used to communicate with his friends after he became totally deaf, there is a reference to him drinking up to a litre of wine every lunch time.
Professor Seth said if that was true, he was consuming up to 10 Australian standard drinks in each sitting, and was likely dependent on alcohol.
Mr Begg said that reference in the conversation book may be scuttlebutt, but there was no doubt Beethoven drank at harmful levels by today's standards.
But, he said, whether Beethoven's drinking was due to psychological dependence or influenced by the society he mixed with and the poor quality of drinking water in 19th-century Vienna was up for debate
"Liver disease was actually surprisingly common back then," he said.
A 200-year-old cold case
Vanessa Hayes, head of the Ancestry and Health Genomics Laboratory at the University of Sydney, said the study read like a 200-year-old cold case.
"It's an exciting forensic story," said Professor Hayes, who was not involved in the research.
"We've come a long way since sequencing of the human genome, but this paper also highlights the limitations of where we're at."
Unlike mapping DNA from a person living today, the team was limited to what they could find by the condition of the hair sample.
"The amount of the genome that actually could be interrogated wasn't complete because of the deterioration," Professor Hayes said.
But even if they could have mapped the entire genome, many diseases are caused by multiple factors, and there are also many variants that are yet to be teased out even in massive population databases.
"Things like inflammatory bowel disease are very difficult to rule out with the information we have now," Professor Hayes said.
Likewise, there is only weak evidence of a variant associated with early-onset hearing loss in large genome-wide studies.
Genes reveal a family surprise
Genetic data from five men living in Belgium with the name "van Beethoven" shared on a commercial ancestry database, however, did reveal an intriguing family mystery.
Their DNA showed the men were related, and genealogical records showed they were part of Beethoven's family tree, but their Y chromosome did not match Beethoven's.
This suggests that somewhere along the line between 1572 and 1700, a male child, potentially Beethoven's father, had been born out of wedlock.
This is very common, Professor Hayes said.
"One of the biggest things that people who sign up for [ancestry testing] find out is their father's not their father, or something's not correct in the paternal line."
For his part, Beethoven was a stickler for the truth.
In 1802, he instructed his favourite physician to release details about his diseases after he died.
In the end, he outlived his favourite physician by 18 years.
But, on his deathbed, he reportedly told his biographers "whatever shall be said of me hereafter shall adhere strictly to the truth in every respect, regardless of who may be hurt, including myself".
"I hope he's happy with what we did," Mr Begg said.