Skip to content

DIANNtoMSstatsFormat: useUniquePeptide does not use DIA-NN's Proteotypic column #149

Open

Description

@swaraj-neu

Reported on the MSstats Google group: https://groups.google.com/g/msstats/c/pKsgtLlnT2Y

Problem

With useUniquePeptide = TRUE, proteins supported only by shared peptides still show up in the output. DIA-NN flags these peptides as Proteotypic = 0.

Cause

.removeSharedPeptides counts how many proteins each peptide maps to after conversion, and keeps the ones with a count of 1:

unique_pairs = unique(input[, c(protein_column, peptide_column), with = FALSE])
protein_counts = unique_pairs[, list(count = .N), by = peptide_column]
protein_counts = unique(protein_counts[count == 1L, peptide_column, with = FALSE])

DIA-NN collapses Protein.Group by parsimony, so a Proteotypic = 0 peptide maps to one protein by then. Count is 1, peptide stays.

grep -rn "Proteotypic" R/ returns nothing, so the column is never read.

Possible fix

.handleSharedPeptides already has a flag-based path (remove_shared) for tools with an uniqueness column. Could do the same here and read Proteotypic when it's there, defaulting to current behaviour.

Workaround

input <- input[input$Proteotypic == 1, ]

MSstats 4.18.1, DIA-NN 2.7.0, R 4.5.0.

Activity

  1. added theissue type on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions