Normalizing columns in R according to a formula

折月煮酒 提交于 2021-02-11 03:21:18

问题


Let's say I have a data frame of 1000 rows and 3 columns (column t0, t4 and t8). Each column represents a time point (0 hours, 4 hours and 8 hours). The data is gene expression: numeric (float):

row.name                t0      t4      t8
ENSG00000000419.8       1780.00 1837.00 1011.00
ENSG00000000457.9       859.00  348.39  179.00
ENSG00000000460.12      1333.00 899.00  508.00

I need to normalize the data according to a known result. I know that the average half-life of all rows (genes) should be 10 hours. So I need to find the coefficients for t4 and t8 for which the average half life is 10 hours. The half-life for each row is calculated by the formula:

Half-life = 16 / (-2*log2(t4/t0)-log2(t8/t0))

You could say in principal the question is how to find coefficients for 2 of 3 columns given a known mean Y, a known formula and a known coefficient for the first column (1)? (I'm not a mathematician/statistician)

It's sort of a regression problem, no?

来源:https://stackoverflow.com/questions/34974196/normalizing-columns-in-r-according-to-a-formula

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!