Skip to content

Commit cbc14b3

Browse files
committed
merge
Merge remote-tracking branch 'refs/remotes/origin/devel' into devel # Conflicts: # DESCRIPTION # R/convenience.R # R/processors.R
2 parents 5949522 + a359de6 commit cbc14b3

8 files changed

Lines changed: 73 additions & 33 deletions

File tree

.github/workflows/check-bioc.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ name: R-CMD-check-bioc
3434
## Note that you can always run a GHA test without the cache by using the word
3535
## "/nocache" in the commit message.
3636
env:
37-
has_testthat: 'true'
38-
run_covr: 'true'
39-
run_pkgdown: 'true'
37+
has_testthat: 'false'
38+
run_covr: 'false'
39+
run_pkgdown: 'false'
4040
has_RUnit: 'false'
4141
cache-version: 'cache-v1'
4242
run_docker: 'false'
@@ -52,9 +52,9 @@ jobs:
5252
fail-fast: false
5353
matrix:
5454
config:
55-
- { os: ubuntu-latest, r: '4.4', bioc: '3.19', cont: "bioconductor/bioconductor_docker:RELEASE_3_19", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" }
56-
- { os: macOS-latest, r: '4.4', bioc: '3.19'}
57-
- { os: windows-latest, r: '4.4', bioc: '3.19'}
55+
- { os: ubuntu-latest, r: '4.4', bioc: '3.20', cont: "bioconductor/bioconductor_docker:RELEASE_3_20", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" }
56+
- { os: macOS-latest, r: '4.4', bioc: '3.20'}
57+
- { os: windows-latest, r: '4.4', bioc: '3.20'}
5858
## Check https://github.com/r-lib/actions/tree/master/examples
5959
## for examples using the http-user-agent
6060
env:
@@ -105,16 +105,16 @@ jobs:
105105
uses: actions/cache@v3
106106
with:
107107
path: ${{ env.R_LIBS_USER }}
108-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_19-r-4.4-${{ hashFiles('.github/depends.Rds') }}
109-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_19-r-4.4-
108+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_20-r-4.4-${{ hashFiles('.github/depends.Rds') }}
109+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_20-r-4.4-
110110

111111
- name: Cache R packages on Linux
112112
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
113113
uses: actions/cache@v3
114114
with:
115115
path: /home/runner/work/_temp/Library
116-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_19-r-4.4-${{ hashFiles('.github/depends.Rds') }}
117-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_19-r-4.4-
116+
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_20-r-4.4-${{ hashFiles('.github/depends.Rds') }}
117+
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_20-r-4.4-
118118

119119
# - name: Install Linux system dependencies
120120
# if: runner.os == 'Linux'
@@ -285,7 +285,7 @@ jobs:
285285
if: failure()
286286
uses: actions/upload-artifact@master
287287
with:
288-
name: ${{ runner.os }}-biocversion-RELEASE_3_19-r-4.4-results
288+
name: ${{ runner.os }}-biocversion-RELEASE_3_20-r-4.4-results
289289
path: check
290290

291291

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: gemma.R
22
Title: A wrapper for Gemma's Restful API to access curated gene expression data and differential expression analyses
3-
Version: 3.7.3
3+
Version: 3.9.2
44
Authors@R:
55
c(person(given = "Javier", family = "Castillo-Arnemann",
66
role = c("aut"), email = "javiercastilloar@gmail.com",
@@ -26,7 +26,6 @@ URL: https://pavlidislab.github.io/gemma.R/, https://github.com/PavlidisLab/gemm
2626
License: Apache License (>= 2)
2727
Encoding: UTF-8
2828
Roxygen: list(markdown = TRUE)
29-
RoxygenNote: 7.3.2
3029
BugReports: https://github.com/PavlidisLab/gemma.R/issues
3130
Depends:
3231
R (>= 4.1.0)
@@ -53,7 +52,8 @@ Imports:
5352
R.utils,
5453
kableExtra,
5554
base64enc,
56-
pheatmap
55+
pheatmap,
56+
grDevices
5757
Suggests:
5858
testthat (>= 2.0.0),
5959
rmarkdown,
@@ -86,3 +86,4 @@ biocViews:
8686
Normalization,
8787
BatchEffect,
8888
Preprocessing
89+
Config/roxygen2/version: 8.0.0

R/convenience.R

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ get_taxa <- function(memoised = getOption("gemma.memoised", FALSE)){
733733
#' @param call Gemma API endpoint.
734734
#' @param ... parameters included in the call
735735
#' @param json If `TRUE` will parse the content as a list
736+
#' @param header headers to pass to \code{\link[httr]{add_headers}}
736737
#' @keywords misc
737738
#' @return A list if `json = TRUE` and an httr response if `FALSE`
738739
#' @examples
@@ -1138,11 +1139,13 @@ get_dataset_expression_for_genes <- function(
11381139
#' @param genes An optional list of gene symbols or identifiers
11391140
#' @param adj_p_filter P value threshold to filter genes
11401141
#' @param rank_filter Positive integer or a ratio.
1141-
#' @param ... passed to /code{/link{get_dataset_object}} if dataset is a name
1142+
#' @param ... passed to \code{\link{get_dataset_object}} if dataset is a name
11421143
#'
11431144
#' @return A list of pheatmap plots for every differential expression contrast of an experiment.
11441145
#' Each plot will be subsetted to exclusively include the relevant subset for the contrast.
11451146
#'
1147+
#' @keywords dataset
1148+
#'
11461149
#' @export
11471150
visualize_dataset <- function(dataset,genes = NULL, adj_p_filter = 1, rank_filter = Inf, ...){
11481151
if('character' %in% class(dataset)){
@@ -1202,7 +1205,7 @@ visualize_dataset <- function(dataset,genes = NULL, adj_p_filter = 1, rank_filte
12021205
out <- pheatmap::pheatmap(subset_expression,
12031206
annotation_col = subset_meta[,!colnames(subset_meta) %in% 'factorValues',drop= FALSE],
12041207
cluster_cols = FALSE,
1205-
cluster_rows = FALSE,
1208+
cluster_rows = FALSE,color = viridis::viridis(20),
12061209
show_colnames = FALSE,scale = 'row',na_col = 'white')
12071210
class(out) = c(class(out),'listable_pheatmap')
12081211
return(out)
@@ -1215,8 +1218,8 @@ visualize_dataset <- function(dataset,genes = NULL, adj_p_filter = 1, rank_filte
12151218
}
12161219

12171220
#' @export
1218-
print.listable_pheatmap <- function(heatmap){
1219-
dev.off()
1220-
heatmap
1221+
print.listable_pheatmap <- function(x, ...){
1222+
grDevices::dev.off()
1223+
print(x,...)
12211224
}
12221225

R/gemma.R.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,5 @@ utils::globalVariables(c("platform.ID", "analysis.ID", "analysis.Threshold", "ba
4646
"subsetFactor.categoryURI", "subsetFactor.Enabled", "subsetFactor.factorValue",
4747
"subsetFactor.factorValueURI", "valueUri", "category",
4848
"categoryURI", "experimental.factorValue","value",
49-
"contrast.ID","%$%",'baseline.factors',"ID","sample.ID"))
49+
"contrast.ID","%$%",'baseline.factors',"ID","sample.ID","filter_genes","print.listable_pheatmap",
50+
"corrected_pvalue"))

R/subProcessors.R

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,20 @@ read_gzipped_tsv <- function(content){
1111

1212
tmp <- tempfile() # Make a temp file
1313
writeBin(content, tmp) # Save to that file
14-
tmp2 <- gzfile(tmp)
15-
ret <- tmp2 %>%
14+
con <- gzfile(tmp)
15+
16+
lines <- con %>%
1617
readLines() %>%
17-
.[which(!startsWith(., "#"))[1]:length(.)] %>%
18-
# Strip comments
19-
paste0(collapse = "\n") %>%
20-
paste0('\n') %>%
21-
{
22-
fread(text = .)
23-
}
24-
close(tmp2)
18+
.[which(!startsWith(., "#"))[1]:length(.)]
19+
close(con)
20+
21+
tmp2 <- tempfile()
22+
writeLines(lines,tmp2)
23+
24+
ret <- fread(file = tmp2)
25+
2526
unlink(tmp)
27+
unlink(tmp2)
2628

2729
return(ret)
2830
}

man/gemma_call.Rd

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/subset_factorValues.Rd

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/visualize_dataset.Rd

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)