API#

Import CAT as:

import cat

cat#

internal_preprocessing(ds1, ds2[, ...])

The internal preprocessing of the CAT algorithm ensures that data is in the right shape and format.

compare(ds1, ds2[, n_iterations, features, ...])

CAT routine calculated the inter cluster distances.

run(args)

Run CAT inference

Dataset and DatasetDiff#

Dataset._fix_metadata(group_by)

Helper function to fix metadata information and add cluster_field to the obs

Dataset._fix_genes(gene_symbol_field)

Set correct column from var to gene symbol.

Dataset._fix_genes(gene_symbol_field)

Set correct column from var to gene symbol.

Dataset._filter_genes(gene_type, pattern)

Filter genes based on pattern

Dataset._save(save_path)

Save dataset into anndata format

Dataset.prepare(group_by[, ...])

Prepares dataset for CAT analysis

DatasetDiff(ds1_name, ds2_name, mean, std)

Pairwise dataset container

Report#

report.generate_tables(diff, sigma_th)

Takes the raw results from the CAT routine function and turns them into nice table per cluster.

report.to_excel(args, tables)

Generate CAT results to Excel format

report.save_tables(args, tables)

Save results into multiple formats

Utils#

utils.get_nz_mean(mat)

Calculate non-zero mean

utils.get_nz_median(mat)

Calculate non-zero median

utils.normalize(mat[, method])

Normalize count matrix

utils.rename_ds(names)

Rename dataset names

utils.read_features(file)

Read feature file containing list in TSV format (tab separated).