[BioC] goTools: Error in goidvect[test] : invalid subscript type \'list\'

James W. MacDonald jmacdon at uw.edu
Fri Jul 6 21:14:26 CEST 2012


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



More information about the Bioconductor mailing list