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

A few minor updates based on lintR feedback about coding style.

parent 688d482a
......@@ -19,7 +19,7 @@
#' @param verbose A boolean representing whether the function should display log information. This
#' is FALSE by default.
#' @return NULL
extract_DEGs <- function(fit, limma_coeffs, k, output_data_dir,
extract_degs <- function(fit, limma_coeffs, k, output_data_dir,
file_prefix = "",
file_suffix = "",
pval_adjust_method = "BH",
......
#' @title Loads a table containing clinical data.
#'
#' @description This function loads the clinical data associated with a dataset. It returns an annotated
#' data-frame that contains the clinical data.
#' @description This function loads the clinical data associated with a dataset. It returns an
#' annotated data-frame that contains the clinical data.
#'
#' Note: the function assumes that a TSV file containing the clinical data exists. In
#' particular, it does not check for the existence of folders or files.
#'
#' @param data_dir A string representing the folder that contains the clinical data.
#' @param clinical_file_name A string containing the file name. By default, this is 'ClinicalData.tsv'
#' @param use_factors A boolean stating whether the columns should be read as factors (default FALSE).
#' @param clinical_file_name A string containing the file name. By default, this is
#' 'ClinicalData.tsv'
#' @param use_factors A boolean stating whether the columns should be read as
#' factors (default FALSE).
#' @param verbose A boolean representing whether the function should display log information. This
#' is FALSE by default.
#' is FALSE by default.
#' @return An annotated data-frame that contains the clinical data.
load_clinical_data <- function(data_dir,
clinical_file_name = "ClinicalData.tsv",
......
......@@ -70,7 +70,7 @@ preprocess_data_illumina_beadarray <- function(input_data_dir, output_data_files
probe_status <- ifelse(Biobase::fData(gse_data)$PROBEQUALITY == "No match",
"negative",
"regular")
Biobase::fData(gse_data)$Status <- probe_status
Biobase::fData(gse_data)$Status <- probe_status # nolint
beadarray::Detection(gse_data) <- beadarray::calculateDetection(gse_data,
status = probe_status)
......
......@@ -5,8 +5,8 @@
#'
#' Note: the function does not check for the existence of folders and files.
#'
#' @param probe_list_names A list of strings representing the names of the files to be loaded (without
#' their eventual prefixes / suffixes).
#' @param probe_list_names A list of strings representing the names of the files to be loaded
#' (without their eventual prefixes / suffixes).
#' @param data_dir A string representing the folder that contains the probe data (as TSV files).
#' @param filename_prefix A prefix used by all files (e.g., "mart_export_").
#' @param filename_suffix A suffix used by all files (e.g., ".tsv").
......
......@@ -56,8 +56,8 @@ run_massir <- function(eset, probes, pheno_data,
# We compute simple stats.
cases <- table(data.frame(
Predictions <- cluster_results[[2]]$sex,
Observed <- Biobase::pData(pheno_data)$Gender
predictions <- cluster_results[[2]]$sex,
observed <- Biobase::pData(pheno_data)$Gender
))
acc <- (cases[1, 1] + cases[2, 2]) / sum(cases)
......
#' @title Executes a quality control of a given microarray dataset (preprocessed data).
#'
#' @description This function executes a quality control of the dataset defined by the input parameters.
#' It starts by loading the clinical data associated to annotate the preprocessed data and
#' then runs the quality control of the annotated data. The function assumes that a folder with
#' the clinical data exists. It then creates a report that contains various quality
#' @description This function executes a quality control of the dataset defined by the input
#' parameters. It starts by loading the clinical data associated to annotate the preprocessed
#' data and then runs the quality control of the annotated data. The function assumes that a
#' folder with the clinical data exists. It then creates a report that contains various quality
#' indicators and is stored as an HTML document. It does not return any value.
#'
#' Note: the function does not check for the existence of folders or files.
#'
#' @param eset An ESET object that contains the preprocessed expression data.
#' @param input_data_dir A string representing the folder that contains the input data (clinical data).
#' @param input_data_dir A string representing the folder that contains the input data
#' (clinical data).
#' @param output_data_dir A string representing the folder that will contain the output of the QC.
#' @param phenotype_groups A list of phenotype factor names that can be used to highlight the
#' samples in the QC report. This is none by default.
......
#' @title Executes a quality control of a given microarray dataset (raw data).
#'
#' @description This function executes a quality control of the dataset defined by the input parameters.
#' It currently supports Affymetrix and Agilent arrays although the QC for Agilent produces only
#' a short report currently (mostly array images). This function is just a handler over the platform
#' dedicated functions.
#' @description This function executes a quality control of the dataset defined by the input
#' parameters. It currently supports Affymetrix and Agilent arrays although the QC for Agilent
#' produces only a short report currently (mostly array images). This function is just a handler
#' over the platform dedicated functions.
#'
#' For Affymettrix arrays, it starts by loading the clinical data associated with the dataset, then
#' loads the raw data and last runs the quality control of the annotated data. The function assumes
......
#' @title Executes a quality control of a given Affymetrix microarray dataset (raw data).
#'
#' @description This function executes a quality control of the dataset defined by the input parameters.
#' It starts by loading the clinical data associated with the dataset, then
#' @description This function executes a quality control of the dataset defined by the input
#' parameters. It starts by loading the clinical data associated with the dataset, then
#' loads the raw data and last runs the quality control of the annotated data. The function assumes
#' that a folder with both the clinical data and the raw data exists (in a subfolder '/RAW/'). It
#' then creates a report that contains various quality indicators and is stored as an HTML document.
......
#' @title Executes a quality control of a given Agilent microarray dataset (raw data).
#'
#' @description This function executes a quality control of the dataset defined by the input parameters.
#' It creates a heatmap of the samples (with a dendogram), pca plots (first two components),
#' boxplots of the array densities and array images. It does not return any value.
#' @description This function executes a quality control of the dataset defined by the input
#' parameters. It creates a heatmap of the samples (with a dendogram), pca plots (first two
#' components), boxplots of the array densities and array images. It does not return any value.
#'
#' Note: the function does not check for the existence of folders or files.
#'
......
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