Tutorials

Worked examples of TwINFER, rendered from the notebooks in tutorials/. They run with the data in the repository; see Installation to set them up.

Simulation

Simulate a population of twin cells with a known gene regulatory network, using twinfer.simulation.

  • Simulating twin data: the connectivity matrix, the parameter file, the configuration dictionary, running the Gillespie simulation, the output, and confirming steady state.

Inference on simulated twins

Score gene pairs of the example simulation (gene 1 activates gene 2, 6,000 twin pairs) with infer_with_twinfer().

  • One time point: the three z-scores and the covariance decomposition, the inference scenarios, the effect of the number of twin pairs, network plots.

  • Two time points: twins measured at 1 and 20 hours, cross-time correlation and the direction of regulation, which pairs to test, ranked lists, directed networks.

Real data

Score lineage-tracing data with clones of any size.

  • Lineage-traced single cells: LARRY, mouse haematopoiesis, days 2, 4, 6. From an AnnData object with clone labels to the input table, Benjamini-Hochberg-corrected scores, inference scenarios, ranked gene pairs, networks, several samples.

  • From 10x output to TwINFER input: a template from 10x output and a barcode / clone table to the input table, with normalisation.