Conversion summary calls n_features_without_pg "identified-but-not-quantified", but it counts features with no PG link
- Dominant language
- Python
- Stars
- 26
- Forks
- 8
- Avg merge
- 5h 13m
- Merged PRs (30d)
- 27
Description
A reporting/wording issue, not a defect in the softlink or the counters — those are correct by their definitions.
Checked against `main` @ `b361f204` (= `v1.1.2`).
### What it says
`format_conversion_summary()` renders `n_features_without_pg` under the label "identified-but-not-quantified" (`qpx/converters/summary.py:196`):
```python
if without is not None:
detail.append(f"{_fmt(without)} identified-but-not-quantified")
```
giving a line shaped like:
```
feature->pg links : 1,234 (1,200 features linked; 34 identified-but-not-quantified)
```
### Why the phrase overreaches
> `format_conversion_summary()` labels `n_features_without_pg` as "identified-but-not-quantified", but that metric only counts features with no feature→PG association. A matching labelled PG row can have no quantity — for example, `openms-consensus` emits `intensity=NULL` when there is no unique-peptide signal — while still producing a softlink. Consider renaming the text to "features without a PG link" or adding a separately defined quantity-aware metric.
The softlink joins on membership, run and label and never inspects `pg.intensity` (`qpx/dataset.py:319-339`) — correctly so, since it is an association replacing the optional `feature.pg_ids`, not an assertion that the target row carries a quantity. The counters at `qpx/dataset.py:489-495` are direct counts over that association. Nothing there is wrong; only the rendered phrase claims more than the number supports.
Concretely, a feature linked to a labelled PG row whose `intensity` is NULL counts as *linked*, and the summary then reports `0 identified-but-not-quantified` even though that feature's only PG match has no quantity.
### The narrow reading is already encoded in the tests
`tests/unit/test_feature_pg_softlink.py:67` — `test_softlink_identified_but_not_quantified_has_no_link` — defines the term with a protein that has **no pg row at all** (`P9`), and its docstring says "A feature whose group has no matching pg row produces no softlink edge (identified but not quantified) — it is not an error." So the intended meaning of the metric is "no PG link", and it is the user-facing string that drifts from it.
### If a quantity-aware metric is wanted instead
Worth stating so the obvious fix is not taken by accident:
> A proposed fix should not simply add `p.intensity IS NOT NULL` to the association SQL; quantity-aware reporting must also define whether alternative `additional_intensities` count and whether the metric is per feature or per feature-label.
Renaming the string is the cheap fix; a real quantity-status metric is a separate design question.
Contributor guide
Research direction
Start in qpx/converters/summary.py at line 196 and read the existing softlink behavior in qpx/dataset.py:319-339 and tests/unit/test_feature_pg_softlink.py:67. Update the summary wording so it describes features without a PG link, then run the relevant summary and softlink tests; done means the label matches the counter without changing association logic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100