Skip to content

Commit

Permalink
Update calling functions to data sets
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhang503 committed Jun 14, 2019
1 parent 2448373 commit 76ba0c7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(copy_frac)
export(cptac_csv_1)
export(cptac_csv_2)
export(cptac_expt_1)
export(cptac_expt_2)
export(cptac_expt_ref_w2)
export(cptac_frac_1)
export(cptac_frac_2)
Expand Down
19 changes: 13 additions & 6 deletions R/globalCPTAC.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ cptac_expt_1 <- function(dat_dir) {
}


#' Copy an \code{expt_smry...} file to \code{dat_dir}
#'
#' @export
cptac_expt_2 <- function(dat_dir) {
copy_expt(dat_dir, "expt_smry_cptac_cmbn.xlsx", "expt_smry.xlsx")
}


#' Copy an \code{expt_smry...} file to \code{dat_dir}
#'
#' @export
Expand All @@ -77,29 +85,28 @@ expt_smry_ref_w2_w16 <- function(dat_dir) {
#'
#' \code{copy_frac} copies the \code{frac_smry.xlsx} to a target directory.
#' @export
copy_frac <- function(dat_dir, filename = "frac_smry.xlsx") {
copy_frac <- function(dat_dir, from = "frac_smry.xlsx", to = "frac_smry.xlsx") {
dir.create(file.path(dat_dir), recursive = TRUE, showWarnings = FALSE)

filepath <- system.file("extdata", filename, package = "proteoQDA")
# if (nchar(filepath) == 0) stop("Load `library(proteoQ)` first.")
filepath <- system.file("extdata", from, package = "proteoQDA")
filepath <- gsub("/", "\\\\", filepath)
file.copy(from = filepath, to = file.path(dat_dir, "frac_smry.xlsx"))
file.copy(from = filepath, to = file.path(dat_dir, to))
}


#' Copy \code{frac_smry.xlsx}
#'
#' @export
cptac_frac_1 <- function(dat_dir) {
copy_frac(dat_dir, "frac_smry_cptac_gl.xlsx")
copy_frac(dat_dir, "frac_smry_cptac_gl.xlsx", "frac_smry.xlsx")
}


#' Copy \code{frac_smry.xlsx}
#'
#' @export
cptac_frac_2 <- function(dat_dir) {
copy_frac(dat_dir, "frac_smry_cptac_cmbn.xlsx")
copy_frac(dat_dir, "frac_smry_cptac_cmbn.xlsx", "frac_smry.xlsx")
}


Expand Down
Binary file modified inst/extdata/expt_smry_cptac_cmbn.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion man/copy_frac.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions man/cptac_expt_2.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 76ba0c7

Please sign in to comment.