getGlobalRescalingStats: Calculate several base statistics for color rescaling.

View source: R/getGlobalRescalingStats.R

getGlobalRescalingStatsR Documentation

Calculate several base statistics for color rescaling.

Description

calculates several statistics from a large matrix that can then be applied to smaller submatrices without needing to load the entire matrix into memmory

Usage

getGlobalRescalingStats(whole_matrix, saveToDisk = F, output_fn = NULL)

Arguments

whole_matrix

the whole matrix to get stats for.

saveToDisk

Save the statistics to disk as an RDS file in the local directory?

output_fn

the name of the output file.

Value

A list of the output statistics, including: the global min, max, length, sigma (matrix variance), pos_sigma (variance of the positive values), neg_sigma(variance of the negative values), global mean (global_mu), est_max_cap (global_mu+global_sigma_pos*2), as well as the number of rows and columns of the matrix.

Examples

load(system.file("extdata","nbl_result_matrix_sign_small.rda",package = "CNVScope"))
getGlobalRescalingStats(nbl_result_matrix_sign_small)

CNVScope documentation built on March 31, 2022, 1:07 a.m.