edgeR : How to associated trait with DE?
2
0
Entering edit mode
@sermsawat-tunlaya-anukit-4848
Last seen 10.2 years ago
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
edgeR edgeR • 1.8k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia
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 intend...{{dropped:4}}
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia
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}}
ADD COMMENT
0
Entering edit mode
Thank you very much for code example. some traits i measure and has technical replicate can i assign those data into design metrics or i just use mean. Best regards, Sermsawat T. On Sep 15, 2011, at 1:22 AM, Gordon K Smyth wrote: > 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 inte...{{dropped:6}}
ADD REPLY
0
Entering edit mode
Dear Sermsawat, Technical replicates should be aggregated by summing, not by taking the mean. Best wishes Gordon --------------------------------------------- Professor Gordon K Smyth, Bioinformatics Division, Walter and Eliza Hall Institute of Medical Research, 1G Royal Parade, Parkville, Vic 3052, Australia. Tel: (03) 9345 2326, Fax (03) 9347 0852, smyth at wehi.edu.au http://www.wehi.edu.au http://www.statsci.org/smyth On Wed, 21 Sep 2011, Sermsawat Tunlaya-anukit wrote: > Thank you very much for code example. some traits i measure and has > technical replicate can i assign those data into design metrics or i > just use mean. > > Best regards, > Sermsawat T. > On Sep 15, 2011, at 1:22 AM, Gordon K Smyth wrote: > >> 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 intend...{{dropped:4}}
ADD REPLY
0
Entering edit mode
I would like to make sure about interpretation of GLM associated with trait in edgeR. From my design matrix with associate with trait that i interest. GLM will answer question that which gene is associated with my trait under condition 3 factor that i put into design matrix. What is model equation for GLM? I am not sure that my equation is Trait = intercept(wt)+factor of transgenic gene 1 +facotr of transgenic gene 2 + factor of transgenic gene 3. (My groups is transgenic that down regulate gene expression of 3 genes that correlated) Can i interpret from the result that genes which low FDR is correlate with trait? Do you recommend some example of paper for me to learn more about this? Best regards, Sermsawat T. On Sep 21, 2011, at 7:01 PM, Gordon K Smyth wrote: > Dear Sermsawat, > > Technical replicates should be aggregated by summing, not by taking the mean. > > Best wishes > Gordon > > --------------------------------------------- > Professor Gordon K Smyth, > Bioinformatics Division, > Walter and Eliza Hall Institute of Medical Research, > 1G Royal Parade, Parkville, Vic 3052, Australia. > Tel: (03) 9345 2326, Fax (03) 9347 0852, > smyth at wehi.edu.au > http://www.wehi.edu.au > http://www.statsci.org/smyth > > On Wed, 21 Sep 2011, Sermsawat Tunlaya-anukit wrote: > >> Thank you very much for code example. some traits i measure and has technical replicate can i assign those data into design metrics or i just use mean. >> >> Best regards, >> Sermsawat T. > >> On Sep 15, 2011, at 1:22 AM, Gordon K Smyth wrote: >> >>> 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 inte...{{dropped:6}}
ADD REPLY

Login before adding your answer.

Traffic: 650 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6