Perturbation API reference#

Pooled single-cell CRISPR screens, such as Perturb-seq, CROP-seq, ECCITE-seq and 10x CRISPR Guide Capture, give each cell guide RNAs that switch one target gene off or on, and capture the guides beside the transcriptome. CyteArc imports the guide counts as an assay declared CRISPR. Guide calling decides which guides each cell carries, since every cell also holds a few ambient guide molecules; cytearc.perturbation holds the record of those calls.

The steps run on a DataStore. ds.perturbation.import_guide_calls saves Cell Ranger’s calls from protospacer_calls_per_cell.csv as a guide_calls artifact, ds.perturbation.load_guide_calls reads that artifact as a GuideCalls record, and ds.plots.guide_calls plots how many guides each cell carries and how many cells carry each guide.

A guide_calls artifact labels each cell with its one called guide, with "Negative" when no guide is called, and with "Multiple" when several are. The labels group cells like cluster labels do, so ds.select_cells(calls, include=["GUIDE-1"]) selects the cells of one guide and plots colour cells by their call; ds.select_cells(calls, value="n_guides", low=1, high=1, keep_bounds=True) keeps the cells with exactly one called guide. Read per-cell values lists the artifact’s arrays.

Guide calls#

class cytearc.perturbation.GuideCalls(cells, calls, guides, source)#

The guide calls of a set of cells, read from a guide_calls artifact.

cells#

One row per cell, indexed by cell ids, with call (the ID of a cell’s one called guide, "Negative", or "Multiple"), n_guides, top_guide (an empty string for a cell with no guide UMIs), top_umi, top_fraction (NaN for a cell with no guide UMIs) and total_umi.

calls#

One row per called guide of a cell, with the cell’s ids, the guide and its umis, most UMIs first within each cell.

guides#

The ID of every guide of the assay, in assay order, including guides called in no cell.

source#

The operation that made the calls: "import_guide_calls" for Cell Ranger’s calls.