-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update plotSpectra environment to allow addFragments returned list #348
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I have however some questions.
General comment: I don't know your specific use case, but would it not be possible to add whatever information/annotation you have or calculate directly to the |
I believe we could if the number of annotations don't exceed |
A discussion with Laurent led to a potential different idea: the creation of a package specifically for plotting spectra. I understand my use cases might not fit in well within the |
@jorainer - we need to move on with this issue to be able to merge the new PSMatch functionality. Do we need another discussion. |
… plotting functions
This PR is linked to this PSMatch issue and the discussed topics in #346
The motivation for this PR:
addFragments
used to throw an error when multiple spectra where calledvariable_modifications
parameter necessitated a newaddFragments
function to distinguish annotationsThe solution:
addFragments
now returns a list of named elements (peptide sequence that includes modifications) containing acharacter()
vector with the annotations. Each element of the list has an attribute linking the annotations to the spectrum it belonged to. In Spectra, the changes are located at the level of the presence oflabels
. It is assumed that most often than not,addFragments
is called forlabels
. A quick check for variable modifications is also added (as plotSpectra doesn't support them yet). All three functions (plotSpectra
,plotSpectraMirror
andplotSpectraOverlay
now support the version ofaddFragments
in this PR).This PR can only be accepted if the corresponding PR in PSMatch is accepted !! Otherwise,
plotSpectra
won't work.