Preprocessing: pp

format_fasta(fasta[, prefix, suffix, sep, …])

Adds prefix to the headers/contig ids in cellranger fasta and annotation file.

format_fastas(fastas[, prefix, suffix, sep, …])

Adds prefix to the headers/contig ids in cellranger fasta and annotation file.

assign_isotype(fasta[, fileformat, org, …])

Annotate contigs with constant region call using blastn

assign_isotypes(fastas[, fileformat, org, …])

Annotate contigs with constant region call using blastn

reannotate_genes(data[, igblast_db, …])

Reannotate cellranger fasta files with igblastn and parses to airr/changeo data format.

reassign_alleles(data, combined_folder[, …])

Correct allele calls based on a personalized genotype using tigger-reassignAlleles.

create_germlines(self[, germline, org, …])

Runs CreateGermlines.py to reconstruct the germline V(D)J sequence, from which the Ig lineage and mutations can be inferred.

filter_bcr(data, adata[, filter_bcr, …])

Filters doublets and poor quality cells and corresponding contigs based on provided V(D)J DataFrame and AnnData objects.

quantify_mutations(self[, split_locus, …])

Runs basic mutation load analysis implemented in shazam.

calculate_threshold(self[, …])

Calculating nearest neighbor distances for tuning clonal assignment with shazam.

Preprocessing (external): pp.external

assigngenes_igblast(fasta[, igblast_db, …])

Reannotate with IgBLASTn.

makedb_igblast(fasta[, igblast_output, …])

Parses IgBLAST output to airr format.

parsedb_heavy(db_file[, verbose])

Parses AIRR table (heavy chain contigs only).

parsedb_light(db_file[, verbose])

Parses AIRR table (light chain contigs only).

parsedb_light(db_file[, verbose])

Parses AIRR table (light chain contigs only).

creategermlines(db_file[, germtypes, …])

Wrapper for CreateGermlines.py for reconstructing germline sequences,

tigger_genotype(data[, v_germline, outdir, …])

Reassign alleles with TIgGER in R.

recipe_scanpy_qc(self[, max_genes, …])

Recipe for running a standard scanpy QC workflow.

Tools: tl

find_clones(self[, identity, clustering_by, …])

Find clones based on heavy chain and light chain CDR3 junction hamming distance.

define_clones(self[, dist, action, model, …])

Find clones using changeo’s DefineClones.py.

clone_size(self[, max_size, clone_key, …])

Quantifies size of clones

clone_overlap(self, groupby, colorby[, …])

A function to tabulate clonal overlap for input as a circos-style plot. :Parameters: * self (Dandelion, AnnData) – Dandelion or AnnData object. * groupby (str) – column name in obs/metadata for collapsing to nodes in circos plot. * colorby (str) – column name in obs/metadata for grouping and color of nodes in circos plot. * min_clone_size (int, optional) – minimum size of clone for plotting connections. Defaults to 2 if left as None. * clone_key (str, optional) – column name for clones. None defaults to ‘clone_id’.

transfer(self, dandelion[, expanded_only, …])

Transfer data in Dandelion slots to AnnData object, updating the .obs, .uns, .obsm and `.obsp`slots.

generate_network(self[, distance_mode, …])

Generates a Levenshtein distance network based on full length VDJ sequence alignments for heavy and light chain(s).

clone_degree(self[, weight, verbose])

Calculates node degree in BCR network.

clone_centrality(self[, verbose])

Calculates node closeness centrality in BCR network.

extract_edge_weights(self[, expanded_only])

Retrieves edge weights (BCR levenshtein distance) from graph.

clone_diversity(self, groupby[, method, …])

Compute B cell clones diversity : Gini indices, Chao1 estimates, or Shannon entropy.

clone_rarefaction(self, groupby[, …])

Returns rarefaction predictions for cell numbers vs clone size. :Parameters: * self (Dandelion, AnnData) – Dandelion or AnnData object. * groupby (str) – Column name to split the calculation of clone numbers for a given number of cells for e.g. sample, patient etc. * clone_key (str, optional) – Column name specifying the clone_id column in metadata/obs. * diversity_key (str, optional) – key for ‘diversity’ results in AnnData’s .uns.

Plotting: pl

clone_rarefaction(self, groupby[, …])

Plots rarefaction curve for cell numbers vs clone size.

clone_network(adata[, basis, edges])

Using scanpy’s plotting module to plot the network.

barplot(self, variable[, palette, figsize, …])

A barplot function to plot usage of V/J genes in the data.

stackedbarplot(self, variable, groupby[, …])

A stackedbarplot function to plot usage of V/J genes in the data split by groups.

spectratype(self, variable, groupby, locus)

A stackedbarplot function to plot usage of V/J genes in the data split by groups.

clone_overlap(self, groupby, colorby[, …])

A plot function to visualise clonal overlap as a circos-style plot.

Utilities: utl

makeblastdb(ref)

Runs makeblastdb.

load_data(obj)

Reads in or copy dataframe object and set sequence_id as index without dropping.

Dandelion([data, metadata, germline, …])

Dandelion class object.

update_metadata(self[, retrieve, …])

A Dandelion function to update and populate the .metadata slot.

read_h5([filename])

Reads in and returns a Dandelion class from .h5 format.

read_pkl([filename])

Reads in and returns a Dandelion class saved using pickle format.