probeSetSummary and named vector
2
0
Entering edit mode
@ingrid-h-g-stensen-1971
Last seen 9.7 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20071126/ 1d89aece/attachment.pl
• 388 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States
Hi Ingrid, Ingrid H. G. ?stensen wrote: > Hi > > I have found GO categorys in a data set and want to see which genes are in the different terms that are listed. Previously I have done the following: > > annoPk <- "illuminaHumanv2" > entrezPk <- illuminaHumanv2ENTREZID > pVerdi_GO = 0.01 > > probe <- top2[,1] #top2 is a topTable object > > sigLL <- (unlist(mget(probe, env=entrezPk, ifnotfound=NA))) > sigLL <- sigLL[!is.na(sigLL)] > sigLL <- sigLL[!duplicated(sigLL)] > > univ <- unique(getLL(ls(entrezPk), annoPk)) > > > params <- new("GOHyperGParams", geneIds= sigLL, universeGeneIds=univ, annotation=annoPk, ontology="BP", pvalueCutoff= pVerdi_GO, conditional=TRUE, testDirection="over") > hgOver <- hyperGTest(params) > res_filNavn <- paste(i, "_GO_summary_BP_over.html", sep = "") > htmlReport(hgOver,file=res_filNavn) > ps <- probeSetSummary(hgOver) > res_filNavn_gener <- paste(i, "_GO_prober_BP_over.txt") > for(j in 1:length(ps)) > { > write.table(ps[j], file = res_filNavn_gener, append=TRUE, sep="") > } > > This has worked fine. But now I am reading the topTable result as an .txt file (topTable files made previously and stored as a .txt file). I now have to use as.character to get the information into hyperGTest. > > sigLL <- (unlist(mget(as.character(probe), env=entrezPk, ifnotfound=NA))) > sigLL <- as.character(sigLL[!is.na(sigLL)]) > sigLL <- sigLL[!duplicated(sigLL)] > > univ <- as.character(unique(getLL(ls(entrezPk), annoPk))) > > Unfortenatly probeSetSummary does not like this: > > >> ps <- probeSetSummary(hgOver) > Warning message: > The vector of geneIds used to create the GOHyperGParams object was not a named vector. > If you want to know the probesets that contributed to this result > you need to pass a named vector for geneIds. > > Is it possible to read a .txt file and get the probe ID into a named vector? Or get around this another way? I have tried on R 2.5.1 and 2.6. Sure. Just read in the .txt file and then create another vector of names for the vector, and do names(thevector) <- thenamevector Of course this presupposes that you know the names for the vector... If not, I think you are stuck. Best, Jim > >> sessionInfo() > R version 2.6.0 (2007-10-03) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 > > attached base packages: > [1] splines tools stats graphics grDevices utils datasets methods base > > other attached packages: > [1] illuminaHumanv2_1.4.0 GOstats_2.4.0 Category_2.4.0 genefilter_1.16.0 survival_2.34 RBGL_1.14.0 GO.db_2.0.2 graph_1.16.1 > [9] lumi_1.4.0 mgcv_1.3-28 affy_1.16.0 preprocessCore_1.0.0 affyio_1.6.1 annaffy_1.10.1 KEGG_2.0.1 GO_2.0.1 > [17] annotate_1.16.1 AnnotationDbi_1.0.6 RSQLite_0.6-4 DBI_0.2-4 Biobase_1.16.1 xtable_1.5-2 RColorBrewer_1.0-2 limma_2.12.0 > > loaded via a namespace (and not attached): > [1] cluster_1.11.9 > > Regards, > Ingrid > > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD COMMENT
0
Entering edit mode
@ingrid-h-g-stensen-1971
Last seen 9.7 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20071130/ e9b29657/attachment.pl
ADD COMMENT

Login before adding your answer.

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