GOstats - Error in order(pvals) : argument 1 is not a vector
1
0
Entering edit mode
@sarajdcardoso-11011
Last seen 8.5 years ago

I'm getting this error when I run the hyperGTest function (GOstats package) for one list of gene IDs that I'm interested in.

Error in order(pvals) : argument 1 is not a vector

I have already checked the file and the list itself but I haven't been able to solve the problem, since it only happens for this specific list of genes when I have been able to run the test on other lists of genes generated the same way.

> modFile <- read.csv("../module_purple_listGenes.csv", header = FALSE)
>
> modFile$V1 %in% fpkm2_IDs #Check if Gene IDs are in the universe of genes
 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
[30] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
[59] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
>
>
> biased_BP_over <- GSEAGOHyperGParams(name="My custom GSEA based annot params",
+                                                      geneSetCollection=gsc,
+                                                      geneIds=modFile,
+                                                      universeGeneIds=fpkm2_IDs,
+                                                      ontology="BP",
+                                                      pvalueCutoff=0.05,
+                                                      conditional=TRUE,
+                                                      testDirection="over")
Warning message:
In makeValidParams(.Object) :
  converting geneIds from list to atomic vector via unlist
> test_biased_BP_over <- hyperGTest(biased_BP_over)
Error in order(pvals) : argument 1 is not a vector

 

Can anyone help me solve this error?

Here's the sessionInfo() output:

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
 [1] stats4    parallel  grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] GOstats_2.34.0         Category_2.34.2        Matrix_1.2-6           GSEABase_1.30.2        graph_1.46.0           annotate_1.46.1       
 [7] XML_3.98-1.4           GO.db_3.1.2            AnnotationForge_1.10.1 org.Hs.eg.db_3.1.2     AnnotationDbi_1.30.1   GenomeInfoDb_1.4.3    
[13] IRanges_2.2.9          S4Vectors_0.6.6        Biobase_2.28.0         BiocGenerics_0.14.0    gplots_3.0.1           WGCNA_1.51            
[19] RSQLite_1.0.0          DBI_0.4-1              fastcluster_1.1.20     dynamicTreeCut_1.63-1  RColorBrewer_1.1-2     VennDiagram_1.6.17    
[25] futile.logger_1.4.1   

loaded via a namespace (and not attached):
 [1] genefilter_1.50.0     gtools_3.5.0          splines_3.2.2         lattice_0.20-33       colorspace_1.2-6      RBGL_1.44.0          
 [7] chron_2.3-47          survival_2.39-4       foreign_0.8-66        lambda.r_1.1.7        matrixStats_0.50.2    foreach_1.4.3        
[13] plyr_1.8.3            munsell_0.4.3         gtable_0.2.0          caTools_1.17.1        codetools_0.2-14      latticeExtra_0.6-28  
[19] doParallel_1.0.10     preprocessCore_1.30.0 Rcpp_0.12.5           acepack_1.3-3.3       KernSmooth_2.23-15    xtable_1.8-2         
[25] scales_0.4.0          gdata_2.17.0          Hmisc_3.17-4          gridExtra_2.2.1       impute_1.42.0         ggplot2_2.1.0        
[31] tools_3.2.2           bitops_1.0-6          Formula_1.2-1         cluster_2.0.4         futile.options_1.0.0  data.table_1.9.6     
[37] iterators_1.0.8       rpart_4.1-10          nnet_7.3-12 

 

 

bioconductor r gostats • 3.8k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 17 hours ago
United States

You are being unnecessarily vague about what you are doing, so it's actually impossible for anybody to help you.

Howeva, do note that you are first testing

modFile$V1 %in% fpkm2_IDs

But you then pass ALL of modFile to GSEGOHyperGParams, and it's being unlisted (that's what this warning means)

Warning message:
In makeValidParams(.Object) :
  converting geneIds from list to atomic vector via unlist

So if I were to hazard a guess, I would bet that there are other things in modFile that are not Gene IDs, and they are wreaking havoc.

ADD COMMENT

Login before adding your answer.

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