|
a |
|
b/R/auxiliary_functions.R |
|
|
1 |
|
|
|
2 |
#' Get file basename and remove .CEL extension |
|
|
3 |
#' |
|
|
4 |
#' Functions as \code{\link{basename}} but also remove any \code{.CEL} |
|
|
5 |
#' or \code{.CEL.gz} extension. The function is not case sensitive of toward |
|
|
6 |
#' the extension. |
|
|
7 |
#' |
|
|
8 |
#' @param x A \code{character} vector of filenames and possibly with path. |
|
|
9 |
#' @return A \code{character} vector of the same length as \code{x} with the |
|
|
10 |
#' file basename without the path and \code{.CEL} extension. |
|
|
11 |
#' @seealso \code{\link{basename}} |
|
|
12 |
#' @examples |
|
|
13 |
#' x <- c("C:/test/mycelfile.cel", "myothercelfile.cel") |
|
|
14 |
#' basenameSansCEL(x) |
|
|
15 |
#' @export |
|
|
16 |
basenameSansCEL <- function(x) { |
|
|
17 |
return(gsub("\\.cel$|\\.cel.gz$", "", basename(x), ignore.case = TRUE)) |
|
|
18 |
} |
|
|
19 |
|
|
|
20 |
getAffyTargets <- function() { |
|
|
21 |
message("Many 'older' arrays don't use targets.") |
|
|
22 |
return(c("core", "full", "probesets")) |
|
|
23 |
} |
|
|
24 |
|
|
|
25 |
gpl2affy <- function(gpl) { |
|
|
26 |
affy <- gpl |
|
|
27 |
affy <- gsub("GPL570", "hgu133plus2", affy) |
|
|
28 |
affy <- gsub("GPL96", "hgu133a", affy) |
|
|
29 |
affy <- gsub("GPL97", "hgu133b", affy) |
|
|
30 |
affy <- gsub("GPL5175", "huex10st", affy) |
|
|
31 |
affy <- gsub("GPL5175", "huex10st", affy) |
|
|
32 |
affy <- gsub("GPL6244", "hugene10st", affy) |
|
|
33 |
return(affy) |
|
|
34 |
} |