-
Notifications
You must be signed in to change notification settings - Fork 1
Gdr 3286 #189
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
Merged
Gdr 3286 #189
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
834e532
docs: fix vignette index entry and add missing chunk labels
darsoo 2fd7d89
fix: move global logic to .onLoad and resolve stack imbalance
darsoo a5456b0
fix: resolve stack imbalance in sprintf by decoupling env identifier …
darsoo cb29ae0
bump version
darsoo b77e733
refactor: use assignInNamespace for explicit package variable initial…
darsoo ca6d3ae
revert changes
darsoo 26c0e80
fix: added prefixes in zzz.R
darsoo 373d4e6
docs: add descriptive and unique chunk labels to all vignettes
darsoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
|
|
||
| .drugNameRegex <- NULL | ||
| .untreated_tag_patterns <- NULL | ||
| .untreatedDrugNameRegex <- NULL | ||
| patterns <- NULL | ||
|
|
||
| #' onload function | ||
| #' | ||
| #' @param libname library name | ||
| #' @param pkgname package name | ||
| #' @noRd | ||
| .onLoad <- function(libname, pkgname) { | ||
| # scientific notation was disabled due to the problem with unit tests | ||
| options(scipen = 999) | ||
|
|
||
| cores <- Sys.getenv("NUM_CORES") | ||
| # based on https://github.com/Bioconductor/BiocParallel/issues/98 | ||
| if (.Platform$OS.type != "windows" && cores != "") { | ||
| BiocParallel::register( | ||
| BiocParallel::MulticoreParam(workers = as.numeric(cores)), | ||
| default = TRUE | ||
| ) | ||
| } else { | ||
| BiocParallel::register( | ||
| BiocParallel::SerialParam(), | ||
| default = TRUE | ||
| ) | ||
| } | ||
| # CONS | ||
| drugs_id <- gDRutils::get_env_identifiers("drug_name") | ||
| utils::assignInNamespace(".drugNameRegex", sprintf("^%s$|^%s_[[:digit:]]+$", drugs_id, drugs_id), ns = pkgname) | ||
|
|
||
| untreated_tag_patterns <- vapply( | ||
| gDRutils::get_env_identifiers("untreated_tag"), | ||
| sprintf, | ||
| fmt = "^%s$", | ||
| character(1) | ||
| ) | ||
| utils::assignInNamespace(".untreated_tag_patterns", untreated_tag_patterns, ns = pkgname) | ||
| utils::assignInNamespace(".untreatedDrugNameRegex", paste(untreated_tag_patterns, collapse = "|"), ns = pkgname) | ||
|
|
||
| # data.table compatible | ||
| utils::assignInNamespace("patterns", data.table:::patterns, ns = pkgname) | ||
| utils::globalVariables( | ||
| c( | ||
| ".", | ||
| "..cotrt_var", | ||
| "..present_ref_cols", | ||
| "..y", | ||
| "bliss_score", | ||
| "column", | ||
| "CorrectedReadout", | ||
| "cotrt_value", | ||
| "Duration", | ||
| "hsa_score", | ||
| "isDay0", | ||
| "LogFoldChange", | ||
| "normalization_type", | ||
| "priority1", | ||
| "priority2", | ||
| "ratio", | ||
| "ReadoutValue", | ||
| "ReadoutValue_T0", | ||
| "record_id", | ||
| "rn", | ||
| "smooth", | ||
| "x", | ||
| "x.N" | ||
| ), | ||
| pkgname) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.