wasimaftab / LIMMA-pipeline-proteomics

LIMMA (an empirical Bayes method) pipeline for two group comparison in a proteomic experiment
MIT License
25 stars 11 forks source link

sigma_cutoff seems to cancel out #5

Closed hannesbecher closed 2 months ago

hannesbecher commented 1 year ago

Hi there, very nice and useful repo!

I am wondering about the way sigma is computed for the data imputation (lines 176-178 in limma_main.R):

width <- sigma_cutoff * sigma
new_width <- width * new_width_cutoff
new_sigma <- new_width / sigma_cutoff

The thing is, sigma_cutoff seems to cancel out here. And new_sigma is exactly sigma * new_width_cutoff. Is that intended?

Many thanks, Hannes

wasimaftab commented 2 months ago

Hi Hannes,

Thank you for trying the repo! Apologies for the delayed response.

Yes, you are correct. The sigma_cutoff does cancel out, resulting in new_sigma being exactly sigma * new_width_cutoff. This was intentional. I wrote it in a verbose manner for future reference.

The goal is to create a smaller normal distribution with reduced width and standard deviation, positioned towards the left tail of the original distribution. In proteomics experiments, it is commonly assumed that low expression proteins result in missing values. Therefore, a Gaussian distribution with a median shifted towards lower expression values should effectively impute these missing values.

Best regards, Wasim