No genes found in universe : goana error
1
1
Entering edit mode
fawazfebin ▴ 50
@fawazfebin-14053
Last seen 2.2 years ago

Hi

I was doing a gene ontology analysis on a set of differentially expressed genes. The goana function returns an error saying ," No genes found in universe". Here is the code I ran for differential expression analysis ('countdata' represents the dataframe containing counts of each gene in each of the samples) :

> gns <- select(org.Hs.eg.db, row.names(countdata), c("ENTREZID","SYMBOL"),"ENSEMBL")
'select()' returned 1:many mapping between keys and columns
> gns <- gns[!duplicated(gns[,1]),]
> all.equal(gns$ENSEMBL, row.names(countdata))
[1] TRUE

>condition <- c(rep("Control",3),rep("Resistant",2))

y <- DGEList(countdata, genes = gns,group=condition)
> countsPerMillion <- cpm(y)
> keep <- which(rowSums(countCheck) >= 2)
> y <- y[keep,]
> y <- calcNormFactors(y, method="TMM")
> plotMDS(y)
> design=model.matrix(~condition,y$samples)

> y <- estimateDisp(y,design)
> plotBCV(y)
> fit <- glmFit(y,design)
> lrt <- glmLRT(fit,coef=2)
> edgeR_result = topTags(lrt, n=24000, adjust.method="BH", sort.by="PValue", p.value=0.05)

> deGenes=decideTestsDGE(lrt, adjust.method="BH", p.value=0.05, lfc=1)
> summary(deGenes)
   [,1] 
-1   353
0  13399
1    348
> deGenes=row.names(lrt)[as.logical(deGenes)]
> plotSmear(lrt,de.tags=deGenes)
> go <- goana(lrt)
Error in goana.default(de = DEGenes, universe = universe, ...) : 
  No genes found in universe.

> traceback()
5: stop("No genes found in universe")
4: goana.default(de = DEGenes, universe = universe, ...)
3: goana(de = DEGenes, universe = universe, ...)
2: goana.DGELRT(lrt)
1: goana(lrt)

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7600)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] org.Hs.eg.db_3.4.0   AnnotationDbi_1.36.2 Biobase_2.34.0      
 [4] BiocInstaller_1.24.0 edgeR_3.16.5         limma_3.30.13       
 [7] rtracklayer_1.34.2   GenomicRanges_1.26.4 GenomeInfoDb_1.10.3 
[10] IRanges_2.8.2        S4Vectors_0.12.2     fastcluster_1.1.24  
[13] reshape2_1.4.2       ggplot2_2.2.1        RSQLite_2.0         
[16] BiocGenerics_0.20.0 

loaded via a namespace (and not attached):
 [1] bitops_1.0-6               matrixStats_0.52.2         bit64_0.9-7               
 [4] RColorBrewer_1.1-2         httr_1.3.1                 tools_3.3.2               
 [7] R6_2.2.2                   DBI_0.7                    lazyeval_0.2.0            
[10] colorspace_1.3-2           bit_1.1-12                 cummeRbund_2.16.0         
[13] scales_0.5.0               stringr_1.2.0              digest_0.6.12             
[16] Rsamtools_1.26.2           XVector_0.14.1             pkgconfig_2.0.1           
[19] htmltools_0.3.6            BSgenome_1.42.0            rlang_0.1.2               
[22] BiocParallel_1.8.2         VariantAnnotation_1.20.3   RCurl_1.95-4.8            
[25] magrittr_1.5               GO.db_3.4.0                Matrix_1.2-11             
[28] Rcpp_0.12.13               munsell_0.4.3              stringi_1.1.5             
[31] SummarizedExperiment_1.4.0 zlibbioc_1.20.0            plyr_1.8.4                
[34] blob_1.1.0                 lattice_0.20-35            Biostrings_2.42.1         
[37] splines_3.3.2              GenomicFeatures_1.26.4     locfit_1.5-9.1            
[40] biomaRt_2.30.0             XML_3.98-1.9               latticeExtra_0.6-28       
[43] data.table_1.10.4          gtable_0.2.0               tibble_1.3.4              
[46] GenomicAlignments_1.10.1   memoise_1.1.0             

Kindly support.

 

 

edger goana gene ontology • 3.5k views
ADD COMMENT
1
Entering edit mode
fawazfebin ▴ 50
@fawazfebin-14053
Last seen 2.2 years ago

I was able to solve it by giving the column name of ENTREZID  for "geneid " in goana function. 

ADD COMMENT
1
Entering edit mode

Yes, goana needs to know where to find the Entrez Gene IDs, so you have to tell it the column name. By default it tries to use the row names which, in this case, aren't the right IDs.

ADD REPLY

Login before adding your answer.

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