a python module for generate cell / guide matrices for demultiplex testing.
pip install muxsim
Muxsim is expected to be used as a python module. It has reasonable defaults for most use cases, but can be configured to your liking.
Here is a simple example of how to use muxsim:
from muxsim import MuxSim
ms = MuxSim()
matrix = ms.sample()
The sampling scheme can be fully parameterized like so:
from muxsim import MuxSim
ms = MuxSim(
num_cells=10000,
num_guides=100,
n=10.0,
p=0.1,
λ=0.8,
random_state=42,
)
matrix = ms.sample()
The simulator, muxsim
, is based on a Multinomial distribution, where the number of draws
The frequencies of the multinomial distribution are cell specific and sum to 1:
The background frequencies are assumed to be equiprobable (where
The signal guides are chosen randomly from the guide set where the number of choices is equal to the MOI of that cell:
This allows us to then set the the signal guides at a rate
Which can then be turned into the frequency matrix:
Which forces