User-facing operations

sim_calculate()

Calculate a melted similarity matrix.

sim_calculate_ij()

Calculate similarities given pairs of rows

sim_collate()

Collate several subsets of a melted similarity matrix, required for computing metrics.

sim_metrics()

Compute metrics.

sim_metrics_signif()

Report p-values for metrics

sim_wider()

Widen a symmetric melted similarity matrix.

sim_plot()

Plot a melted similarity matrix.

Annotation and filtering operations

sim_annotate()

Annotate a melted similarity matrix.

sim_filter_keep_or_drop_some()

Filter a melted similarity matrix to remove or keep specified rows.

sim_filter_all_same()

Filter a melted similarity matrix to keep pairs with the same values in specific columns.

sim_filter_all_same_keep_some()

Filter a melted similarity matrix to keep pairs with the same values in specific columns, and keep only some of these pairs.

sim_filter_some_different_drop_some()

Filter a melted similarity matrix to keep pairs with the same values in specific columns, and other constraints.

Read-write operations

sim_read()

Read similarity matrix.

sim_write()

Write similarity matrix.

Class operations

sim_new()

Constructor for matric_sim S3 class.

sim_validate()

Validator for matric_sim S3 class.

sim_restore()

Restorer for matric_sim S3 class.

Helper functions

get_annotation()

Get row annotations.

drop_annotation()

Drop row annotations.

preprocess_data()

Preprocess data. preprocess_data preprocesses data.

sim_metrics_helper()

Helper function to compute metrics.

null_distribution()

Compute null distribution for a set of metrics

null_distribution_helper()

Compute null distribution of metrics

get_p_value()

Compute p-value against null distribution

bin()

Bin values into increasingly wider bins

Sparse operations

sparse_pairwise()

Compute similarity between pairs of rows of a matrix

cosine_sparse() pearson_sparse()

Compute similarity between pairs of rows of a matrix

tcrossprod_ij()

Compute cross product between two sets of rows of a matrix.

Datasets

cellhealth

Cell Painting dataset of CRISPR perturbations.

cellhealthmetrics

Quality metrics for Cell Painting dataset of CRISPR perturbations.

Package

matric

matric: Metrics for Similarity Matrices