It's inevitable that new parents will become obsessed with their baby's poo.
After all, there aren't many other ways a baby can communicate if they're getting enough milk or if things are going smoothly, other than screaming.
Led by researchers at the University of British Columbia and published in the journal Cell Reports Medicine, the study looked at the composition of a baby's meconium - their first poo, analysing sampled from 100 babies.
The meconium, which is often thick and a dark green, almost black colour usually happens within the first 24 hours after birth, and is comprised of everything ingested both in utero and on the way out, such as amniotic fluid, skin cells and molecules.
"Meconium is like a time capsule, revealing what the infant was exposed to before it was born. It contains all sorts of molecules encountered and accumulated from the mother while in the womb, and it then becomes the initial food source for the earliest gut microbes," said lead author, UCB's Dr Charisse Petersen
Researchers said that due to its unique makeup, the meconium could reveal a lot about what babies had ingested during development.
They found babies whose meconium had a less diverse number of molecules were at greater risk of developing allergies within the first 12 months. And were able to predict the babies who would go on to develop allergies with 76 per cent accuracy.
Fewer different types of molecules were also linked to changes in bacteria groups that contribute to the development of gut microbes, which can help fight disease.
"Our analysis revealed that newborns who developed allergic sensitisation by one year of age had significantly less 'rich' meconium at birth, compared to those who didn't develop allergic sensitisation," study co-author Dr Brett Finlay from UBC said.
Researchers said this showed that the development of a healthy immune system started before birth and that what babies are exposed to in the womb could play a 'fundamental role' in their future health.
The findings would also help in identifying at risk infants and in linking these babies with early interventions, in the hope it could avoid them developing associated complications, such as asthma.
"We know that children with allergies are at the highest risk of also developing asthma. Now we have an opportunity to identify at-risk infants who could benefit from early interventions before they even begin to show signs and symptoms of allergies or asthma later in life," said co-author Dr Stuart Turvey.