One Direction star Harry Styles is the happiest celebrity on Twitter, new research has found.

The singer came out on top when scientists analysed the emotions expressed in the social media output of the 100 people with the most Twitter followers.

The team from analytic firm Adoreboard examined social media messages stretching back eight months, using special software to detect and interpret emotions in the text.

The study found that Styles' mood certainly hasn't dipped as a consequence of 1D's forthcoming parting of the ways next March.

Styles, 21, claimed top spot ahead of singer-songwriter Adele and the Indian film actor Aamir Khan.

The Adoreboard data scientists, who are based at Queen's University, Belfast, specialise in the development of software that can detect emotions vented online.

Using their analytics tools, they can identify emotional patterns in billions of tweets, such as joy, rage, anger, surprise, trust and annoyance.

The study also examined why certain celebrity tweets were either retweeted or favourited.

Chris Johnston, chief executive of Adoreboard, said the findings provided a "unique snapshot" of the range of different moods that celebrities feel. He said the data could have implications for the way brands and even politicians communicate on-line.

"Not only is Harry Styles one of the most popular celebs on Twitter with over 24 million followers but is also the most upbeat in terms of mood," said Mr Johnston.

"Styles has become a global brand and like any brand is conscious how he communicates online. The study provides a new dimension by looking at the impact of specific emotions that people communicate on platforms like Twitter.

"As part of the research we've identified that those celebrities that express strong emotions like joy or rage on Twitter are more likely to receive retweets or favourites. We found that the strength of each emotion expressed by a celebrity - known as their 'activation levels' - provides a good indicator as to how often they will be retweeted."

Football stars Cristiano Ronaldo (7) and Wayne Rooney (15), the X-Factor's Simon Cowell (18), the Dalai Lama (13) and India's Prime Minister Narendra Modi (14) are also among the top 20.

US singer Chris Brown was the least happy, according to the survey.

The research is part of a campaign by Adoreboard aimed at increasing people's awareness of how they communicate emotions in written text ranging from e-mails to press releases.

Gary McKeown, an expert in communication and emotions at the School of Psychology at Queen's, said: "Humans are constantly trying to align themselves to others they value in their social group and we pay particular interest to emotions and feelings of others. We are emotionally curious beings.

"This translates to online and broadcast worlds in which we pay attention to celebrities who are, in some ways, virtual social group members that we value. More intense emotions are likely to attract more attention and can prime action tendencies in an observer. In an online setting this would typically mean an increased likelihood of a retweet, a favourite or a like."

The Top 20 were: 1 - Harry Styles, singer.

2 - Adele, singer.

3 - Aamir Khan, Indian film actor.

4 - Ariana Grande, American singer and actress.

6 - Amitabh Bachchan, Indian film actor.

7 - Cristiano Ronaldo, footballer.

8 - Jimmy Fallon, American comedian.

9 - Shakira, singer and songwriter 10 - Emma Watson, actress.

11 - Oprah Winfrey, talk show host.

12 - Justin Beiber, singer and songwriter.

13 - Dalai Lama, spiritual leader.

14 - Narendra Modi, Prime Minister of India.

15 - Wayne Rooney, footballer.

16 - Ellen DeGeneres, American comedian and TV host.

17 - Jennifer Lopez, singer.

18 - Simon Cowell, TV talent judge and music producer.

19 - Britney Spears, singer.

20 - Hrithik Roshan, Indian film actor.