Commit 7cb20fd2 authored by Leon-Charles Tranchevent's avatar Leon-Charles Tranchevent
Browse files

Added GC-RMA support for Affymetrix arrays.

parent fdeae68b
......@@ -14,6 +14,7 @@ Imports:
utils,
stats,
affy,
gcrma,
arrayQualityMetrics,
SCAN.UPC,
massiR,
......
......@@ -47,14 +47,14 @@ preprocess_data <- function(input_data_dir, output_data_file,
batch_filename = batch_filename,
clean_samples = clean_samples,
verbose = verbose)
} else if (method == "RMA") {
eset <- preprocess_data_affymetrix_rma(input_data_dir,
output_data_file,
compressed = compressed,
batch_correction = batch_correction,
batch_filename = batch_filename,
clean_samples = clean_samples,
verbose = verbose)
} else if (method == "GCRMA") {
eset <- preprocess_data_affymetrix_gcrma(input_data_dir,
output_data_file,
compressed = compressed,
batch_correction = batch_correction,
batch_filename = batch_filename,
clean_samples = clean_samples,
verbose = verbose)
}
} else if (platform == "Agilent") {
eset <- preprocess_data_agilent_limma(input_data_dir,
......
#' @title Preprocess an Affymetrix dataset with RMA.
#' @title Preprocess an Affymetrix dataset with GC-RMA.
#'
#' @description This function preprocess an Affymetrix dataset using RMA and saves the
#' results in a given TSV file. In addition, it returns the ESET object.
......@@ -22,7 +22,7 @@
#' @param verbose A boolean representing whether the function should display log information. This
#' is TRUE by default.
#' @return The expression data as an ESET object.
preprocess_data_affymetrix_rma <- function(input_data_dir, output_data_file,
preprocess_data_affymetrix_gcrma <- function(input_data_dir, output_data_file,
compressed = FALSE,
batch_correction = FALSE,
batch_filename = "Batch.tsv",
......@@ -36,7 +36,7 @@ preprocess_data_affymetrix_rma <- function(input_data_dir, output_data_file,
input_data_files <- affy::list.celfiles(raw_data_input_dir, full.names = TRUE)
remove(raw_data_input_dir)
batch <- affy::ReadAffy(filenames = input_data_files, compress = compressed, verbose = verbose)
eset <- affy::rma(batch)
eset <- gcrma::gcrma(batch)
# If necessary, we remove the samples that do not have clinical data.
if (clean_samples) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment