DavideBrex / SpikeFlow

Pipeline to analyse ChIP-Rx data, i.e ChIP-Seq with reference exogenous genome spike-in normalization
MIT License
9 stars 0 forks source link

Wrong calculation of RX-Input normalization factor #19

Closed alessandro-vai closed 1 month ago

alessandro-vai commented 1 month ago

Ciao,

I was trying to manually calculating the 'RX-Input' normalization factors from the number of reads reported by SpikeFlow, and I was getting different values w.r.t the ones computed by SpikeFlow. I was looking at the code used to compute the scaling factor and I noticed a possible error, at this lines: https://github.com/DavideBrex/SpikeFlow/blob/7dd55487d490f4a49e077b175021dbaff9eb2118/workflow/scripts/computeNormFactors.py#L54-L56 gamma is computed by dividing the number of LowMapQReads (info_input[2]) and NSpikeReads (info_input[1]). Indeed, if I use those reads number, I get the same normalization factors as the ones reported by SpikeFlow.

Cheers, Alessandro

DavideBrex commented 1 month ago

Ciao Alessandro,

Thank you for testing SpikeFlow.

I checked the code, and you are right. It should be 1 instead of 2 and 0 instead of 1 in the indexes of info_input.

Thank you a lot for spotting this, I will fix it asap in the main branch and as a release.

Best, Davide