Skip to content

Protein – Duplicate Sequence Detection #10

Description

@hansen-maria

Is your feature request related to a problem? Please describe.
Same motivation as Issue #8 (DNA/RNA duplicates) but for protein sequence columns. Duplicate protein sequences commonly arise from database redundancy (UniProt canonical vs isoform entries) or multi-organism datasets where the same conserved protein is listed multiple times.

Describe the solution you'd like
Mirror the DNA/RNA implementation in sequence_data.py for PROTEINColumns:

  • n_exact_duplicates: int
  • exact_duplicate_ratio: float
  • duplicate_length_distribution: dict — bucketed by amino acid length (short peptides < 20 AA, medium 20–100 AA, full-length > 100 AA)
  • top_duplicated_sequences: list[tuple[str, int]]

Display in a "Duplicates" sub-tab in the Protein section of columns.jinja. For short peptides (< 15 AA), note that duplicate rates are expected to be high due to the limited sequence space.

Describe alternatives you've considered
MD5 hashing of sequences before counting to speed up duplicate detection on very large datasets. This is straightforward to add and should be maybe the default implementation for sequences longer than 50 AA.

Additional context
For immunological datasets (IEDB), duplicate epitope sequences are common by design (the same epitope tested in multiple assays). The duplicate report should therefore always be accompanied by context about the dataset type if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions