This function reads in a set of files that match the pattern "^N0" and calculates various statistics based on the data in each file. The statistics include the median, mean, variance, minimum, maximum, number of unique values, total number of rows, and percentage of rows per unique value for a specific variable in each file.

calculate_median_statistics(GeneDiscoveRobject = NULL, cores = 1)

Arguments

GeneDiscoveRobject

An object of class GeneDiscoveR. Default is NULL.

cores

The number of cores to use for parallel processing. Default is 1.

Value

A GeneDiscoveR object with the calculated statistics added to the runsData$medians field.

Examples

# Create a GeneDiscoveR object
N0sDir <- system.file("extdata", "N0-1dot3-6", package = "GeneDiscoveR")
overallsDir <- system.file("extdata", "Comparatives-1dot3-6", package = "GeneDiscoveR")
dataFile <- system.file("extdata", "annotatedCDSs.tsv", package = "GeneDiscoveR")
minInflation <- 1.3
maxInflation <- 6
stepInflation <- 0.1

GeneDiscoveRobject <- GeneDiscoveR(overallsDir = overallsDir, N0sDir = N0sDir, dataFile = dataFile, minInflation = minInflation, maxInflation = maxInflation, stepInflation = stepInflation)

# Calculate median statistics
GeneDiscoveRobject <- calculate_median_statistics(GeneDiscoveRobject, cores = 8)