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