Skip to contents

This function is used to generate the standard input files for MICA (Mutual Information-based Clustering Analysis) from a sparse eset object. It supports two file formats, ".txt" or ".h5ad". To generate a ".h5ad" file, the "anndata" package is required.

Usage

generateMICAinput(
  input_eset,
  output_file,
  overwrite = F,
  downSample_N = NULL,
  seed = 1
)

Arguments

input_eset

The sparse eset object to generate MICA input from. It must be normalized and log-transformed.

output_file

The output file, or MICA input file. Should be in either ".txt" or ".h5ad" format.

overwrite

Logical, whether to overwrite the output_file if it already exists. Default: FALSE.

downSample_N

A non-negative integer or NULL, number of cells to downsample to. Default: NULL.

seed

Integer or NULL, the seed for sampling. Default: 1. Ignored if downSample_N = NULL.

Value

A .txt or .h5ad file that can be used as the MICA input

Examples

if (FALSE) { # \dontrun{
generateMICAinput(input_eset = pbmc14k_expression.eset,
                  output_file = "/work-path/PBMC14k/MICA/micaInput.txt",
                  overwrite = FALSE)
} # }