Extracts regression coefficients from TOP posterior samples

extract_TOP_coef_samples(
  TOP_samples,
  tf_cell_combos,
  assembled_training_data,
  tf_name,
  cell_type,
  n_bins = 5,
  level = c("bottom", "middle", "top")
)

Arguments

TOP_samples

TOP samples combined from all partitions using the combine_TOP_samples() function.

tf_cell_combos

A table with the indices and names of TF and cell type combinations from the assembled training data. If missing, will create the table using assembled_training_data.

assembled_training_data

Assembled training data as in the assemble_training_data() function.

tf_name

TF name.

cell_type

Cell type.

n_bins

Number of DNase or ATAC bins in TOP model (default = 5).

level

The level in the TOP model (options: ‘bottom’, ‘middle’, or ‘top’). ‘bottom’ level: TF- and cell-type- specific; ‘middle’ level: TF-specific, cell-type generic; ‘top’ level: TF-generic

Value

A data frame of posterior samples for TOP's regression coefficients.

Examples

if (FALSE) {
TOP_coef_samples <- extract_TOP_coef_samples(TOP_samples,
                                             assembled_training_data = assembled_training_data)
# or
tf_cell_combos <- extract_tf_cell_combos(assembled_training_data)
TOP_coef_samples <- extract_TOP_coef_samples(TOP_samples,
                                             tf_cell_combos = tf_cell_combos)
}