tomas.infer.ratios_bc

tomas.infer.ratios_bc(adata_mg, dblgroup, max_iter=100, tol=0.001, n_logR=100, n_p=1000, warm_start=False, verbose=0, verbose_interval=2)

Infer the total-mRNA ratio between two cell types given the heterotypic doublets composed by the two cell types.

Parameters:
  • adata_mg (AnnData) – The UMI count matrix of hetero-doublets in metagenes. Rows correspond to droplets and columns to metagenes.

  • dblgroup (str) – Name of the heterotypic doublets in the form of ‘A_B’.

  • max_iter (int, optional) – The maximal number of iterations to perform. The default is 20.

  • tol (float, optional) – The convergence threshold. The iterations will stop when the lower bound log-likelihood gain is below this threshold. The default is 1e-3.

  • n_logR (int, optional) – The number of R to be sampled per time. The default is 100.

  • n_p (int, optional) – The number of p to be sampled per time. The default is 1000.

  • warm_start (bool, optional) – If “warm_start” is True, the parameters of the last running is used as initialization for the current call. The default is False.

  • verbose (bool, optional) – Enable verbose output. The default is 0, which means no output printed. If 1 then it prints the log-likelihood gain and time lapse for iteration step.

  • verbose_interval (int, optional) – Number of iteration done before the next print. The default is 2.

Return type:

None. The results are saved in .uns[‘ratio’] of the input AnnData.