Skip to content

Commit 2f91466

Browse files
author
guangchuang yu
committed
bug fixed on extracting ont from parsing expand.dots
1 parent 4ef52bc commit 2f91466

24 files changed

+33
-25
lines changed

.svnignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ CONTRIBUTING.md
44
appveyor.yml
55
docs
66
mkdocs
7+
outdated

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: clusterProfiler
22
Type: Package
33
Title: statistical analysis and visualization of functional profiles for
44
genes and gene clusters
5-
Version: 3.3.3
5+
Version: 3.3.4
66
Authors@R: c(person(given = "Guangchuang", family = "Yu",
77
email = "[email protected]",
88
role = c("aut", "cre")),

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
CHANGES IN VERSION 3.3.4
2+
------------------------
3+
o bug fixed of determine `ont` from `expand.dots` <2016-12-06, Mon>
4+
+ see https://github.com/GuangchuangYu/clusterProfiler/issues/72
5+
16
CHANGES IN VERSION 3.3.3
27
------------------------
38
o switch from BiocStyle to prettydoc <2016-11-30, Wed>

R/go-utilities.R

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,27 @@ add_GO_Ontology <- function(obj, GO_DATA) {
153153
obj@result <- df
154154
return(obj)
155155
}
156+
157+
158+
get_go_ontology <- function(x) {
159+
if (is(x, "compareClusterResult")) {
160+
if (x@fun != "enrichGO") {
161+
stop("simplify only work for GO...")
162+
}
163+
ont <- x@.call$ont
164+
if (is.null(ont) || class(ont) != "character") {
165+
## should be "MF", default value of enrichGO
166+
## it's safe to determine from the output
167+
ont <- x@compareClusterResult$ID[1] %>% GOTERM[[.]] %>% Ontology
168+
}
169+
} else if (is(x, "enrichResult")) {
170+
if (!x@ontology %in% c("BP", "MF", "CC"))
171+
stop("ontology should be one of 'MF', 'BP', 'CC'...")
172+
173+
ont <- x@ontology
174+
} else {
175+
stop("x should be an instance of 'enrichResult' or 'compareClusterResult'...")
176+
}
177+
178+
return(ont)
179+
}

R/utilities.R

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -84,28 +84,6 @@ plotting.clusterProfile <- function(clProf.reshape.df,
8484
return(p)
8585
}
8686

87-
get_go_ontology <- function(x) {
88-
if (is(x, "compareClusterResult")) {
89-
if (x@fun != "enrichGO") {
90-
stop("simplify only work for GO...")
91-
}
92-
ont <- x@.call$ont
93-
if (is.null(ont)) {
94-
## should be "MF", default value of enrichGO
95-
## it's safe to determine from the output
96-
ont <- x@compareClusterResult$ID[1] %>% GOTERM[[.]] %>% Ontology
97-
}
98-
} else if (is(x, "enrichResult")) {
99-
if (!x@ontology %in% c("BP", "MF", "CC"))
100-
stop("ontology should be one of 'MF', 'BP', 'CC'...")
101-
102-
ont <- x@ontology
103-
} else {
104-
stop("x should be an instance of 'enrichResult' or 'compareClusterResult'...")
105-
}
106-
107-
return(ont)
108-
}
10987

11088

11189
GI2EG <- function(GI, organism="D39") {

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
clusterProfiler
22
===============
33

4-
[![releaseVersion](https://img.shields.io/badge/release%20version-3.2.6-green.svg?style=flat)](https://bioconductor.org/packages/clusterProfiler) [![develVersion](https://img.shields.io/badge/devel%20version-3.3.3-green.svg?style=flat)](https://github.com/GuangchuangYu/clusterProfiler) [![Bioc](http://www.bioconductor.org/shields/years-in-bioc/clusterProfiler.svg)](https://www.bioconductor.org/packages/devel/bioc/html/clusterProfiler.html#since) [![total](https://img.shields.io/badge/downloads-59724/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/clusterProfiler) [![month](https://img.shields.io/badge/downloads-2211/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/clusterProfiler)
4+
[![releaseVersion](https://img.shields.io/badge/release%20version-3.2.6-green.svg?style=flat)](https://bioconductor.org/packages/clusterProfiler) [![develVersion](https://img.shields.io/badge/devel%20version-3.3.4-green.svg?style=flat)](https://github.com/GuangchuangYu/clusterProfiler) [![Bioc](http://www.bioconductor.org/shields/years-in-bioc/clusterProfiler.svg)](https://www.bioconductor.org/packages/devel/bioc/html/clusterProfiler.html#since) [![total](https://img.shields.io/badge/downloads-59724/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/clusterProfiler) [![month](https://img.shields.io/badge/downloads-2211/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/clusterProfiler)
55

6-
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![codecov](https://codecov.io/gh/GuangchuangYu/clusterProfiler/branch/master/graph/badge.svg)](https://codecov.io/gh/GuangchuangYu/clusterProfiler/) [![Last-changedate](https://img.shields.io/badge/last%20change-2016--11--30-green.svg)](https://github.com/GuangchuangYu/clusterProfiler/commits/master) [![commit](http://www.bioconductor.org/shields/commits/bioc/clusterProfiler.svg)](https://www.bioconductor.org/packages/devel/bioc/html/clusterProfiler.html#svn_source) [![GitHub forks](https://img.shields.io/github/forks/GuangchuangYu/clusterProfiler.svg)](https://github.com/GuangchuangYu/clusterProfiler/network) [![GitHub stars](https://img.shields.io/github/stars/GuangchuangYu/clusterProfiler.svg)](https://github.com/GuangchuangYu/clusterProfiler/stargazers)
6+
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![codecov](https://codecov.io/gh/GuangchuangYu/clusterProfiler/branch/master/graph/badge.svg)](https://codecov.io/gh/GuangchuangYu/clusterProfiler/) [![Last-changedate](https://img.shields.io/badge/last%20change-2016--12--05-green.svg)](https://github.com/GuangchuangYu/clusterProfiler/commits/master) [![commit](http://www.bioconductor.org/shields/commits/bioc/clusterProfiler.svg)](https://www.bioconductor.org/packages/devel/bioc/html/clusterProfiler.html#svn_source) [![GitHub forks](https://img.shields.io/github/forks/GuangchuangYu/clusterProfiler.svg)](https://github.com/GuangchuangYu/clusterProfiler/network) [![GitHub stars](https://img.shields.io/github/stars/GuangchuangYu/clusterProfiler.svg)](https://github.com/GuangchuangYu/clusterProfiler/stargazers)
77

88
[![platform](http://www.bioconductor.org/shields/availability/devel/clusterProfiler.svg)](https://www.bioconductor.org/packages/devel/bioc/html/clusterProfiler.html#archives) [![Build Status](http://www.bioconductor.org/shields/build/devel/bioc/clusterProfiler.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/clusterProfiler/) [![Linux/Mac Travis Build Status](https://img.shields.io/travis/GuangchuangYu/clusterProfiler/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/GuangchuangYu/clusterProfiler) [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/Guangchuangyu/clusterProfiler/master.svg?label=Windows)](https://ci.appveyor.com/project/GuangchuangYu/clusterProfiler) [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-green.svg?style=flat)](http://bioconda.github.io/recipes/bioconductor-clusterprofiler/README.html)
99

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)