pymzml / pymzML

pymzML - an interface between Python and mzML Mass spectrometry Files
https://pymzml.readthedocs.io/en/latest/
MIT License
162 stars 92 forks source link

Added spectrum viewer example script using Dash #166

Closed JB-MS closed 5 years ago

JB-MS commented 5 years ago

A spectrum viewer based on Dash I have coded some time ago. The idea was to have a very simple and fast viewer based on pymzML and Dash.

Works very smoothly on igzip files, thanks to the quick jumps to specific spectra.

Let me know what you think!

codecov[bot] commented 5 years ago

Codecov Report

Merging #166 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #166   +/-   ##
=======================================
  Coverage   83.19%   83.19%           
=======================================
  Files          32       32           
  Lines        3505     3505           
=======================================
  Hits         2916     2916           
  Misses        589      589
Impacted Files Coverage Δ
pymzml/spec.py 75.44% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 726e887...53f924c. Read the comment docs.

JB-MS commented 5 years ago

I have addressed the issues and cleaned up the code a wee bit.

The updated version deals now also with truncated files.

MKoesters commented 5 years ago

Cool, did not have time today to actually start it and play around. Hope I can do that tomorrow, if everything works fine this can be merged, this will definitely come in useful in future :)

MKoesters commented 5 years ago

I get an error in dash when trying to access a spectrum:

File "/home/manuel/Gits/pymzML/pymzML_JL/example_scripts/spectrum_viewer.py", line 159, in update_figure **spectrum.selected_precursors[0] KeyError: 'i'

I guess this is because not all mzML files contain the precursor intensity (at least one of my test files doesn't have it)

Also, it would be nice to also show the spectrum ID in the TIC, so one knows what to type if one wants to jump to a specific point in the TIC

JB-MS commented 5 years ago

@MKoesters I have implemented the features and changes you proposed. Thanks for the input!