api reference#

read and write: io#

Read and integrate the ouput data produced by 10x Genomics’ CellRanger, load and save integrated AnnData objects to h5ad-formatted files, and concatenate multiple AnnData objects.

Tip

All of the methods in io are also available directly from scab itself, so scab.read_10x_mtx() is identical to scab.io.read_10x_mtx(). This was done to make the API more consistent with scanpy.

Each function is designed to replicate the behavior of their scanpy or anndata equivalent, but to add necessary fuctionality to accomodate BCR and/or TCR sequence data. For example, BCR/TCR annotations cannot be writted to h5ad-formatted files, so scab.save() will serialize them prior to saving, and de-serialize when loading with scab.load().

read_10x_mtx

Reads 10x Genomics data into an integrated AnnData object.

load

Loads a serialized AnnData object.

save

Serializes and saves an AnnData object to disk in h5ad format.

concat

Concatenates AnnData objects using anndata.concat().

preprocessing: pp#

Filtering and normalization of GEX data, doublet detection and removal.

filter_and_normalize

performs quality filtering and normalization of 10x Genomics count data

remove_doublets

Removes doublets.

scrublet

Predicts doublets using scrublet [Wolock19].

doubletdetection

Predicts doublets using doubletdetection [Gayoso20].

tools: tl#

Filtering and normalization of GEX data, doublet detection and removal.

batch correction#

combat

Batch effect correction using ComBat [Johnson07].

harmony

Data integration and batch correction using mutual nearest neighbors [Haghverdi19].

mnn

Data integration and batch correction using mutual nearest neighbors [Haghverdi19].

scanorama

Batch correction using Scanorama [Hie19].

cell hashes#

demultiplex

Demultiplexes cells using cell hashes.

clonality#

clonify

Assigns BCR sequences to clonal lineages using the clonify [Briney16] algorithm.

embeddings#

pca

Performs PCA, neighborhood graph construction and UMAP embedding.

umap

Performs PCA, neighborhood graph construction and UMAP embedding.

specificity#

classify_specificity

Classifies BCR specificity using antigen barcodes (AgBCs).