Skip to content

Add Jaccard signature similarity protocol - #45

Merged
lwaldron merged 4 commits into
waldronlab:mainfrom
ohih8:protocol/jaccard-signature-similarity
Oct 18, 2026
Merged

lwaldron merged 4 commits into
waldronlab:mainfrom
ohih8:protocol/jaccard-signature-similarity

Conversation

@ohih8

@ohih8 ohih8 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Closes #8

Adds an atomic protocol for calculating pairwise Jaccard similarity between
microbial signatures after harmonizing them to a single taxonomic rank.

The protocol defines:

  • Taxonomic-rank harmonization
  • Duplicate and unmatched taxon handling
  • Minimum signature length
  • Direction and same-study pair rules
  • Diagonal, symmetry, and matrix ordering
  • Provenance and excluded-pair handling

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Conflicting singleton-matrix instructions and incorrect citation provenance need correction.

3 open issues
What changed in this PR

Adds an atomic protocol for comparing microbial signatures using Jaccard similarity after harmonizing taxa to one rank, addressing issue #8.

Changes:

  • Defines harmonization, deduplication, and minimum-length filtering.
  • Specifies pair eligibility, matrix layout, and provenance requirements.
  • Keeps clustering and visualization outside the protocol’s scope.
File Description
protocols/​jaccard-signature-similarity/​protocol.md Adds the Jaccard similarity procedure, parameters, and output conventions.

Review effort: Balanced

Comment on lines +112 to +114
similarity involving an ineligible signature. If fewer than two signatures
remain, output an empty matrix with its dimensions and reason rather than
inventing pairwise values.
license: CC-BY-4.0
type: atomic

protocol_citation: "10.1111/j.1469-8137.1912.tb05611.x"
type: atomic

protocol_citation: "10.1111/j.1469-8137.1912.tb05611.x"
method_origin_citation: "10.1111/j.1469-8137.1912.tb05611.x"
Also define the singleton case as a labeled 1 by 1 matrix, note that
dissimilarity is 1 - J for consumers that need it, and move the
evaluation note out of the protocol.

Drafted with Claude Code.
Drafted with Claude Code.
every input taxon to the selected rank.
- **Parameters**
- `taxonomic_rank`: exactly one rank at which every signature is compared. The
default is `genus`, matching the worked Jaccard analysis in the source

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason for genus to be a default, would make more sense to default to whatever the most common taxonomic rank is.

@lwaldron
lwaldron merged commit 8494716 into waldronlab:main Oct 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Protocol: Jaccard similarity between signatures at a single taxonomic level

3 participants