Skip to content

Commit 8452596

Browse files
committed
Update to MSigDB 7.2
1 parent c1d62bc commit 8452596

File tree

12 files changed

+197
-40
lines changed

12 files changed

+197
-40
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: msigdbr
22
Type: Package
33
Title: MSigDB Gene Sets for Multiple Organisms in a Tidy Data Format
4-
Version: 7.1.1.9001
4+
Version: 7.2.1
55
Authors@R: person("Igor", "Dolgalev", email = "[email protected]", role = c("aut", "cre"))
66
Description: Provides the 'Molecular Signatures Database' (MSigDB) gene sets
77
typically used with the 'Gene Set Enrichment Analysis' (GSEA) software

NEWS.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# msigdbr (development version)
1+
# msigdbr 7.2.1
22

3+
* Based on MSigDB v7.2 release.
34
* Added more annotation fields to the returned gene sets.
45
* Added `msigdbr_species()` as an alternative to `msigdbr_show_species()`.
56
* Added `msigdbr_collections()`.

R/functions.R

+13-3
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,25 @@ msigdbr <- function(species = "Homo sapiens", category = NULL, subcategory = NUL
9292
if (length(category) > 1) {
9393
stop("please specify only one category at a time")
9494
}
95-
genesets_subset <- filter(genesets_subset, .data$gs_cat == category)
95+
if (category %in% genesets_subset$gs_cat) {
96+
genesets_subset <- filter(genesets_subset, .data$gs_cat == category)
97+
} else {
98+
stop("unknown category")
99+
}
96100
}
97101

98-
# filter by sub-category
102+
# filter by sub-category (with and without colon)
99103
if (is.character(subcategory)) {
100104
if (length(subcategory) > 1) {
101105
stop("please specify only one subcategory at a time")
102106
}
103-
genesets_subset <- filter(genesets_subset, .data$gs_subcat == subcategory)
107+
if (subcategory %in% genesets_subset$gs_subcat) {
108+
genesets_subset <- filter(genesets_subset, .data$gs_subcat == subcategory)
109+
} else if (subcategory %in% gsub(".*:", "", genesets_subset$gs_subcat)){
110+
genesets_subset <- filter(genesets_subset, gsub(".*:", "", .data$gs_subcat) == subcategory)
111+
} else {
112+
stop("unknown subcategory")
113+
}
104114
}
105115

106116
# combine gene sets and genes

R/sysdata.rda

468 KB
Binary file not shown.

cran-comments.md

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Test environments
2-
* local R installation, R 4.0.0
3-
* ubuntu 16.04 (on travis-ci), R 4.0.0
2+
* local R installation, R 4.0.2
3+
* ubuntu 16.04 (on travis-ci), R 4.0.2
44
* win-builder (devel)
55

66
## R CMD check results
@@ -9,13 +9,7 @@
99

1010
## revdepcheck results
1111

12-
We checked 5 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
12+
We checked 7 reverse dependencies (3 from CRAN + 4 from BioConductor), comparing R CMD check results across CRAN and dev versions of this package.
1313

14-
* We saw 0 new problems
15-
* We failed to check 0 packages
16-
17-
## Resubmission
18-
19-
This is a resubmission. In this version I have:
20-
21-
* Addressed the elapsed time notes.
14+
* We saw 0 new problems
15+
* We failed to check 0 packages

data-raw/msigdbr-prepare.R

+10-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ library(usethis)
1111
# Import MSigDB gene sets -------------------------------------------------
1212

1313
# Define MSigDB download variables
14-
msigdb_version = "7.1"
14+
msigdb_version = "7.2"
1515
msigdb_url_base = "https://data.broadinstitute.org/gsea-msigdb/msigdb/release"
1616
msigdb_zip_url = glue("{msigdb_url_base}/{msigdb_version}/msigdb_v{msigdb_version}_files_to_download_locally.zip")
1717
msigdb_dir = glue("msigdb_v{msigdb_version}_files_to_download_locally")
@@ -96,6 +96,7 @@ human_tbl =
9696
distinct() %>%
9797
mutate(
9898
species_name = "Homo sapiens",
99+
species_common_name = "human",
99100
entrez_gene = human_entrez_gene,
100101
gene_symbol = human_gene_symbol
101102
)
@@ -130,7 +131,7 @@ msigdbr_orthologs =
130131
species_id = ortholog_species,
131132
entrez_gene = ortholog_species_entrez_gene,
132133
gene_symbol = ortholog_species_symbol,
133-
sources = support
134+
ortholog_sources = support
134135
) %>%
135136
filter(
136137
human_entrez_gene != "-",
@@ -140,15 +141,15 @@ msigdbr_orthologs =
140141
mutate(
141142
human_entrez_gene = as.integer(human_entrez_gene),
142143
entrez_gene = as.integer(entrez_gene),
143-
num_sources = str_count(sources, ",") + 1
144+
num_ortholog_sources = str_count(ortholog_sources, ",") + 1
144145
) %>%
145146
filter(
146147
human_entrez_gene %in% msigdb_entrez_genes,
147-
num_sources > 2
148+
num_ortholog_sources > 2
148149
)
149150

150151
# List the number of supporting sources
151-
table(msigdbr_orthologs$num_sources, useNA = "ifany")
152+
table(msigdbr_orthologs$num_ortholog_sources, useNA = "ifany")
152153

153154
# Names and IDs of common species
154155
species_tbl =
@@ -173,9 +174,8 @@ msigdbr_orthologs = inner_join(species_tbl, msigdbr_orthologs, by = "species_id"
173174
# For each human gene, only keep the best ortholog (found in the most databases)
174175
msigdbr_orthologs =
175176
msigdbr_orthologs %>%
176-
select(-species_id) %>%
177177
group_by(human_entrez_gene, species_name) %>%
178-
top_n(1, num_sources) %>%
178+
top_n(1, num_ortholog_sources) %>%
179179
ungroup()
180180

181181
# For each human gene, ignore ortholog pairs with many orthologs
@@ -191,7 +191,8 @@ msigdbr_orthologs =
191191
bind_rows(human_tbl) %>%
192192
select(
193193
human_entrez_gene, human_gene_symbol,
194-
species_name, species_common_name, entrez_gene, gene_symbol, sources, num_sources
194+
species_name, species_common_name, entrez_gene, gene_symbol,
195+
ortholog_sources, num_ortholog_sources
195196
) %>%
196197
arrange(human_gene_symbol, human_entrez_gene, species_name) %>%
197198
distinct()
@@ -203,7 +204,7 @@ hcop %>%
203204
summarize(n_distinct(ortholog_species_symbol))
204205
msigdbr_orthologs %>%
205206
group_by(species_name) %>%
206-
summarize(n_distinct(human_gene_symbol), n_distinct(gene_symbol), max(num_sources))
207+
summarize(n_distinct(human_gene_symbol), n_distinct(gene_symbol), max(num_ortholog_sources))
207208

208209
# Prepare package ---------------------------------------------------------
209210

revdep/README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,33 @@
22

33
|field |value |
44
|:--------|:----------------------------|
5-
|version |R version 4.0.0 (2020-04-24) |
5+
|version |R version 4.0.2 (2020-06-22) |
66
|os |macOS Mojave 10.14.6 |
77
|system |x86_64, darwin17.0 |
88
|ui |RStudio |
99
|language |(EN) |
1010
|collate |en_US.UTF-8 |
1111
|ctype |en_US.UTF-8 |
1212
|tz |America/New_York |
13-
|date |2020-05-12 |
13+
|date |2020-10-02 |
1414

1515
# Dependencies
1616

17-
|package |old |new |Δ |
18-
|:----------|:-----|:-----|:--|
19-
|msigdbr |7.0.1 |7.1.1 |* |
20-
|tidyselect |NA |1.0.0 |* |
21-
|vctrs |NA |0.2.4 |* |
17+
|package |old |new |Δ |
18+
|:-------|:-----|:-----|:--|
19+
|msigdbr |7.1.1 |7.2.1 |* |
2220

2321
# Revdeps
2422

23+
## Failed to check (1)
24+
25+
|package |version |error |warning |note |
26+
|:--------|:-------|:-----|:-------|:----|
27+
|tidybulk |? | | | |
28+
29+
## New problems (1)
30+
31+
|package |version |error |warning |note |
32+
|:--------------------------|:-------|:-----|:-------|:----|
33+
|[hypeR](problems.md#hyper) |1.4.0 | |__+1__ |2 |
34+

revdep/cran.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## revdepcheck results
2+
3+
We checked 7 reverse dependencies (3 from CRAN + 4 from BioConductor), comparing R CMD check results across CRAN and dev versions of this package.
4+
5+
* We saw 0 new problems
6+
* We failed to check 0 packages
7+

revdep/failures.md

+45-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
*Wow, no problems at all. :)*
1+
# tidybulk
2+
3+
<details>
4+
5+
* Version:
6+
* GitHub: https://github.com/igordot/msigdbr
7+
* Source code: NA
8+
* Number of recursive dependencies: 0
9+
10+
</details>
11+
12+
## Error before installation
13+
14+
### Devel
15+
16+
```
17+
18+
There is a binary version available but the source version is later:
19+
binary source needs_compilation
20+
RSQLite 2.2.0 2.2.1 TRUE
21+
22+
Binaries will be installed
23+
24+
25+
installing the source packages ‘EGSEAdata’, ‘hgu133a.db’, ‘hgu133plus2.db’, ‘KEGGdzPathwaysGEO’, ‘org.Mm.eg.db’, ‘org.Rn.eg.db’
26+
27+
28+
29+
```
30+
### CRAN
31+
32+
```
33+
34+
There is a binary version available but the source version is later:
35+
binary source needs_compilation
36+
RSQLite 2.2.0 2.2.1 TRUE
37+
38+
Binaries will be installed
39+
40+
41+
installing the source packages ‘EGSEAdata’, ‘hgu133a.db’, ‘hgu133plus2.db’, ‘KEGGdzPathwaysGEO’, ‘org.Mm.eg.db’, ‘org.Rn.eg.db’
42+
43+
44+
45+
```

revdep/problems.md

+68-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,68 @@
1-
*Wow, no problems at all. :)*
1+
# hypeR
2+
3+
<details>
4+
5+
* Version: 1.4.0
6+
* GitHub: https://github.com/montilab/hypeR
7+
* Source code: https://github.com/cran/hypeR
8+
* Date/Publication: 2020-04-27
9+
* Number of recursive dependencies: 111
10+
11+
Run `revdep_details(, "hypeR")` for more info
12+
13+
</details>
14+
15+
## Newly broken
16+
17+
* checking examples ... WARNING
18+
```
19+
Found the following significant warnings:
20+
21+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
22+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
23+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
24+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
25+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
26+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
27+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
28+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
29+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
30+
Warning: 'msigdbr::msigdbr_show_species' is deprecated.
31+
Deprecated functions may be defunct as soon as of the next release of
32+
R.
33+
See ?Deprecated.
34+
```
35+
36+
## In both
37+
38+
* checking R code for possible problems ... NOTE
39+
```
40+
...
41+
‘is’
42+
hyp_to_table: no visible global function definition for ‘is’
43+
hyp_to_table: no visible global function definition for
44+
‘packageVersion’
45+
hyp_to_table: no visible global function definition for ‘write.table’
46+
hypeR: no visible global function definition for ‘is’
47+
msigdb_available: no visible binding for global variable ‘gs_cat’
48+
msigdb_available: no visible binding for global variable ‘gs_subcat’
49+
msigdb_download: no visible binding for global variable ‘gs_name’
50+
msigdb_download: no visible binding for global variable ‘gene_symbol’
51+
msigdb_download: no visible binding for global variable ‘.’
52+
msigdb_version: no visible global function definition for
53+
‘packageVersion’
54+
Undefined global functions or variables:
55+
. fdr from gene_symbol gs_cat gs_name gs_subcat is label
56+
packageVersion pval significance size to write.table x y
57+
Consider adding
58+
importFrom("methods", "is")
59+
importFrom("utils", "packageVersion", "write.table")
60+
to your NAMESPACE file (and ensure that your DESCRIPTION Imports field
61+
contains 'methods').
62+
```
63+
64+
* checking for unstated dependencies in vignettes ... NOTE
65+
```
66+
'library' or 'require' call not declared from: ‘tidyverse’
67+
```
68+

0 commit comments

Comments
 (0)