Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Jaccard

Calculate the Jaccard index between two matrices


Description

Finds the Jaccard similarity between rows of the two matrices. Note that the matrices must be binary, and any rows with zero total counts will result in an NaN entry that could cause problems in downstream analyses.

Usage

Jaccard(x, y)

Arguments

x

The first matrix

y

The second matrix

Details

This will calculate the raw Jaccard index, without normalizing for the expected similarity between cells due to differences in sequencing depth.

Value

Returns a matrix

Examples

x <- matrix(data = sample(c(0, 1), size = 25, replace = TRUE), ncol = 5)
Jaccard(x = x, y = x)

Signac

Analysis of Single-Cell Chromatin Data

v1.2.1
MIT + file LICENSE
Authors
Tim Stuart [aut, cre] (<https://orcid.org/0000-0002-3044-0897>), Avi Srivastava [aut] (<https://orcid.org/0000-0001-9798-2079>), Paul Hoffman [ctb] (<https://orcid.org/0000-0002-7693-8957>), Rahul Satija [ctb] (<https://orcid.org/0000-0001-9448-8833>)
Initial release
2021-05-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.