The simplification here is that all objects (mat, gstat, marker gset, cgraph, coclust, mc, mc2d) will have the same ID and will be produced linerly without much questions asked. Also the parameters are simplified for typical use in small datasets.

mcell_pipe_mat2mc2d(
  mat_id,
  T_vm = 0.2,
  T_tot = 200,
  T_top3 = 3,
  Knn = 120,
  n_resamp = 500,
  T_weight = round(n_resamp * 0.75/8)
)

Arguments

mat_id

the id to start from

T_vm

threshold on normalized varmin, for selecting markers. Lower this is you don't get enough info from the selected markers. (0.2)

T_tot

threshold on minimal total expression for markers (200)

T_top3

threshold on minimal number of genes in the top3 expressing cells for markers (3)

Knn

the raw Knn parameter used for constructing a balanced Knn graph. This should be set to roughly the size of desired metacells (120)

n_resamp

number of bootstraps (500). Decrease to save time.

T_weight

number of co-clustering occurences in bootstrap to add an edge in the phase of generating metacells from the bootstrap co-clustering matrix.