Skip to content

Commit

Permalink
Update docs, changelog, authors, bump version to 4.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
levitsky committed Sep 29, 2020
1 parent 26d2bb7 commit 29f4136
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 66 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ On Github
.........

Vladimir Gorshkov [caetera]
Andrey Rozenberg [alephreish]


On Bitbucket (before March 1, 2020)
Expand Down
20 changes: 17 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
dev
---
4.3.3
-----

- Add :py:func:`pyteomics.electrochem.gravy` (`#9 <https://github.com/levitsky/pyteomics/pull/9>`_).

- Fixes and improvements in :py:func:`pyteomics.pepxml.roc_curve` (`#10 <https://github.com/levitsky/pyteomics/pull/10>`_).

- Changes in guessing behavior of :py:func:`read` functions.

In modules that implement :ref:`indexing parsers <indexing>` for non-XML formats (MGF, FASTA, PEFF, ms1/ms2),
when a parser is instantiated using :py:func:`read`, the parser class to instantiate is guessed
based on the mode of the file object passed to :py:func:`read` (text or binary).

Add :py:func:`pyteomics.electrochem.gravy` (`#9 <https://github.com/levitsky/pyteomics/pull/9>`_).
With some file-like objects, mode cannot be easily deduced without consuming some of the data.
You will now see more warnings in case `use_index` is not explicitly passed to :py:func:`read` and reading mode is not obvious.
There will also be warnings if `use_index` is specified but the file is opened in the wrong mode.
To avoid all of this, youy are encouraged to instantiate parser classes directly,
or explicitly specify `use_index` to :py:func:`read` in all corner cases.

4.3.2
-----
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.3dev1
4.3.3
10 changes: 5 additions & 5 deletions doc/source/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ The following section is dedicated to data manipulation. **Pyteomics** aims to
support the most common formats of (LC-)MS/MS data, peptide identification
results and protein databases.

.. include :: data/notes.rst
.. include :: data/notes.rst.inc
.. contents:: Document contents
:backlinks: top
:depth: 3

.. include :: data/text.rst
.. include :: data/text.rst.inc
.. include :: data/xml.rst
.. include :: data/xml.rst.inc
.. include :: data/indexing.rst
.. include :: data/indexing.rst.inc
.. include :: data/tda.rst
.. include :: data/tda.rst.inc
File renamed without changes.
File renamed without changes.
File renamed without changes.
100 changes: 50 additions & 50 deletions doc/source/data/text.rst → doc/source/data/text.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,56 +71,56 @@ Class-based interface
Since version 3.4.3, MGF parsing functionality is encapsulated in a class:
:py:class:`pyteomics.mgf.MGF`. This class can be used for:

- sequential parsing of the file (the same as :py:func:`read`)::

.. code-block:: python
>>> with mgf.MGF('tests/test.mgf') as reader:
..: for spectrum in reader:
..: ...
- accessing the file header (the same as :py:func:`read_header`)::

.. code-block:: python
>>> f = mgf.MGF('tests/test.mgf')
>>> f.header
{'charge': [2, 3],
'com': 'Based on http://www.matrixscience.com/help/data_file_help.html',
'it_mods': 'Oxidation (M)',
'itol': '1',
'itolu': 'Da',
'mass': 'Monoisotopic',
'mods': 'Carbamidomethyl (C)',
'useremail': 'leu@altered-state.edu',
'username': 'Lou Scene'}
- direct access to spectra by title (the same as :py:func:`get_spectrum`)::

.. code-block:: python
>>> f = mgf.MGF('tests/test.mgf')
>>> f['Spectrum 2']
{'charge array': masked_array(data = [3 2 1 1 1 1],
mask = False,
fill_value = 0),
'intensity array': array([ 237., 128., 108., 1007., 974., 79.]),
'm/z array': array([ 345.1, 370.2, 460.2, 1673.3, 1674. , 1675.3]),
'params': {'charge': [2, 3],
'com': 'Based on http://www.matrixscience.com/help/data_file_help.html',
'it_mods': 'Oxidation (M)',
'itol': '1',
'itolu': 'Da',
'mass': 'Monoisotopic',
'mods': 'Carbamidomethyl (C)',
'pepmass': (1084.9, 1234.0),
'rtinseconds': '25',
'scans': '3',
'title': 'Spectrum 2',
'useremail': 'leu@altered-state.edu',
'username': 'Lou Scene'}}
.. note ::
- sequential parsing of the file (the same as :py:func:`read`):

.. code-block:: python

>>> with mgf.MGF('tests/test.mgf') as reader:
..: for spectrum in reader:
..: ...

- accessing the file header (the same as :py:func:`read_header`):

.. code-block:: python

>>> f = mgf.MGF('tests/test.mgf')
>>> f.header
{'charge': [2, 3],
'com': 'Based on http://www.matrixscience.com/help/data_file_help.html',
'it_mods': 'Oxidation (M)',
'itol': '1',
'itolu': 'Da',
'mass': 'Monoisotopic',
'mods': 'Carbamidomethyl (C)',
'useremail': 'leu@altered-state.edu',
'username': 'Lou Scene'}

- direct access to spectra by title (the same as :py:func:`get_spectrum`):

.. code-block:: python

>>> f = mgf.MGF('tests/test.mgf')
>>> f['Spectrum 2']
{'charge array': masked_array(data = [3 2 1 1 1 1],
mask = False,
fill_value = 0),
'intensity array': array([ 237., 128., 108., 1007., 974., 79.]),
'm/z array': array([ 345.1, 370.2, 460.2, 1673.3, 1674. , 1675.3]),
'params': {'charge': [2, 3],
'com': 'Based on http://www.matrixscience.com/help/data_file_help.html',
'it_mods': 'Oxidation (M)',
'itol': '1',
'itolu': 'Da',
'mass': 'Monoisotopic',
'mods': 'Carbamidomethyl (C)',
'pepmass': (1084.9, 1234.0),
'rtinseconds': '25',
'scans': '3',
'title': 'Spectrum 2',
'useremail': 'leu@altered-state.edu',
'username': 'Lou Scene'}}

.. note ::
:py:class:`MGF`'s support for direct indexing is rudimentary, because it does not in fact keep an index and has
to search through the file line-wise on every call. :py:class:`pyteomics.mgf.IndexedMGF` is designed for
random access and more (see `Indexed Parsers`_ for details).
Expand Down
2 changes: 1 addition & 1 deletion doc/source/data/xml.rst → doc/source/data/xml.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ idXML
**idXML** is an OpenMS format for peptide identifications. It is supported in :py:mod:`pyteomics.openms.idxml`.
It partially supports indexing (protein information can be indexed and extracted with `retrieve_refs`).

The regular iterative parsing is done through :py:func:`read` or :py:class:`IDXML`, and :py:class:`pandas.DataFrame`s
The regular iterative parsing is done through :py:func:`read` or :py:class:`IDXML`, and :py:class:`pandas.DataFrame`
can be created as well.


Expand Down
14 changes: 8 additions & 6 deletions doc/source/intro.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Introduction
============

This tutorial covers the basic Pyteomics functionality. For more details,
please, check the API reference. You can also access the API docstrings from
This tutorial covers the basic Pyteomics functionality. For more details,
please, check the API reference. You can also access the API docstrings from
Python shell:

.. code-block:: python
Expand All @@ -12,10 +12,12 @@ Python shell:
IPython users can use the following shortcut:

.. code-block:: python
.. code-block::
In [1]: from pyteomics.mass import calculate_mass
In [2]: calculate_mass?
>>> from pyteomics.mass import calculate_mass
>>> calculate_mass?
We expect the reader to be familiar with the basic Python syntax as well as
We expect the reader to be familiar with the basic Python syntax as well as
proteomics concepts.

0 comments on commit 29f4136

Please sign in to comment.