scglue.data.estimate_balancing_weight

scglue.data.estimate_balancing_weight(*adatas, use_rep=None, use_batch=None, resolution=1.0, cutoff=0.5, power=4.0, key_added='balancing_weight')[源代码]

Estimate balancing weights in an unsupervised manner

参数:
  • *adatas (AnnData) – Datasets to be balanced

  • use_rep (typing.Optional[str]) – Data representation based on which to match clusters

  • use_batch (typing.Optional[str]) – Estimate balancing per batch (batch keys and categories must match across all datasets)

  • resolution (float) – Leiden clustering resolution

  • cutoff (float) – Cosine similarity cutoff

  • power (float) – Cosine similarity power (for increasing contrast)

  • key_added (str) – New obs key added for the balancing weight

返回类型:

None

备注

While the joint similarity array would have a size of \(K^n\) (where \(K\) is the average number of clusters per dataset, and \(n\) is the number of datasets), a sparse implementation was used, so the scalability regarding dataset number should be good.