Skip to content

Commit

Permalink
Merge pull request #234 from pymzml/release/v2.4.7
Browse files Browse the repository at this point in the history
Release/v2.4.7
  • Loading branch information
MKoesters authored Jun 5, 2020
2 parents 74e98ad + d9a6700 commit 65941b8
Show file tree
Hide file tree
Showing 17 changed files with 714 additions and 297 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Never modify line endings of mzML files
*.mzML* -crlf
22 changes: 15 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Introduction
.. image:: https://travis-ci.org/pymzml/pymzML.svg?branch=master
:target: https://travis-ci.org/pymzml/pymzML

.. image:: https://ci.appveyor.com/api/projects/status/4nlw52a9qn22921d?svg=true
:target: https://ci.appveyor.com/project/fufezan-lab/pymzml
.. image:: https://ci.appveyor.com/api/projects/status/e5reb5xw74jfqk2v/branch/dev?svg=true
:target: https://ci.appveyor.com/api/projects/status/e5reb5xw74jfqk2v/branch/dev?svg=true
:alt: AppVeyor CI status

.. image:: https://readthedocs.org/projects/pymzml/badge/?version=latest
Expand Down Expand Up @@ -82,10 +82,9 @@ pymzML is an extension to Python that offers
Implementation
**************

pymzML requires Python3.4+.
pymzML requires Python3.5+.
The module is freely available on pymzml.github.com or pypi,
published under MIT license and requires no additional modules to be installed, but can
optionally use numpy.
published under MIT license and only requires numpy and regex, however there are several optional dependencies for extended functionality like interactive plotting and deconvolution.


********
Expand All @@ -111,7 +110,7 @@ doi: https://doi.org/10.1093/bioinformatics/bty046
Installation
************

pymzML requires `Python`_ 3.4 or higher.
pymzML requires `Python`_ 3.5 or higher.

.. note::

Expand All @@ -134,6 +133,15 @@ Download pymzML using `GitHub`_ **or** the zip file:
.. _GitHub:
https://github.com/pymzML/pymzml

* pypi version::

user@localhost:~$ pip install pymzml # install standard version
user@localhost:~$ pip install "pymzml[plot]" # with plotting support
user@localhost:~$ pip install "pymzml[pynumpress]" # with pynumpress support
user@localhost:~$ pip install "pymzml[deconvolution]" # with deconvolution support using ms_deisotope
user@localhost:~$ pip install "pymzml[full]" # full featured


If you have troubles installing the dependencies, install numpy first separately,
since pynumpress requires numpy to be installed.

Expand All @@ -146,7 +154,7 @@ Testing

To test the package and correct installation::

nosetests tests/*.py
tox


*************
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==2.3.1
sphinx==3.0.3
sphinx_rtd_theme==0.4.3
regex
23 changes: 23 additions & 0 deletions docs/source/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,27 @@ no matter if an index was included into the file or not.
spectrum_with_id_2540 = run[ 2540 ]
Reading mzML indices with a custom regular expression
------------------------------------------------------

When reading mzML files with indices wich is not an integer or contains "scan=1" or similar,
you can set a custom regex to parse the index when initializing the reader.

Say for example you have an index as in the example file Manuels_customs_ids.mzML:
<offset idRef="ManuelsCustomID=1 diesdas">4026</offset>

.. code-block:: python
#!/usr/bin/env python
import pymzml
import re
index_re = re.compile(
b'.*idRef="ManuelsCustomID=(?P<ID>.*) diesdas">(?P<offset>[0-9]*)</offset>'
)
run = pymzml.run.Reader(your_file_path, index_regex=index_re)
spec_1 = run[1]
The regular expression has to contain a group called ID and a group called offset.
Also be aware that your regex need to be a byte string.

193 changes: 0 additions & 193 deletions example_scripts/spectrum_viewer.py

This file was deleted.

Loading

0 comments on commit 65941b8

Please sign in to comment.