OpenMS / pyopenms-docs

pyOpenMS readthedocs documentation, additional utilities, addons, scripts, and examples.
https://pyopenms.readthedocs.io
Other
42 stars 50 forks source link

Feature: Get variance from different experiements. #374

Closed PierreSnell closed 1 year ago

PierreSnell commented 1 year ago

I'm sorry if it's not the correct place to ask this question. I could open an issue on OpenMS or any slack/discord if you have one.

I would like to be able to analyse the variance across different experiments.

Let's say I'm using QC samples but would like to extract the machine noise from those identical samples. The goal would be to compare them and give an estimation of the variance for each "close enough" feature.

Result would be "Consensus Feature 1 / X variance", "Consensus Feature 2 / Y Variance" etc...

What should be happening Is there any example / code snippet or already made function for that (I guess it would be linked to the consensusFeatureMap, or spectraAlignment). I could do the code myself, but I feel that it would be an interesting feature to have in (py)OpenMS

System information:

Additional context I know it's not really a bug but I don't know another place to ask.

Thanks in advance for any help or advises
Have a great day.

jpfeuffer commented 1 year ago

Hi!

We have a Discord here: https://discord.gg/wcWETcAkvS but here is also fine.

I would say, use a FeatureFinder algorithm, then a MapAlignment algorithm, then a FeatureLinker algorithm to create a ConsensusMap. Then use ConsenusMap.toDataFrame() and then df[['yourquantcol1', 'yourquantcol2', ...]].var(axis=1)

jpfeuffer commented 1 year ago

I think for mzTab export we are already calculating the variance since it is mandated by the standard. But mzTab export is not yet wrapped in pyopenms.