Microarray time series experiment
1
0
Entering edit mode
Natasha ▴ 440
@natasha-4640
Last seen 10.2 years ago
Dear List, I have an experiment with 3 WT (GBT) and 3 KO (GAT) mice, each with 4 time points: 0h,2h,8h,24h. The PI is interested in the overall effect of KO vs WT (at each time point and overall effect too). From the PCA plot I could see that time has a large effect compared to the groups. I thus generated differential expression analysis in the following manner: ------ >s.info Sample_Group Group Time GT MousePair Chip Rep 1 GAT0h KO 0 KO_0h 1 1 1 8 GAT0h KO 0 KO_0h 4 2 2 13 GAT0h KO 0 KO_0h 5 3 3 3 GAT2h KO 2 KO_2h 1 1 1 10 GAT2h KO 2 KO_2h 4 2 2 19 GAT2h KO 2 KO_2h 5 4 3 5 GAT8h KO 8 KO_8h 1 1 1 16 GAT8h KO 8 KO_8h 4 3 2 21 GAT8h KO 8 KO_8h 5 4 3 11 GAT24h KO 24 KO_24h 1 2 1 18 GAT24h KO 24 KO_24h 4 3 2 23 GAT24h KO 24 KO_24h 5 4 3 2 GBT0h WT 0 WT_0h 2 1 1 7 GBT0h WT 0 WT_0h 3 2 2 14 GBT0h WT 0 WT_0h 6 3 3 4 GBT2h WT 2 WT_2h 2 1 1 9 GBT2h WT 2 WT_2h 3 2 2 20 GBT2h WT 2 WT_2h 6 4 3 6 GBT8h WT 8 WT_8h 2 1 1 15 GBT8h WT 8 WT_8h 3 3 2 22 GBT8h WT 8 WT_8h 6 4 3 12 GBT24h WT 24 WT_24h 2 2 1 17 GBT24h WT 24 WT_24h 3 3 2 24 GBT24h WT 24 WT_24h 6 4 3 >group = s.info$GT >design = model.matrix(~0+group) >colnames(design) = gsub("group", "", colnames(design)) >fit <- lmFit(sig.norm, design) >contrasts.KW <- makeContrasts(KW.T0 = KO_0h-WT_0h, KW.T2 = KO_2h-WT_2h, KW.T8 = KO_8h-WT_8h, KW.T24 = KO_24h-WT_24h, IntT2vsT0=(KO_2h-KO_0h)-(WT_2h-WT_0h), IntT8vsT2=(KO_8h-KO_2h)-(WT_8h-WT_2h), IntT24vsT8=(KO_24h-KO_8h)-(WT_24h- WT_8h), levels=design) >fit2 <- contrasts.fit(fit, contrasts.KW) >fit2 <- eBayes(fit2) >colnames(fit2$coefficients)#[1] "KW.T0" "KW.T2" "KW.T8" "KW.T24" "IntT2vsT0"#[6] "IntT8vsT2" "IntT24vsT8" >KW_0h <- topTable(fit2, coef="KW.T0", sort.by="P", adjust='fdr', number=nrow(sig.norm)) >KW_2h <- topTable(fit2, coef="KW.T2", sort.by="P", adjust='fdr', number=nrow(sig.norm)) >KW_8h <- topTable(fit2, coef="KW.T8", sort.by="P", adjust='fdr', number=nrow(sig.norm)) >KW_24h <- topTable(fit2, coef="KW.T24", sort.by="P", adjust='fdr', number=nrow(sig.norm)) >KW.f <- topTableF(fit2, adjust="fdr", number=nrow(sig.norm)) >results <- decideTests(fit2, method="nestedF") # adjust F-test p-values >summary(results) # KW.T0 KW.T2 KW.T8 KW.T24 IntT2vsT0 IntT8vsT2 IntT24vsT8 #-1 4 4 4 5 0 0 0 #0 22564 22564 22564 22563 22568 22568 22568 #1 0 0 0 0 0 0 0 ------ However, I think that my F test above is possibly incorrect, because the design for that should have pair as an added covariate (The reason being from each mouse there are 4 time points, thus this would become a paired analysis). Therefore, with this is mind I then do the following: > pair = as.factors.info$MousePair) >design2 = model.matrix(~0+group+pair) >colnames(design2) = gsub("group", "", colnames(design2)) >fit.a <- lmFit(sig.norm, design2) #Coefficients not estimable: pair6 #Warning message: #Partial NA coefficients for 22568 probe(s) >contrasts.KW.b <- makeContrasts(IntT2vsT0=(KO_2h-KO_0h)-(WT_2h- WT_0h), IntT8vsT2=(KO_8h-KO_2h)-(WT_8h-WT_2h), IntT24vsT8=(KO_24h-KO_8h)-(WT_24h- WT_8h), levels=design2) >fit.b <- contrasts.fit(fit.a, contrasts.KW.b) >fit.b <- eBayes(fit.b) >colnames(fit.b$coefficients) #[1] "IntT2vsT0" "IntT8vsT2" "IntT24vsT8" >KW.f2 <- topTableF(fit.b, adjust="fdr", number=nrow(sig.norm)) #Error in topTableF(fit.b, adjust = "fdr", number = nrow(sig.norm)) : # F-statistics not available. Try topTable for individual coef instead. >results2 <- decideTests(fit.b, method="nestedF") #Warning message: #In is.na(object$F.p.value) : # is.na() applied to non-(list or vector) of type 'NULL' >summary(results2) #Warning message: #In is.na(object$F.p.value) : # is.na() applied to non-(list or vector) of type 'NULL' Now, I am confused as to which of the above is the right way to go about the analysis. Perhaps I have overlooked something basic and misunderstood. Any advice and suggestion would be much appreciated. Many Thanks, Natasha -- [[alternative HTML version deleted]]
• 1.2k views
ADD COMMENT
0
Entering edit mode
Remo Sanges ▴ 20
@remo-sanges-4822
Last seen 10.2 years ago
Dear BioConducters, I am experiencing errors from the biomaRt package when I try to get inter_paralog_ensembl_gene. The strange error I get is the following: Error in `[.data.frame`(result, , attributes) : undefined columns selected It happens when I use the ensembl mart asking for all the attributes involving xxxxx_inter_paralog_ensembl_gene even if they are correctly listed when I ask for listAttributes(). The behaviour is the same if I use the very last version biomart at ensembl setting host="ensembl.org". Am I doing something wrong? Here is a sample code of which the last line reproduces the error: library('biomaRt') db = 'hsapiens_gene_ensembl' mart = useMart('ensembl',dataset=db) hom = getBM(attributes=c('ensembl_gene_id','mmusculus_homolog_ensembl_gene') ,mart=mart) ipa = getBM(attributes=c('ensembl_gene_id','mmusculus_inter_paralog_ensembl_ gene'),mart=mart) Here are my session info: R version 3.0.0 (2013-04-03) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] biomaRt_2.16.0 loaded via a namespace (and not attached): [1] RCurl_1.95-4.1 tools_3.0.0 XML_3.95-0.2 Many Thanks Kind Regards ERemo -- Remo Sanges - Ph.D. Bioinformatics - Animal Physiology and Evolution Stazione Zoologica Anton Dohrn Villa Comunale, 80121 Napoli - Italy +39 081 5833428
ADD COMMENT
0
Entering edit mode
Hi Remo, This is related to the previously reported errors, resulting in Error in `[.data.frame`(result, , attributes) : undefined columns selected I've fixed this in biomaRt 2.17.1 which should become available for download soon. For you current biomaRt version to work, just set bmHeader=FALSE in your getBM query and things should work: ipa = getBM(attributes=c('ensembl_gene_id','mmusculus_inter_paralog_ensembl_ gene'),mart=mart,bmHeader=FALSE) Cheers, Steffen On Thu, May 23, 2013 at 1:32 PM, Remo Sanges <noncoding@gmail.com> wrote: > Dear BioConducters, > > I am experiencing errors from the biomaRt package when I try to get > inter_paralog_ensembl_gene. The strange error I get is the following: > > Error in `[.data.frame`(result, , attributes) : > undefined columns selected > > It happens when I use the ensembl mart asking for all the attributes > involving xxxxx_inter_paralog_ensembl_**gene even if they are correctly > listed when I ask for listAttributes(). The behaviour is the same if I use > the very last version biomart at ensembl setting host="ensembl.org". > > Am I doing something wrong? > > Here is a sample code of which the last line reproduces the error: > > library('biomaRt') > db = 'hsapiens_gene_ensembl' > mart = useMart('ensembl',dataset=db) > hom = getBM(attributes=c('ensembl_**gene_id','mmusculus_homolog_** > ensembl_gene'),mart=mart) > ipa = getBM(attributes=c('ensembl_**gene_id','mmusculus_inter_** > paralog_ensembl_gene'),mart=**mart) > > Here are my session info: > > R version 3.0.0 (2013-04-03) > Platform: x86_64-apple-darwin10.8.0 (64-bit) > > locale: > [1] en_US.UTF-8/en_US.UTF-8/en_US.**UTF-8/C/en_US.UTF-8/en_US.UTF-**8 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] biomaRt_2.16.0 > > loaded via a namespace (and not attached): > [1] RCurl_1.95-4.1 tools_3.0.0 XML_3.95-0.2 > > Many Thanks > > Kind Regards > > ERemo > > -- > Remo Sanges - Ph.D. > Bioinformatics - Animal Physiology and Evolution > Stazione Zoologica Anton Dohrn > Villa Comunale, 80121 Napoli - Italy > +39 081 5833428 > > ______________________________**_________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.et="" hz.ch="" mailman="" listinfo="" bioconductor=""> > Search the archives: http://news.gmane.org/gmane.** > science.biology.informatics.**conductor<http: news.gmane.org="" gmane.="" science.biology.informatics.conductor=""> > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 948 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