**30**wrote:

I have a RNA time course experiment, 7 time points, 2 replicates per point. After analyzed with DESeq2 package, I want to subset my results in 4 categories

1. Those genes that are increasing expression lineally from time 0 to 7

2. Those genes that are decreasing expression lineally from time 0 to 7

3. Those genes that increase expression from 0 to 3/4 and then decrease

4. Those genes that decrease expression from 0 to 3/4 and then increase

So I fitted a quadratic regression model

results<-apply(expression.matrix,1,function(x) lm(y~as.numeric(x)+I(as.numeric(x)^2)))

where y is a vector comprising time from 1 to 7

Now I extract x and x2 from the results

expression.matrix$x2<-unlist(lapply(results, function(x) return(x$coef[3]))) expression.matrix$x<-unlist(lapply(results, function(x) return(x$coef[2])))

For class 1 ad 2 above, I know that with x >0 and x<0, I can get both, but for 3 and 4 , I don't know i have to take ( in case 3), x=0 and x2>0 and x=0 and x2<0 for 4. The problem is, that I don't have values of x of o, and even if got those ones closer to 0, the curve is not behaving as I expected

Any ideas?

Thanks in advance

I would suggest fuzzy clustering with the mfuzz package in R.

8.1k