scanpy.external.tl.sandbag

scanpy.external.tl.sandbag(adata, annotation, gene_names, sample_names, fraction=0.65, filter_genes=None, filter_samples=None)

Generate pairs of genes [Scialdone15] [Fechtner18].

Calculates the pairs of genes serving as marker pairs for each phase, based on a matrix of gene counts and an annotation of known phases.

This reproduces the approach of [Scialdone15] in the implementation of [Fechtner18].

More information and bug reports here.

Parameters:
adata : AnnData

The annotated data matrix.

categories : dict

Dictionary of lists, i.e. {phase: [sample, …]}, containing annotation of samples to their phase

gene_names : list

List of genes.

sample_names : list

List of samples.

fraction : float, optional (default: 0.5)

Fraction to be used as threshold.

filter_genes : list or None, optional (default: None)

Genes for sampling the reference set. Default is all genes.

filter_samples : list or None, optional (default: None)

Cells for sampling the reference set. Default is all samples.

Returns:

  • dict of list of tuple, i.e.
  • {phase ([(Gene1, Gene2), …]},)
  • containing marker pairs per phase