Skip to content

FragPipe PTM converter drops correctly localized peptides on rounding #135

Open

Description

@swaraj-neu

While answering a Google Group question, I noticed that .removeCutoffSites keeps a row only when the number of sites above localization_cutoff exactly equals number_sites, which is the sum of the localization probabilities. FragPipe rounds those probabilities, so the sum is often 0.9999 or 1.0001, and the check fails even when exactly one site is above the cutoff.

On the package's own label-free fixture, tinytest/raw_data/Fragpipe/MSstats.csv, 8 of the 20 localized rows are dropped this way, 7 of them with exactly one site above 0.75. For example, MES(0.0145)QQLS(0.0162)QHS(0.9096)... sums to 0.9999 and is dropped. Rounding number_sites before the comparison would probably fix it.

A smaller one in the same converter. If mod_id_col matches no column, .getFullModID returns character(0), and the error only appears later as "subscript out of bounds". A clear error at that point would help anyone who passes the wrong modification name.

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions