Skip to contents

Given a full data_list, subsamples of that data_list, and a row of a settings matrix that outlines how the data should be clustered, calculates across all subsamples the number of times that any pair of patients were in the same subsample as well as the number of times they were in the same cluster. These two pieces of information are stored as matrices that can be supplied to the cocluster_heatmap and pooled_cocluster_heatmap functions.

Usage

generate_cocluster_data(data_list, data_list_subsamples, settings_matrix_row)

Arguments

data_list

A nested list of input data from generate_data_list().

data_list_subsamples

A list of subsampled forms of the data_list (see ?subsample_data_list).

settings_matrix_row

A single row of the settings matrix to calculate co-clustering data for.

Value

cocluster_data A named list containing two matrices:

  • "same_solution": A patient x patient matrix where each cell is the number of subsamples that contained both of those patients

  • "same_cluster": A patient x patient matrix where each cell is the number of subsamples where those patients were clustered together