Determining who should be an author on a scientific paper, especially as publications are vital to many people's careers, can be a tricky business, but some organizations and journals offer guidelines. For example, the Journal of the American Medical Association follows the guidelines put forth by the International Committee of Medical Journal Editors, saying that authors must have made substantial contributions to the design or concept of the work, must have helped in writing or revising the paper, and must have given their final approval of the article.
As Bitesize Bio's Kirsten Hogg notes, many people could have played a "peripheral, but still vital" role, such as the investigator who received the funding or the team that recruited human participants for the study. Following the ICMJE guidelines, Hoggs says, only those who had "quite a direct role in the work should make the author list, which makes sense. Everyone else should be bumped to [the acknowledgements sections]." She runs through some scenarios in which authorship issues may be unclear.
"Ideally, the earlier authorship discussions and decisions take place, the better. This will ensure that the highest professional standards are maintained." she adds.