Hi All,
I learnt about how DESeq2 normalises the raw read counts in statquest. It was very helpful and I tried to repeat the steps for my sample data.
But I am getting the output with minor difference - like for each sample outpu I get some difference .
Example:
The above is the DESeq2 normalised count which I retrieved using count() in DESeq2 library.
When I manually calculate the normalization I get the following output :
So there is difference . I'm confused why i get this different values ?
Please help me to sort this out..
Many thanks in advance..
What is the code you're using to maually calculate the values?
For manual calculation I have not used code. I tried to do it following the steps:
Please check the steps:
step 1:take log of all values - ie.,read count Step 2: Average each row Step 3: filter zero and infinite values - not applicable for our data Step : 4 Subtract the averae log value from log(counts) Step5 : calculate median for each sample Step 6: convert medians to normal numbers to get the final scoring factors for each sample Step 7 : Divide original read counts by scaling factors:
This is the exact code you can use to double-check: https://github.com/mikelove/DESeq2/blob/master/R/core.R#L534-L577
Thank you for the code . I have exactly followed the same steps. But I get a different output when I calculate manually.
Do you take the natural log rather than log10 or log2?
I used log10 and checked output - it was different; log2 result is also different for deseq output..