Checks and prepares input data for stoic to run properly. In particular, it pre-computes the correlation matrix between samples in the main data, and a reduced space of the main data for visualization purposes.

stoic_data(
  main_data,
  guide_data,
  seed = NULL,
  sample_order = stats::setNames(1:ncol(main_data), colnames(main_data))
)

Arguments

main_data

Main data matrix (n_obs * n_samples) in which observations are to be clustered. Observations IDs should be the rownames.

guide_data

Guide data matrix (n_obs * n_features) to be used to guide the clustering of the main data. Observations IDs should be the rownames and match the IDs of the main data.

seed

Random seed (Default is NULL).

sample_order

order of the samples in main data (optional), for visualization purposes. It can be numerical or alphanumerical.

Value

A list containing the necessary data to run stoic.

Examples

data("neuron_diff")
data <- stoic_data(main_data = neuron_diff$main_data,
                   guide_data = neuron_diff$guide_data,
                   sample_order = neuron_diff$sample_order)