You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working on PTMs and variable modifications are a key aspect I wish to include in my workflow.
As of the latest PR in PSMatch, calculateFragments now also measures a sequence's mass with variable modifications (see this PR).
However, currently, addFragments and plotSpectra as well as plotSpectraOverlay and plotSpectraMirror do not support such modifications. There is also an error to be fixed with addFragments not allowing custom parameters when multiple spectra are called (see issue here).
Taking into account the already mentioned potential for optimised plots (see this [issue]), I revisited plotSpectra and addFragments to include:
fix issues with par() going off when multiple plots are called
Remove the redundant title (now in the USI) and reduce the unused space
The results look like this:
A simple annotated plot: plotSpectra2(bulk[504], labels = addFragments2(bulk[504], type = c("a", "b", "y")), main = "A first example")
One single spectrum with variable moidifications: plotSpectra2(sc[532], labels = addFragments2(sc[532], variable_modifications = c(D = 5)))
Multiple plots with specific variable modificationplotSpectra2(sc[532:534], labels = addFragments2(sc[532:534], variable_modifications = c(D = 5)))
Fixed modifications can still be used (in the same way modifications parameter was used before.
The plotting function I generated is fully functional, but is still only specific to plotSpectra, not adaptable to plotSpectraMirror and plotSpectraOverlay - see sub-issue #347 I am thus asking for your input: are these new plot versions interesting/useful to your average user ? If it is, are there any elements I should remove/add ? Should I do a PR to add a new plotting function that accepts modifications or should the goal be to replace the whole plotting environment ? In the case of plotSpectraOverlay, where do I put the USI/fragmented sequence ? In plotSpectraMirror : what happens if there are multiple modifications for one spectrum ? A lot of questions arise and I wonder if it's worth developing this for an average user ?
In any case, to fix the current errors mentioned above, a new version of addFragments and plotSpectra functions is needed. There is very little modification necessary to the code, but addFragments should constantly provide a list of named elements (name = peptide with or without modification) and an attribute linking the annotation to the initial spectrum it belongs to. I have the code ready and I can generate a PR for this separately as well. This would not include modifications, but it would fix the error from this issue.
@jorainer - this is a rather important new feature, that started in PSMatch, i.e. the computation, handling and visualisation of peptides with variable post-translational modifications. I suggest to split this issue into two parts: one dealing with the update in plotSpectra() to handle the use-cases, and a second one with the other plotSpectraMirror() and plotSpectraOverlay(). I think these can be handled independently or one after another.
I'm a bit lost here and would maybe need more information what type of information you need to store or what the new functionality returns. Specifically, I'm wondering if it would not be possible to add the results of the calculations as new spectra or peaks variables to the Spectra that could then be extracted and visualized by the functions passed with parameter labels in the plotSpectra() function?
I am currently working on PTMs and variable modifications are a key aspect I wish to include in my workflow.
As of the latest PR in PSMatch,
calculateFragments
now also measures a sequence's mass with variable modifications (see this PR).However, currently,
addFragments
andplotSpectra
as well asplotSpectraOverlay
andplotSpectraMirror
do not support such modifications. There is also an error to be fixed withaddFragments
not allowing custom parameters when multiple spectra are called (see issue here).Taking into account the already mentioned potential for optimised plots (see this [issue]), I revisited
plotSpectra
andaddFragments
to include:addFragments
issue mentioned above)par()
going off when multiple plots are calledThe results look like this:
plotSpectra2(sc[532], labels = addFragments2(sc[532], variable_modifications = c(D = 5)))
plotSpectra2(sc[532:534], labels = addFragments2(sc[532:534], variable_modifications = c(D = 5)))
modifications
parameter was used before.The plotting function I generated is fully functional, but is still only specific to
plotSpectra
, not adaptable toplotSpectraMirror
andplotSpectraOverlay
- see sub-issue #347I am thus asking for your input: are these new plot versions interesting/useful to your average user ? If it is, are there any elements I should remove/add ? Should I do a PR to add a new plotting function that accepts modifications or should the goal be to replace the whole plotting environment ? In the case ofplotSpectraOverlay
, where do I put the USI/fragmented sequence ? InplotSpectraMirror
: what happens if there are multiple modifications for one spectrum ? A lot of questions arise and I wonder if it's worth developing this for an average user ?In any case, to fix the current errors mentioned above, a new version of
addFragments
andplotSpectra
functions is needed. There is very little modification necessary to the code, butaddFragments
should constantly provide a list of named elements (name = peptide with or without modification) and an attribute linking the annotation to the initial spectrum it belongs to. I have the code ready and I can generate a PR for this separately as well. This would not include modifications, but it would fix the error from this issue.@lgatto @sgibb @jorainer
The text was updated successfully, but these errors were encountered: