diff --git a/NAMESPACE b/NAMESPACE index 71c663f..5b6401e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,11 @@ # Generated by roxygen2: do not edit by hand +export(copy_csv) export(copy_expt) export(copy_frac) -export(copy_globalCPTAC) +export(cptac_csv_1) +export(cptac_csv_2) +export(cptac_expt_1) +export(cptac_expt_2) +export(cptac_frac_1) +export(cptac_frac_2) diff --git a/R/globalCPTAC.R b/R/globalCPTAC.R index 047a412..8ad5fde 100644 --- a/R/globalCPTAC.R +++ b/R/globalCPTAC.R @@ -1,48 +1,98 @@ #' Copy Mascot \code{.csv} files #' -#' \code{copy_globalCPTAC} copies the \code{.csv} files from Mascot searches to -#' a target directory. +#' \code{copy_dat} copies the Mascot outputs of \code{.csv} files to a target +#' directory. #' @export -copy_globalCPTAC <- function(dat_dir) { +copy_csv <- function(dat_dir, filelist) { dir.create(file.path(dat_dir), recursive = TRUE, showWarnings = FALSE) - filelist <- c("F003481", "F003485", "F003486", "F003487", "F003488", "F003510") data(list = filelist, package = "proteoQDA", envir = environment()) for (i in seq_along(filelist)) { fileConn <- file(file.path(dat_dir, paste0(filelist[i], ".csv"))) df <- get(filelist[i]) - writeLines(df, fileConn) close(fileConn) } } +#' Copy Mascot \code{.csv} files +#' +#' @export +cptac_csv_1 <- function(dat_dir) { + copy_csv(dat_dir, filelist = c("F003481", "F003485", "F003486", "F003487", "F003488", "F003510")) +} + + +#' Copy Mascot \code{.csv} files +#' +#' @export +cptac_csv_2 <- function(dat_dir) { + copy_csv(dat_dir, filelist = c("F003529", "F003530", "F003531", "F003532", "F003533", "F003534")) +} + + + #' Copy \code{expt_smry.xlsx} #' #' \code{copy_expt} copies the \code{expt_smry.xlsx} to a target directory. #' @export -copy_expt <- function(dat_dir) { +copy_expt <- function(dat_dir, filename = "expt_smry.xlsx") { dir.create(file.path(dat_dir), recursive = TRUE, showWarnings = FALSE) - filepath <- system.file("extdata", "expt_smry.xlsx", package = "proteoQ") - if (nchar(filepath) == 0) stop("Load `library(proteoQ)` first.") + filepath <- system.file("extdata", filename, package = "proteoQDA") + # if (nchar(filepath) == 0) stop("Load `library(proteoQ)` first.") filepath <- gsub("/", "\\\\", filepath) file.copy(from = filepath, to = file.path(dat_dir, "expt_smry.xlsx")) } +#' Copy \code{expt_smry.xlsx} +#' +#' @export +cptac_expt_1 <- function(dat_dir) { + copy_expt(dat_dir, "expt_smry_cptac_gl.xlsx") +} + + +#' Copy \code{expt_smry.xlsx} +#' +#' @export +cptac_expt_2 <- function(dat_dir) { + copy_expt(dat_dir, "expt_smry_cptac_cmbn.xlsx") +} + + + #' Copy \code{frac_smry.xlsx} #' -#' \code{copy_frac} copies the \code{expt_smry.xlsx} to a target directory. +#' \code{copy_frac} copies the \code{frac_smry.xlsx} to a target directory. #' @export -copy_frac <- function(dat_dir) { +copy_frac <- function(dat_dir, filename = "frac_smry.xlsx") { dir.create(file.path(dat_dir), recursive = TRUE, showWarnings = FALSE) - filepath <- system.file("extdata", "frac_smry.xlsx", package = "proteoQ") - if (nchar(filepath) == 0) stop("Load `library(proteoQ)` first.") + filepath <- system.file("extdata", filename, package = "proteoQDA") + # if (nchar(filepath) == 0) stop("Load `library(proteoQ)` first.") filepath <- gsub("/", "\\\\", filepath) file.copy(from = filepath, to = file.path(dat_dir, "frac_smry.xlsx")) } + +#' Copy \code{frac_smry.xlsx} +#' +#' @export +cptac_frac_1 <- function(dat_dir) { + copy_frac(dat_dir, "frac_smry_cptac_gl.xlsx") +} + + +#' Copy \code{frac_smry.xlsx} +#' +#' @export +cptac_frac_2 <- function(dat_dir) { + copy_frac(dat_dir, "frac_smry_cptac_cmbn.xlsx") +} + + + diff --git a/data/F003529.rda b/data/F003529.rda new file mode 100644 index 0000000..d0f054d Binary files /dev/null and b/data/F003529.rda differ diff --git a/data/F003530.rda b/data/F003530.rda new file mode 100644 index 0000000..ab6334d Binary files /dev/null and b/data/F003530.rda differ diff --git a/data/F003531.rda b/data/F003531.rda new file mode 100644 index 0000000..22df8f3 Binary files /dev/null and b/data/F003531.rda differ diff --git a/data/F003532.rda b/data/F003532.rda new file mode 100644 index 0000000..f4adb0b Binary files /dev/null and b/data/F003532.rda differ diff --git a/data/F003533.rda b/data/F003533.rda new file mode 100644 index 0000000..a707257 Binary files /dev/null and b/data/F003533.rda differ diff --git a/data/F003534.rda b/data/F003534.rda new file mode 100644 index 0000000..007adbc Binary files /dev/null and b/data/F003534.rda differ diff --git a/inst/extdata/expt_smry_cptac_cmbn.xlsx b/inst/extdata/expt_smry_cptac_cmbn.xlsx new file mode 100644 index 0000000..c65a070 Binary files /dev/null and b/inst/extdata/expt_smry_cptac_cmbn.xlsx differ diff --git a/inst/extdata/expt_smry_cptac_gl.xlsx b/inst/extdata/expt_smry_cptac_gl.xlsx new file mode 100644 index 0000000..daf4546 Binary files /dev/null and b/inst/extdata/expt_smry_cptac_gl.xlsx differ diff --git a/inst/extdata/frac_smry_cptac_cmbn.xlsx b/inst/extdata/frac_smry_cptac_cmbn.xlsx new file mode 100644 index 0000000..1032739 Binary files /dev/null and b/inst/extdata/frac_smry_cptac_cmbn.xlsx differ diff --git a/inst/extdata/frac_smry_cptac_gl.xlsx b/inst/extdata/frac_smry_cptac_gl.xlsx new file mode 100644 index 0000000..7f0b3dc Binary files /dev/null and b/inst/extdata/frac_smry_cptac_gl.xlsx differ diff --git a/man/copy_csv.Rd b/man/copy_csv.Rd new file mode 100644 index 0000000..b1c97c5 --- /dev/null +++ b/man/copy_csv.Rd @@ -0,0 +1,12 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/globalCPTAC.R +\name{copy_csv} +\alias{copy_csv} +\title{Copy Mascot \code{.csv} files} +\usage{ +copy_csv(dat_dir, filelist) +} +\description{ +\code{copy_dat} copies the Mascot outputs of \code{.csv} files to a target +directory. +} diff --git a/man/copy_expt.Rd b/man/copy_expt.Rd index 127b7b5..904c478 100644 --- a/man/copy_expt.Rd +++ b/man/copy_expt.Rd @@ -4,7 +4,7 @@ \alias{copy_expt} \title{Copy \code{expt_smry.xlsx}} \usage{ -copy_expt(dat_dir) +copy_expt(dat_dir, filename = "expt_smry.xlsx") } \description{ \code{copy_expt} copies the \code{expt_smry.xlsx} to a target directory. diff --git a/man/copy_frac.Rd b/man/copy_frac.Rd index f95ee90..fbb25aa 100644 --- a/man/copy_frac.Rd +++ b/man/copy_frac.Rd @@ -4,8 +4,8 @@ \alias{copy_frac} \title{Copy \code{frac_smry.xlsx}} \usage{ -copy_frac(dat_dir) +copy_frac(dat_dir, filename = "frac_smry.xlsx") } \description{ -\code{copy_frac} copies the \code{expt_smry.xlsx} to a target directory. +\code{copy_frac} copies the \code{frac_smry.xlsx} to a target directory. } diff --git a/man/copy_globalCPTAC.Rd b/man/copy_globalCPTAC.Rd deleted file mode 100644 index b2db8d8..0000000 --- a/man/copy_globalCPTAC.Rd +++ /dev/null @@ -1,12 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/globalCPTAC.R -\name{copy_globalCPTAC} -\alias{copy_globalCPTAC} -\title{Copy Mascot \code{.csv} files} -\usage{ -copy_globalCPTAC(dat_dir) -} -\description{ -\code{copy_globalCPTAC} copies the \code{.csv} files from Mascot searches to -a target directory. -} diff --git a/man/cptac_csv_1.Rd b/man/cptac_csv_1.Rd new file mode 100644 index 0000000..d5b8d84 --- /dev/null +++ b/man/cptac_csv_1.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/globalCPTAC.R +\name{cptac_csv_1} +\alias{cptac_csv_1} +\title{Copy Mascot \code{.csv} files} +\usage{ +cptac_csv_1(dat_dir) +} +\description{ +Copy Mascot \code{.csv} files +} diff --git a/man/cptac_csv_2.Rd b/man/cptac_csv_2.Rd new file mode 100644 index 0000000..5e30332 --- /dev/null +++ b/man/cptac_csv_2.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/globalCPTAC.R +\name{cptac_csv_2} +\alias{cptac_csv_2} +\title{Copy Mascot \code{.csv} files} +\usage{ +cptac_csv_2(dat_dir) +} +\description{ +Copy Mascot \code{.csv} files +} diff --git a/man/cptac_expt_1.Rd b/man/cptac_expt_1.Rd new file mode 100644 index 0000000..7d99670 --- /dev/null +++ b/man/cptac_expt_1.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/globalCPTAC.R +\name{cptac_expt_1} +\alias{cptac_expt_1} +\title{Copy \code{expt_smry.xlsx}} +\usage{ +cptac_expt_1(dat_dir) +} +\description{ +Copy \code{expt_smry.xlsx} +} diff --git a/man/cptac_expt_2.Rd b/man/cptac_expt_2.Rd new file mode 100644 index 0000000..3b9f2c6 --- /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 \code{expt_smry.xlsx}} +\usage{ +cptac_expt_2(dat_dir) +} +\description{ +Copy \code{expt_smry.xlsx} +} diff --git a/man/cptac_frac_1.Rd b/man/cptac_frac_1.Rd new file mode 100644 index 0000000..9f571c2 --- /dev/null +++ b/man/cptac_frac_1.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/globalCPTAC.R +\name{cptac_frac_1} +\alias{cptac_frac_1} +\title{Copy \code{frac_smry.xlsx}} +\usage{ +cptac_frac_1(dat_dir) +} +\description{ +Copy \code{frac_smry.xlsx} +} diff --git a/man/cptac_frac_2.Rd b/man/cptac_frac_2.Rd new file mode 100644 index 0000000..8edc44d --- /dev/null +++ b/man/cptac_frac_2.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/globalCPTAC.R +\name{cptac_frac_2} +\alias{cptac_frac_2} +\title{Copy \code{frac_smry.xlsx}} +\usage{ +cptac_frac_2(dat_dir) +} +\description{ +Copy \code{frac_smry.xlsx} +}