run_cor_bootstrap: Run bootstrapping of Spearman correlations within a dataset

View source: R/find_rho_and_var.R

run_cor_bootstrapR Documentation

Run bootstrapping of Spearman correlations within a dataset

Description

This function provides the more low-level functionality of bootstrapping the Spearman correlations of the columns within a dataset. Only use this function if you want a low-level interface, else run_csd provides a more streamlined approach if you want to do a CSD analysis.

Usage

run_cor_bootstrap(
  x,
  n_it = 20L,
  nThreads = 1L,
  verbose = TRUE,
  iterations_gap = 1L
)

Arguments

x

Numeric matrix, the gene expression matrix to analyse. Genes are in columns, samples are in rows.

n_it

Integer, number of bootstrap iterations

nThreads

Integer, number of threads to use for computations

verbose

Logical, should progress be printed?

iterations_gap

If output is verbose - number of iterations after issue a status message (Default=1 - displayed only if verbose=TRUE)

Value

A list with two fields

rho

Numeric matrix constaining the bootstrapped mean of the Spearman correlation between each column

var

Numeric matrix constaining the bootstrapped variance of the Spearman correlation between each column

Examples

data("normal_expression")
cor_res <- run_cor_bootstrap(
    x = normal_expression,
    n_it = 100, nThreads = 2L
)

AlmaasLab/csdR documentation built on Dec. 9, 2022, 6:22 a.m.