larsyunker / pythoms Goto Github PK
View Code? Open in Web Editor NEWA series of python scripts which aid in the processing and interpretation of mass spectrometric data (formerly Mass-Spec-Python-Tools)
License: MIT License
A series of python scripts which aid in the processing and interpretation of mass spectrometric data (formerly Mass-Spec-Python-Tools)
License: MIT License
Instantiating IPMolecule
with a redundant charge and using the format "+H" is unsupported. (Mentioned in #14 )
e.g. [C71H100N14O16+H]+
is not correctly interpreted
I tried running the script with the both your file in the validation folder and with my data but the output figure would only show the mass peak but not the isotope patter bars. see attached pics. The Ar-I+ figure doesn't even have the isotope pattern bars. Wondering what is going on...?
@line 424 of molecule.py (out[0].append(x))
BAR
x = [479.04256000000004, 480.04594086958247, 481.04927, 482.052625]
y = [100.0, 27.280848507524876, 3.509399355066259, 0.24494730118962427]
Automatically determining m/z window: 477 - 482
@line 927 of tome.py (ax.bar)
AXBAR
simdict[species]['x'] = [479.04256000000004, 480.04594086958247, 481.04927, 482.052625]
simdict[species]['y'] = [0.4452669723598899, 0.12147260818354422, 0.015626196256321032, 0.0010906694318843005]
I'm using Windows 7, python 3.7.1, and what I want to do is to overlay experimental spectrum and theoretical spectrum using 'isotope overlay pattern' module in pythoms script.
I put current directory and spectrum(mzml), and seems nothing wrong to me. But the error occured like this,
Traceback (most recent call last):
File "L:\Downloads\PythoMS-master\isotope pattern overlay.py", line 240, in
exp = mzml.sum_scans()
File "L:\Downloads\PythoMS-master\pythoms\mzml.py", line 1050, in sum_scans
if self.functions[fn]['type'] != 'MS':
KeyError: 1
I checked mzml.py and maybe [fn] is empty list so keyerror occurs.
Give me any suggestions. Thanks.
Hi Lars,
I started working with PyRSIR and ran into a few issues:
runfile('C:/Program Files/PythoMS-master/PyRSIR.py', wdir='C:/Program Files/PythoMS-master')
Reloaded modules: pythoms, pythoms.tome, pythoms.spectrum, pythoms.colour, pythoms.molecule, pythoms.scripttime, pythoms.progress, pythoms.mass_dictionaries, pythoms.mass_abbreviations, pythoms.mzml, pythoms.psims, pythoms.xlsx
Data was read from PSI-MS, please cite DOI: 10.1093/database/bat009
Directory: /Program Files/PythoMS-master/validation_files
Raw or mzML filename: LY-2015-09-15_06.mzML
Excel file name: pyrsir_validation.xlsx
Scans to bin (separate multiple values with commas): 3
Start time: 05:38:06 PM
Loading workbook "/Program Files/PythoMS-master/validation_files\pyrsir_validation.xlsx" into memory DONE
DONE
Loading /Program Files/PythoMS-master/validation_files\LY-2015-09-15_06.mzML into memory DONE
Estimating resolution of the instrument 100.0% DONE
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Program Files/PythoMS-master/PyRSIR.py', wdir='C:/Program Files/PythoMS-master')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Program Files/PythoMS-master/PyRSIR.py", line 445, in
pyrsir(filename, xlsx, n)
File "C:/Program Files/PythoMS-master/PyRSIR.py", line 326, in pyrsir
sp = prepformula(sp)
File "C:/Program Files/PythoMS-master/PyRSIR.py", line 230, in prepformula
if mzml.functions[fn]['type'] == 'MS':
KeyError: 4
Jerry
The magic methods (e.g. __add__
) do not pass through instance settings such as ipmethod
as expected
I tried this scrip on a neutral loss scan but I got this error message. Would it be a mzml issue since tandem MS method can involve multiple functions?
C:\Users\User\AppData\Local\Programs\Python\Python37\python.exe "C:/Users/User/Documents/GitHub/PythoMS/isotope pattern overlay_MT_data.py"
Data was read from PSI-MS, please cite DOI: 10.1093/database/bat009
Using figure preset "pub"
Traceback (most recent call last):
File "C:/Users/User/Documents/GitHub/PythoMS/isotope pattern overlay_MT_data.py", line 244, in <module>
mzml = mzML(spectrum, verbose=False)
File "C:\Users\User\Documents\GitHub\PythoMS\pythoms\mzml.py", line 422, in __init__
self.nscans = int(self.tree.getElementsByTagName('spectrumList')[0].getAttribute('count')) # number of spectra
IndexError: list index out of range
Process finished with exit code 1
May need exception catching for finding local max in window if there are no intensity signals in the provided window
Hi,
I have followed the directions on Scott McIndoe's YouTube videos on installing PythoMS and dependencies/requirements. I ran the test case that comes with PythoMS-master and got 2 errors.
An import error with line 40 of molecule.py: I was able to fix it as “from IsoSpecPy.IsoSpecPy import IsoSpecPy” should be “from IsoSpecPy import IsoSpecPy”.
Image size error. The error output is below. I do not know how to fix this.
In [2]: runfile('C:/Program Files/PythoMS-master/video frame renderer.py', wdir='C:/Program Files/PythoMS-master')
Data was read from PSI-MS, please cite DOI: 10.1093/database/bat009
2 summing and normalizing species traces DONE
Binning spectrum #2147/2147 100.0% DONE
Writing animation to file...
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\formatters.py", line 341, in call
return printer(obj)
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\pylabtools.py", line 244, in
png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\pylabtools.py", line 128, in print_figure
fig.canvas.print_figure(bytes_io, **kw)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backend_bases.py", line 2082, in print_figure
**kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 527, in print_png
FigureCanvasAgg.draw(self)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 386, in draw
self.renderer = self.get_renderer(cleared=True)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 399, in get_renderer
self.renderer = RendererAgg(w, h, self.figure.dpi)
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 86, in init
self._renderer = _RendererAgg(int(width), int(height), dpi)
ValueError: Image size of 77389x750 pixels is too large. It must be less than 2^16 in each direction.
Jerry
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.