LikelihoodMethod.sim_af

LikelihoodMethod.sim_af#

missionbio.demultiplex.dna.likelihood.LikelihoodMethod.sim_af

LikelihoodMethod.sim_af(profiles: DataFrame, num_cells: Sequence[int], adjusted_mixing: float = 0, random_state: Optional[Any] = None) DataFrame#

Simulate allele frequencies for the cells based on the profiles

Parameters:
  • profiles – A dataframe with the celltype in the index, the variants in the columns and the values being one of the possible AFs i.e. 0, 25, 50, 75, 100, -50.

  • num_cells – The number of cells for each celltype in profiles.

  • adjusted_mixing – The adjusted mixing rate to add doublets. If 0, no doublets are added.

  • random_state – The random state for reproducibility.

Returns:

A dataframe with the simulated allele frequencies for the cells


< Class LikelihoodMethod