I am in a very biological sciences heavy laboratory where every one has a basic background in the biological sciences and that's pretty much it. I was recently hired as a research employee (non grad student) in this laboratory originally as a biological sciences research assistant. Upon finding out I have a graduate degree in statistics (it was on my CV so I don't know why they were surprised), my PI has considered using me as a hybrid researcher/data analytics person to streamline some past data and make it more quantitative in nature. Some of my data analysis is very niche, and pseudo-original because of the context of the problem that we're working out. There is no backup person capable of doing any data analysis. Is there any way I could use my role as leverage and formally request authorship from my PI (in a polite way of course)?
I have future goals in mind, professionally speaking, and those goals would be much more facile in approach if I could get my name on a paper.
With that description, especially if you write up the technique used for the paper and any conclusions drawn, you should be a coauthor. Anything else is ethically suspect in my mind. You should talk about authorship with the primary author, the lab director, or the PI about this now rather than waiting for the analysis to start or the paper to start coming together. There's no better way for resentment to start than to wait for the thing to be nearly done for you to start the conversation about authorship.