Skip to content

Commit

Permalink
Remove getwd occurrences
Browse files Browse the repository at this point in the history
  • Loading branch information
iblacksand committed Jun 25, 2024
1 parent 00cdb46 commit 61ecfea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 1.0.4
Date: 2024-06-18 18:58:59 UTC
SHA: 584cc5189e1e0674fdbb7b28fedda3b4de5a2d87
Version: 1.0.5
Date: 2024-06-24 15:36:09 UTC
SHA: 00cdb469de694c5f9742ef1cc9cbf2f293296775
6 changes: 2 additions & 4 deletions R/clinicalomicsdbR.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ clinicalomicsdbR <- R6Class("clinicalomicsdbR", list(
#' @param output_dir Directory to download files to.
#' @return unmodifed clinicalomicsdbR object
download = function(output_dir) {
cidr <- getwd()
dir.create(file.path(cidr, output_dir), recursive = TRUE, showWarnings = FALSE)
dir.create(output_dir, recursive = TRUE, showWarnings = FALSE)
for (study_id in self$study_list) {
dl_url <- self$get_download_url(study_id)
message(paste0("Downloading study ", study_id, " from ", dl_url))
Expand All @@ -94,8 +93,7 @@ clinicalomicsdbR <- R6Class("clinicalomicsdbR", list(
#' @param output_dir Directory to download files to.
#' @return unmodifed clinicalomicsdbR object
download_from_id = function(study_id) {
cidr <- getwd()
dir.create(file.path(cidr, output_dir), recursive = TRUE, showWarnings = FALSE)
dir.create(output_dir, recursive = TRUE, showWarnings = FALSE)
dl_url <- self$get_download_url(study_id)
tryCatch(
{
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ See Examples below to see how to use.
- `new()` - Create new clinicalomicsdbR object. Needed before any other
function
- `filter(drugs, cancers)` - filters studies matching provided
arugments. `drugs` is a list and can be individual drugs or
arguments. `drugs` is a list and can be individual drugs or
combinations. See the ClinicalOmicsDB website for all options.
`cancers` can contain multiple cancers.
- `download(output_dir)` - downloads all studies from `filter()` into
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ See Examples below to see how to use.
- `new()` - Create new clinicalomicsdbR object. Needed before any other
function
- `filter(drugs, cancers)` - filters studies matching provided
arugments. `drugs` is a list and can be individual drugs or
arguments. `drugs` is a list and can be individual drugs or
combinations. See the ClinicalOmicsDB website for all options.
`cancers` can contain multiple cancers.
- `download(output_dir)` - downloads all studies from `filter()` into
Expand Down

0 comments on commit 61ecfea

Please sign in to comment.