Giter Club home page Giter Club logo

pythoms's People

Contributors

larsyunker avatar yeungdb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pythoms's Issues

Isotope patter overlay

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've got problem can't solve

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.

PyRSIR errors out

Hi Lars,
I started working with PyRSIR and ran into a few issues:

  1. PyRSIR does not automatically load the files in lines 46 and 49, nor does it read the working directory. I get a "Directory:" prompt and file name prompts. Is this expected behavior?
  2. After enter directory and file names, PyRSIR errors out. I the output is below.

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

Does isotope pattern overlay work on tandem mass spectrometric methods? E.g. neutral loss scan?

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

IsoSpecPy import error and Image Size Value Error

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.

  1. 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”.

  2. 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.