diff --git a/NAMESPACE b/NAMESPACE index 0675acd..d8a9592 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) diff --git a/R/globalCPTAC.R b/R/globalCPTAC.R index 0e66789..77a788d 100644 --- a/R/globalCPTAC.R +++ b/R/globalCPTAC.R @@ -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 @@ -77,13 +85,12 @@ 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)) } @@ -91,7 +98,7 @@ copy_frac <- function(dat_dir, filename = "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") } @@ -99,7 +106,7 @@ cptac_frac_1 <- function(dat_dir) { #' #' @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") } diff --git a/inst/extdata/expt_smry_cptac_cmbn.xlsx b/inst/extdata/expt_smry_cptac_cmbn.xlsx index 16f87a6..0ad82dc 100644 Binary files a/inst/extdata/expt_smry_cptac_cmbn.xlsx and b/inst/extdata/expt_smry_cptac_cmbn.xlsx differ diff --git a/man/copy_frac.Rd b/man/copy_frac.Rd index fbb25aa..6f8c896 100644 --- a/man/copy_frac.Rd +++ b/man/copy_frac.Rd @@ -4,7 +4,7 @@ \alias{copy_frac} \title{Copy \code{frac_smry.xlsx}} \usage{ -copy_frac(dat_dir, filename = "frac_smry.xlsx") +copy_frac(dat_dir, from = "frac_smry.xlsx", to = "frac_smry.xlsx") } \description{ \code{copy_frac} copies the \code{frac_smry.xlsx} to a target directory. diff --git a/man/cptac_expt_2.Rd b/man/cptac_expt_2.Rd new file mode 100644 index 0000000..fee2599 --- /dev/null +++ b/man/cptac_expt_2.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/globalCPTAC.R +\name{cptac_expt_2} +\alias{cptac_expt_2} +\title{Copy an \code{expt_smry...} file to \code{dat_dir}} +\usage{ +cptac_expt_2(dat_dir) +} +\description{ +Copy an \code{expt_smry...} file to \code{dat_dir} +}