Repository navigation
[FEATURE] TOPPView: peaks colored by label content - #3274
Conversation
some experimental code to test access to data structures and peak coloring
|
nice. did you also find out why moving the labels does not work? |
| } | ||
|
|
||
| Annotation1DItem* item = new Annotation1DPeakItem(position, label.toQString(), color); | ||
| annotated_layer.peak_colors_1d.push_back(peak_color); |
There was a problem hiding this comment.
where are these deleted?
There was a problem hiding this comment.
This vector gets filled in the new LayerData object containing only the labeled peaks and labels,
this is then drawn on top of the normal spectrum.
We should delete this whole layer after changing the spectrum / ID.
deactivate1DSpectrum removes the annotations from the current layer, but I think a new layer with a new spectrum (and now also a filled color vector) gets created every time a new ID is selected and these do not get deleted.
@hendrikweisser can you confirm that, or is there a mechanism in place to get rid of these additional layers and spectra? Then the color vectors should be erased with them.
I will look into this later.
There was a problem hiding this comment.
@enetz: I think you're right, deactivate1DSpectrum and removeTheoreticalSpectrumLayer_ (which is called by deactivate...) should perform the clean-up. But I'm not sure if they do everything correctly or need updating.
|
Nice work, Eugen! |
|
A new issue popped up while I was working on this PR: |
|
@hendrikweisser You can look into the function It is currently tailored specifically for cross-link data and only done when some cross-linking specific meta values exist in the ID info, but implementing that for normal peptides should be much easier. |
|
@enetz: Thanks for the explanation! What do the colours of the arrows (red/green/blue) mean? |
|
@hendrikweisser green and red are the same as the peaks, green = linear peptide fragments from one peptide, red = cross-linked fragments containing parts from both peptides and the cross-linker. |
|
@enetz: I don't know if you're already aware, but I wanted to point out that your usage of the arrows in the coverage annotation is a bit non-standard (and may be confusing for people who are used to the standard notation). See this example for what I mean by "standard notation": https://www.researchgate.net/profile/Ulrich_Goepfert/publication/229083272/figure/fig3/AS:300749193007108@1448715603476/Fragment-ion-spectra-of-the-HC-T13-peptide-originating-from-the-spiking-antibody-B.png |
|
looks good! let's merge. |
Extension of #3007 by @hendrikweisser .
A new vector for peak colors has been added to LayerData.
Peaks are colored by the colors stored in there, if its length equals the length of the spectrum.
Currently it is filled by label content, in the same way the colors for the labels were determined.
In the future we can also use information in DataArrays or other sources to set colors for different kinds of data.
Screenshot (for Cross-Linking MS data):
