-
Notifications
You must be signed in to change notification settings - Fork 4
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
Sequence plot #30
base: main
Are you sure you want to change the base?
Sequence plot #30
Conversation
Create SequencePlot object, a basic plot for plotting sequences Add implementation for SequencePlot in matplotlib rename x and y to x_pos and y_pos to avoid naming conflict add variables for column names so they are not hard-coded replace fragment fontsize with annotation_fontsize
add documentation with new parameter names This is probably not the best place to put the documentation but will do for now. Also have to reformat as google docstring instead of numpy
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
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.
Looks good. I just made a few comments of questions/thoughts I had, but would be okay with merging as is.
Another overall thought I had, was how these sequence plots would be used? Would they be used an individual standalone figures, or would we want to extend, for example, the Spectrum plots, to allow insetting of the sequence plot inside the spectrum plot?
Similarly with the molecule compound plots.
I was thinking about this as well and I am not sure what is best. I think realistically one would not plot the sequence on its own and it would usually be coupled with a spectrum. I decided on the current implementation which allows for placing as its own plot because this would allow for inserting it into SpectrumPlot or ChromatogramPlot so it would not be specific to the spectrum backend. However this is kind of messy because it does inherit from basePlot and a lot of the methods and parameters there do not really make sense as this is more of an annotation. Also, the usage of dataframe in does not make a whole lot of sense either. There are 2 options which I can think of now for refactoring this:
|
mm, I think the SequencePlot would mostly only be useful for the SpectrumPlot? But I do like option 2, to have it available across the other MSPlots if wanted. |
Personally I do not visualize sequence plots with chromatograms either so maybe then for maintainability we go with option 1? Would be curious to know other's thoughts though |
User description
This is a continuation from #29 because I was having difficulty pushing to that branch.
This is the first attempt at integrating the sequence plot into the pyopenms_viz framework. Currently, only matplotlib backend is supported.
The original script can be found in
sequenceplot.py
Example usage:
PR Type
enhancement, documentation
Description
SequencePlot
class for plotting peptide sequences with matched fragments.MATPLOTLIBSequencePlot
class with detailed plotting logic.Changes walkthrough 📝
__init__.py
Add Bokeh support for sequence plot type
pyopenms_viz/_bokeh/init.py
BOKEHSequencePlot
to the imports.PLOT_CLASSES
to includesequence
plot type.core.py
Implement Bokeh sequence plot class
pyopenms_viz/_bokeh/core.py
SequencePlot
to the imports.BOKEHSequencePlot
class with a placeholder for plotmethod.
_core.py
Introduce SequencePlot class for peptide plotting
pyopenms_viz/_core.py
sequence
to_common_kinds
.SequencePlot
class for peptide sequence plotting.__init__.py
Add Matplotlib support for sequence plot type
pyopenms_viz/_matplotlib/init.py
MATPLOTLIBSequencePlot
to the imports.PLOT_CLASSES
to includesequence
plot type.core.py
Implement Matplotlib sequence plot class
pyopenms_viz/_matplotlib/core.py
SequencePlot
to the imports.MATPLOTLIBSequencePlot
class with plotting logic.__init__.py
Add Plotly support for sequence plot type
pyopenms_viz/_plotly/init.py
PLOTLYSequencePlot
to the imports.PLOT_CLASSES
to includesequence
plot type.core.py
Implement Plotly sequence plot class
pyopenms_viz/_plotly/core.py
SequencePlot
to the imports.PLOTLYSequencePlot
class with a placeholder for plotmethod.
sequenceplot.py
Add sequence plotting function using Matplotlib
sequenceplot.py