Repository navigation
TOPPView: better support for peak annotations in "Identification View" - #3007
Conversation
…ays as a separate spectrum)
|
@hendrikweisser yes, this works well with my data |
|
The "cpplint" style test failed with this error: I'd say that's a false-positive. |
|
@enetz: Thanks for checking.
Do you know how to change that colour? |
|
No idea, but I think @timosachsenberg showed me how to do it once, so it must be possible. |
| case 2: label += "++"; break; | ||
| case -1: label += "-"; break; | ||
| case -2: label += "--"; break; | ||
| default: label += ((ann.charge > 0) ? "+" : "") + String(ann.charge); |
There was a problem hiding this comment.
can you change this so that it also works for negative mode spectra?
There was a problem hiding this comment.
I think that should work already. Or have I overlooked something? (In the default case, String(ann.charge) already contains the minus sign.)
I fixed it |
|
can you post a screenshot? |
…n TOPPView's Identification View; style/whitespace fixes
|
cool looks pretty neat |
|
The peak color can (currently) be changed on a layer base: see e.g., https://github.com/OpenMS/OpenMS/blob/develop/src/openms_gui/source/VISUAL/Spectrum1DCanvas.cpp#L1061 An painting of lines is done here: https://github.com/OpenMS/OpenMS/blob/develop/src/openms_gui/source/VISUAL/Spectrum1DCanvas.cpp#L755 |
|
Thanks, Timo. There's already a "Todo" item that shows up in the Spectrum1DCanvas documentation:
We should do that (once #3002 is resolved) and at the same time add support for a "color" IntegerDataArray that would allow setting different colours for individual peaks. |
|
CI test "pyopenms_test_memoryleaktests" failed. Not sure if it's relevant. |
no, generally not |
|
The question is, if and where we generate these color arrays.
|
That would have been my approach. We already do this to get different colours for the ion name labels. I agree with your argument against option 1, and I don't like option 3 because that would mix different information in one string (which you'd then have to parse out again). By the way, the colors could be stored as ints, because Qt's QRgb (which you can convert to a QColor) is "equivalent to an unsigned int". |
|
I think this could be merged already. Getting different colours for individual peaks should be a separate set of changes. |

In TOPPView's "Identification View", peak annotations stored for peptide hits can be visualized (as an alternative to generating a theoretical spectrum). Previously only labels with the annotations were added to peaks in the measured spectrum. With this change, a second spectrum containing the peaks from the annotations as well as the labels is generated (analogous to a theoretical spectrum). This highlights the actual peaks that are annotated.
(It would be really nice if different peaks could be shown in different colours, but currently that's only possible for the labels.)
@enetz: Can you please check if this still works for showing the special annotations for cross-linked peptides?