comparison topGO_enrichment.R @ 12:8eaa43ba1bfc draft

planemo upload commit 4ba1ebe7b3f5e3fabf78b5fed7ed0b92e2cbf9e5-dirty
author proteore
date Fri, 28 Jun 2019 05:18:20 -0400
parents fa2e27165d5d
children 7f1ce70f0f09
comparison
equal deleted inserted replaced
11:fa2e27165d5d 12:8eaa43ba1bfc
213 if (length(intersect(sample,allGenes))==0){ 213 if (length(intersect(sample,allGenes))==0){
214 print("None of the input ids can be found in the org package data, enrichment analysis cannot be realized. \n The inputs ids probably have no associated GO terms.") 214 print("None of the input ids can be found in the org package data, enrichment analysis cannot be realized. \n The inputs ids probably have no associated GO terms.")
215 return(c(NULL,NULL)) 215 return(c(NULL,NULL))
216 } 216 }
217 217
218 geneList = factor(as.integer(allGenes %in% sample)) 218 geneList = factor(as.integer(allGenes %in% sample)) #duplicated ids in sample count only for one
219 if (length(levels(geneList)) == 1 ){ 219 if (length(levels(geneList)) == 1 ){
220 stop("All or none of the background genes are found in tested genes dataset, enrichment analysis can't be done") 220 stop("All or none of the background genes are found in tested genes dataset, enrichment analysis can't be done")
221 } 221 }
222 names(geneList) <- allGenes 222 names(geneList) <- allGenes
223 223