goTools: Error in goidvect[test] : invalid subscript type \'list\'
1
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.3 years ago
I am having some difficulty with the goTools package. Specifically I am getting the error message Error in goidvect[test] : invalid subscript type 'list' First I load the GOTerms goAnnotation2 <- read.table("C:/Users/Kristi 2/Desktop/test.txt", sep="\t", header=TRUE, colClasses="character") Which looks like this GOTerm GO:0050517 GO:0050432 GO:0005515 GO:0003677 GO:0008270 GO:0030548 GO:0050517 GO:0050432 GO:0005515 GO:0051010 goAnnotation2 <- as.vector(unlist(goAnnotation2)) class(goAnnotation2) [1] "character" Count = ontoCompare(list(goAnnotation2), probeType="GO", method="TIDS") Starting ontoCompare... Error in goidvect[test] : invalid subscript type 'list' I found a similar error discussed August 4, 2011. The OP posted the code that they could not execute successfully on their machine, although the example they gave worked for me. I'm running Windows 7 box, core i7 processor with 8GB RAM, and I'm using R-Studio. Note, that the above list of GO terms isn't the actual list of GO terms I wish to include, it's just a random I am starting with to get my hands wet with goTools. I have some work to do yet to extract all the GO terms from our microarray annotation file which annoyingly included the textual descriptions for each GO term beside it (e.g. GO:0032422: purinE-rich negative regulatory element binding; GO:0003714: transcription corepressor activity; GO:0003700: transcription factor activity) Thanks, Brad -- output of sessionInfo(): R version 2.14.1 (2011-12-22) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252 [4] LC_NUMERIC=C LC_TIME=English_Canada.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] goTools_1.28.0 GO.db_2.6.1 RSQLite_0.11.1 DBI_0.2-5 [5] AnnotationDbi_1.16.19 Biobase_2.14.0 loaded via a namespace (and not attached): [1] IRanges_1.12.6 tools_2.14.1 -- Sent via the guest posting facility at bioconductor.org.
Transcription Microarray Annotation GO goTools Transcription Microarray Annotation GO • 1.9k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 12 hours ago
United States
Hi Brad, On 7/6/2012 2:55 PM, Brad Davis [guest] wrote: > I am having some difficulty with the goTools package. Specifically I am getting the error message Error in goidvect[test] : invalid subscript type 'list' > > First I load the GOTerms > > goAnnotation2<- read.table("C:/Users/Kristi 2/Desktop/test.txt", sep="\t", header=TRUE, colClasses="character") > > Which looks like this > > GOTerm > GO:0050517 > GO:0050432 > GO:0005515 > GO:0003677 > GO:0008270 > GO:0030548 > GO:0050517 > GO:0050432 > GO:0005515 > GO:0051010 > > goAnnotation2<- as.vector(unlist(goAnnotation2)) > class(goAnnotation2) > [1] "character" > > Count = ontoCompare(list(goAnnotation2), probeType="GO", method="TIDS") > Starting ontoCompare... > Error in goidvect[test] : invalid subscript type 'list' I believe you need a list of length > 1. I can't get your code to run either, but this works: > gos <- Lkeys(GOTERM) > golst <- list(gos[sample(1:1000, 20)], gos[sample(1:1000, 20)],gos[sample(1:1000, 20)]) > z <- ontoCompare(golst, probeType="GO", method="TIDS") Best, Jim > > I found a similar error discussed August 4, 2011. The OP posted the code that they could not execute successfully on their machine, although the example they gave worked for me. > > I'm running Windows 7 box, core i7 processor with 8GB RAM, and I'm using R-Studio. > > Note, that the above list of GO terms isn't the actual list of GO terms I wish to include, it's just a random I am starting with to get my hands wet with goTools. I have some work to do yet to extract all the GO terms from our microarray annotation file which annoyingly included the textual descriptions for each GO term beside it (e.g. GO:0032422: purinE-rich negative regulatory element binding; GO:0003714: transcription corepressor activity; GO:0003700: transcription factor activity) > > Thanks, > Brad > > > > -- output of sessionInfo(): > > R version 2.14.1 (2011-12-22) > Platform: i386-pc-mingw32/i386 (32-bit) > > locale: > [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252 > [4] LC_NUMERIC=C LC_TIME=English_Canada.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] goTools_1.28.0 GO.db_2.6.1 RSQLite_0.11.1 DBI_0.2-5 > [5] AnnotationDbi_1.16.19 Biobase_2.14.0 > > loaded via a namespace (and not attached): > [1] IRanges_1.12.6 tools_2.14.1 > > -- > Sent via the guest posting facility at bioconductor.org. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > 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 University of Washington Environmental and Occupational Health Sciences 4225 Roosevelt Way NE, # 100 Seattle WA 98105-6099
ADD COMMENT
0
Entering edit mode
It seems like the problem I was having may be related to specific GO ids rather than anything else. Instead of manually creating a sample list of GO codes, I completed my code for automatically extracting the GO codes from the provided annotations. It more or less works if exclude problematic GO ids as identified using options(error=recover). e.g. The ontoCompare function fails and returns an error of 1: ontoCompare(list(alist[[1]][c(1:100)]), probeType="GO", methods="TIDS", goType="BP", plot=TRUE) 2: lapply(tmp, parentsVectWrapper, endnode) 3: FUN(X[[2]]) Suggests that it's element 2 from alist (e.g. alist[[2]]), which in this case is GO:0000022. Once I remove that element from the list, ontoCompare proceeds past that point and either executes successfully if I submit a short enough list (e.g. alist[[1]][c(1,3:50)]) or until it highlights another problematic element. Oddly, in some situations when this happens, the error will identify position n as being problematic and then when I remove it, it will identify position n-1 as being problematic, and so on and so forth. I've tried randomizing the index from the GO list (i.e. swapping the GO ids between index 21 and 43, for example) to determine if it's in anyway related to run time or loop time, but that doesn't seem to be the case. In any event, here are a sample of the GO ids that seem to be causing me problems. I do not see any obvious pattern here. GO:0000910, GO:0043193, GO:006468, GO:0007243, GO:0045449, GO:0007015 Brad On Fri, Jul 6, 2012 at 12:14 PM, James W. MacDonald <jmacdon@uw.edu> wrote: > Hi Brad, > > > On 7/6/2012 2:55 PM, Brad Davis [guest] wrote: > >> I am having some difficulty with the goTools package. Specifically I am >> getting the error message Error in goidvect[test] : invalid subscript type >> 'list' >> >> First I load the GOTerms >> >> goAnnotation2<- read.table("C:/Users/Kristi 2/Desktop/test.txt", >> sep="\t", header=TRUE, colClasses="character") >> >> Which looks like this >> >> GOTerm >> GO:0050517 >> GO:0050432 >> GO:0005515 >> GO:0003677 >> GO:0008270 >> GO:0030548 >> GO:0050517 >> GO:0050432 >> GO:0005515 >> GO:0051010 >> >> goAnnotation2<- as.vector(unlist(**goAnnotation2)) >> class(goAnnotation2) >> [1] "character" >> >> Count = ontoCompare(list(**goAnnotation2), probeType="GO", method="TIDS") >> Starting ontoCompare... >> Error in goidvect[test] : invalid subscript type 'list' >> > > I believe you need a list of length > 1. I can't get your code to run > either, but this works: > > > gos <- Lkeys(GOTERM) > > golst <- list(gos[sample(1:1000, 20)], gos[sample(1:1000, > 20)],gos[sample(1:1000, 20)]) > > z <- ontoCompare(golst, probeType="GO", method="TIDS") > > Best, > > Jim > > > > >> I found a similar error discussed August 4, 2011. The OP posted the code >> that they could not execute successfully on their machine, although the >> example they gave worked for me. >> >> I'm running Windows 7 box, core i7 processor with 8GB RAM, and I'm using >> R-Studio. >> >> Note, that the above list of GO terms isn't the actual list of GO terms I >> wish to include, it's just a random I am starting with to get my hands wet >> with goTools. I have some work to do yet to extract all the GO terms from >> our microarray annotation file which annoyingly included the textual >> descriptions for each GO term beside it (e.g. GO:0032422: purinE- rich >> negative regulatory element binding; GO:0003714: transcription corepressor >> activity; GO:0003700: transcription factor activity) >> >> Thanks, >> Brad >> >> >> >> -- output of sessionInfo(): >> >> R version 2.14.1 (2011-12-22) >> Platform: i386-pc-mingw32/i386 (32-bit) >> >> locale: >> [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 >> LC_MONETARY=English_Canada.**1252 >> [4] LC_NUMERIC=C LC_TIME=English_Canada.1252 >> >> attached base packages: >> [1] stats graphics grDevices utils datasets methods base >> >> other attached packages: >> [1] goTools_1.28.0 GO.db_2.6.1 RSQLite_0.11.1 >> DBI_0.2-5 >> [5] AnnotationDbi_1.16.19 Biobase_2.14.0 >> >> loaded via a namespace (and not attached): >> [1] IRanges_1.12.6 tools_2.14.1 >> >> -- >> Sent via the guest posting facility at bioconductor.org. >> >> ______________________________**_________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.e="" thz.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=""> >> > > -- > James W. MacDonald, M.S. > Biostatistician > University of Washington > Environmental and Occupational Health Sciences > 4225 Roosevelt Way NE, # 100 > Seattle WA 98105-6099 > > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

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