Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhang503 committed Jun 5, 2019
0 parents commit 55a283e
Show file tree
Hide file tree
Showing 19 changed files with 825 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^proteoQDA\.Rproj$
^\.Rproj\.user$
2 changes: 2 additions & 0 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dir()
save(filelist[i], file = file.path("C:\\Results\\R\\proteoQDA\\data", paste0(filelist[i], ".rda")))
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.Rproj.user
13 changes: 13 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Package: proteoQDA
Title: Data employed in the vignette of the proteoQ package
Version: 0.0.0.9000
Authors@R:
person(given = "Qiang",
family = "Zhang",
role = c("aut", "cre"),
email = "qzhang503@gmail.com")
Description: This package stores the data employed in the vignette of the proteoQ package.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Generated by roxygen2: do not edit by hand

export(copy_expt)
export(copy_frac)
export(copy_globalCPTAC)
48 changes: 48 additions & 0 deletions R/globalCPTAC.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#' Copy Mascot \code{.csv} files
#'
#' \code{copy_globalCPTAC} copies the \code{.csv} files from Mascot searches to
#' a target directory.
#' @export
copy_globalCPTAC <- function(dat_dir) {
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 \code{expt_smry.xlsx}
#'
#' \code{copy_expt} copies the \code{expt_smry.xlsx} to a target directory.
#' @export
copy_expt <- function(dat_dir) {
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 <- gsub("/", "\\\\", filepath)
file.copy(from = filepath, to = file.path(dat_dir, "expt_smry.xlsx"))
}


#' Copy \code{frac_smry.xlsx}
#'
#' \code{copy_frac} copies the \code{expt_smry.xlsx} to a target directory.
#' @export
copy_frac <- function(dat_dir) {
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 <- gsub("/", "\\\\", filepath)
file.copy(from = filepath, to = file.path(dat_dir, "frac_smry.xlsx"))
}

Loading

0 comments on commit 55a283e

Please sign in to comment.