[BioC] edgeR : How to associated trait with DE?
Gordon K Smyth
smyth at wehi.EDU.AU
Thu Sep 15 07:22:48 CEST 2011
Dear Sermsawat,
NAs are not permitted in design matrices in edgeR. If you have NAs, you
have to remove these libraries explicitly:
i <- !is.na(Growth64)
disph64 <- estimateGLMCommonDisp(d[,i], design[i,])
Best wishes
Gordon
On Wed, 14 Sep 2011, Sermsawat Tunlaya-anukit wrote:
> Thank you for your recommend. I also have some trait which has missing
> data (NA). Do edgeR estimateGLMcommonDisp has any option that skip this
> missing data? I try na.rm=TRUE but it isn't help.
>
>
>> design <- model.matrix(~group,data=d$samples)
>> designh64 <- cbind(design,Growth64)
>> designh64
> (Intercept) group2 group3 group4 Growth64
> Rwt_2 1 0 0 0 48
> Rwt_3 1 0 0 0 NA
> Rwt_4 1 0 0 0 NA
> RL4_3_1 1 1 0 0 32
> RL4_4_2 1 1 0 0 15
> RL4_5_1 1 1 0 0 22
> RL4_6_2 1 1 0 0 25
> RL7_1_2 1 0 1 0 15
> RL7_2_3 1 0 1 0 10
> RL7_3_1 1 0 1 0 12
> RL8_3_1 1 0 0 1 12
> RL8_3_2 1 0 0 1 12
>> disph64<-estimateGLMCommonDisp(d,designh64)
> Error in qr.default(X) : NA/NaN/Inf in foreign function call (arg 1)
>>
>> disph64<-estimateGLMCommonDisp(d,designh64, na.rm=TRUE)
> Error in dispCoxReid(y, design, offset = offset, ...) :
> unused argument(s) (na.rm = TRUE)
>
> Sermsawat Tun.
>
>
> On Sep 14, 2011, at 7:01 PM, Gordon K Smyth wrote:
>
>> Dear Sermsawat,
>>
>> In edgeR, you can simply add a quantitative column to the design matrix, then use glmFit() and glmLRT() to test for the significance of the coefficient for that column.
>>
>> I do not recommend that you do the calculations using the pseudo counts.
>>
>> Best wishes
>> Gordon
>>
>>> Date: Tue, 13 Sep 2011 23:01:29 -0400
>>> From: Sermsawat Tunlaya-anukit <stunlay at ncsu.edu>
>>> To: bioconductor at r-project.org
>>> Subject: [BioC] edgeR : How to associated trait with DE?
>>>
>>> Can i associated trait into edgeR result? I have quantitative traits such as height in each library that would like to find gene that co-regulate or co-expression with that trait. How can i apply this into edgeR? Can i use $psedo.alt to calculate correlation with my trait? Or i should GLM to calculate DE that associated with trait? I am not sure how to apply my trait into design or another vector and calculate estimateGLMCommonDisp.
>>>
>>> Thank in advance,
>>> Sermsawat Tunlaya-anukit
>>
>> ______________________________________________________________________
>> The information in this email is confidential and intended solely for the addressee.
>> You must not disclose, forward, print or use it without the permission of the sender.
>> ______________________________________________________________________
>
>
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
More information about the Bioconductor
mailing list