Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #119

Merged
merged 3 commits into from
Sep 7, 2022
Merged

Dev #119

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
^.*\.Rproj$
^\.Rproj\.user$
^docs$
^pkgdown$
^CONTRIBUTING.md$
^_pkgdown\.yml$
^\.github$
Expand Down
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ImmuneSpaceR
Type: Package
Title: A Thin Wrapper around the ImmuneSpace Database
Version: 1.19.2
Version: 1.25.1
Date: 2014-06-12
Authors@R: c(person("Greg", "Finak", role = "aut"),
person("Renan", "Sauteraud", role = "aut"),
Expand All @@ -28,7 +28,8 @@ License: GPL-2
Suggests:
knitr,
testthat,
covr
covr,
withr
Imports:
utils,
R6,
Expand All @@ -50,7 +51,8 @@ Imports:
flowCore,
flowWorkspace,
digest
RoxygenNote: 7.1.1
RoxygenNote: 7.2.1
Encoding: UTF-8
Collate:
'CreateConnection.R'
'ISCon.R'
Expand Down
12 changes: 4 additions & 8 deletions R/ISCon-geneExpression.R
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,12 @@ ISCon$set(
fileSuffix <- ".immsig"
} else {
if (outputType == "summary") {
fileSuffix <- switch(
annotation,
fileSuffix <- switch(annotation,
"latest" = ".summary",
"default" = ".summary.orig"
)
} else {
fileSuffix <- switch(
outputType,
fileSuffix <- switch(outputType,
"normalized" = "",
"raw" = ".raw"
)
Expand Down Expand Up @@ -877,14 +875,12 @@ ISCon$set(

# Get the cache name of expression matrix by output type and annotation
.getMatrixCacheName <- function(matrixName, outputType, annotation) {
outputSuffix <- switch(
outputType,
outputSuffix <- switch(outputType,
"summary" = "_sum",
"normalized" = "_norm",
"raw" = "_raw"
)
annotationSuffix <- switch(
annotation,
annotationSuffix <- switch(annotation,
"latest" = "_latest",
"default" = "_default",
"ImmSig" = "_immsig"
Expand Down
4 changes: 2 additions & 2 deletions R/ISCon-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ ISCon$set(
which = "private",
name = ".checkStudy",
value = function(verbose = FALSE) {
folders <- labkey.getFolders(
folders <- suppressWarnings(labkey.getFolders(
baseUrl = self$config$labkey.url.base,
folderPath = "",
includeSubfolders = TRUE,
includeEffectivePermissions = TRUE
)
))
folders <- folders[grepl("IS\\d{1}|SDY\\d{2,4}", folders$name), ]
study <- basename(self$config$labkey.url.path)

Expand Down
8 changes: 5 additions & 3 deletions R/ISCon.R
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ ISCon$set(
.check_portal(onTest)

# fetch config variables
labkey.url.base <- .get_url_base(onTest)
labkey.url.base <- .get_url_base(onTest, verbose)
labkey.user.email <- .get_user_email()
labkey.url.path <- .get_url_path(study)
curlOptions <- .set_curl_options(login, password)
Expand Down Expand Up @@ -420,7 +420,7 @@ ISCon$set(
# which really should have been done through option()/getOption() mechanism
# Here we do this to be compatible to labkey online report system
# that automatically assigns these variables in global environment
.get_url_base <- function(onTest = FALSE) {
.get_url_base <- function(onTest = FALSE, verbose = FALSE) {
labkey.url.base <- try(get("labkey.url.base", .GlobalEnv), silent = TRUE)
if (inherits(labkey.url.base, "try-error")) {
labkey.url.base <- paste0("https://", .get_host(onTest))
Expand All @@ -431,7 +431,7 @@ ISCon$set(
}

# Allow http (no SSL) for local
if (grepl("immunespace", labkey.url.base)) {
if (grepl("(immunespace|lji)", labkey.url.base)) {
labkey.url.base <- gsub("http:", "https:", labkey.url.base)
if (length(grep("^https://", labkey.url.base)) == 0) {
labkey.url.base <- paste0("https://", labkey.url.base)
Expand All @@ -442,6 +442,8 @@ ISCon$set(
}
}

if (isTRUE(verbose)) message(sprintf("URL base: %s", labkey.url.base))

labkey.url.base
}

Expand Down
3 changes: 2 additions & 1 deletion R/ImmuneSpaceR.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ globalVariables(
"geo_accession",
"expsample_accession",
"feature_id",
"labkey.netrc.file"
"labkey.netrc.file",
"cell_number_preferred"
)
)
Loading