Skip to content

Commit

Permalink
Release v2.0.0 (#66)
Browse files Browse the repository at this point in the history
* First stable Python 3 only release

* Refactor and improve HDF5 portal to save peaklists and/or peak matrices

* Add compatibility for previous HDF5 files (python 2 version of DIMSpy)

* Improve filelist handling

* mzML or raw files are ordered by timestamp if no filelist is provided (i.e. process_scans)

* Fix warnings (NaturalNameWarning, ResourceWarning, DeprecationWarning)

* Fix 'blank filter' bug (missing and/or zero values are excluded)

* Improve sub setting / filtering of scan events

* Optimise imports

* Increase coverage tests

* Improve documentation (Read the Docs), including docstrings

Co-authored-by: albert <[email protected]>
Co-authored-by: Thomas N Lawson <[email protected]>
  • Loading branch information
3 people authored Apr 26, 2020
1 parent 466dd1e commit 02cbd93
Show file tree
Hide file tree
Showing 77 changed files with 3,546 additions and 1,354 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ install:
- conda info -a
- conda env create -n test-environment -f environment.yml
- source activate test-environment
- conda install coverage codecov -c conda-forge
- python setup.py install

- conda install pytest codecov pytest-cov -c conda-forge
- pip install .
script:
- dimspy --help
- coverage run --source dimspy setup.py test
- pytest --cov=dimspy tests/

after_script:
- python -m codecov
- codecov
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
include README.rst
include LICENSE
include RawFileReaderLicense.rst
include requirements.txt
include examples/*.*
include tests/*.py
include tests/data/*.*
include tests/data/MTBLS79_subset/*.*
include tests/data/MTBLS79_subset/mzml/*.*
include tests/data/MTBLS79_subset/raw/*.*
include tests/test_results/*.*
include tests/results/*.*
include dimspy/portals/ThermoRawFileReader_3_0_41/Libraries/*.XML
include dimspy/portals/ThermoRawFileReader_3_0_41/Libraries/*.dll
include dimspy/portals/ThermoRawFileReader_3_0_41/License/RawFileRdr_License_Agreement_RevA.doc
61 changes: 40 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,51 +1,65 @@
DIMSpy
======
|Version| |Py versions| |Git| |Bioconda| |Build Status (Travis)| |Build Status (AppVeyor)| |License| |RTD doc| |codecov| |binder|
|Py versions| |Version| |Bioconda| |Galaxy-eu| |Git| |Build Status (Travis)| |Build Status (AppVeyor)| |codecov| |License| |binder| |RTD doc| |gitter|

Python package for processing direct-infusion mass spectrometry-based metabolomics and lipidomics data

- **Documentation:** https://dimspy.readthedocs.io/en/latest
- **Source:** https://github.com/computational-metabolomics/dimspy
- **Bug reports:** https://github.com/computational-metabolomics/dimspy/issues

Installation
------------

Installation (Conda, PyPi and Galaxy)
-------------------------------------
See the `Installation page <https://dimspy.readthedocs.io/en/latest/introduction.html#installation>`__ of
the `online documentation <https://computational-metabolomics.github.io/dimspy/>`__.


Command line
------------
::

$ dimspy --help


Bugs
----
Bug reports
-----------
Please report any bugs that you find `here <https://github.com/computational-metabolomics/dimspy/issues>`_.
Or fork the repository on `GitHub <https://github.com/computational-metabolomics/dimspy/>`_
and create a pull request (PR). We welcome all contributions, and we
will help you to make the PR if you are new to `git`.


Developers & Contributors
-------------------------
Credits
-------
DIMSpy was originally written by Ralf Weber and Albert Zhou and has been developed with the help of many others.
Thanks to everyone who has improved DIMSpy by contributing code, adding features, bug reports and fixes, and documentation.

**Developers and contributers**
- Ralf J. M. Weber ([email protected]) - `University of Birmingham (UK) <https://www.birmingham.ac.uk/staff/profiles/biosciences/weber-ralf.aspx>`_
- Jiarui (Albert) Zhou ([email protected]) - `University of Birmingham (UK) <http://www.birmingham.ac.uk/index.aspx>`_, `HIT Shenzhen (China) <http://www.hitsz.edu.cn>`_
- Thomas N. Lawson (tnl495@bham.ac.uk) - `University of Birmingham (UK) <http://www.birmingham.ac.uk/index.aspx>`_
- Thomas N. Lawson (t.n.lawson@bham.ac.uk) - `University of Birmingham (UK) <http://www.birmingham.ac.uk/index.aspx>`_
- Martin R. Jones ([email protected]) - `Eawag (Switzerland) <https://www.eawag.ch/en/aboutus/portrait/organisation/staff/profile/martin-jones/show/>`_

**DIMSpy acknowledges support from the following funders:**
- BBSRC, grant number BB/M019985/1
- European Commission's H2020 programme, grant agreement number 654241
- Wellcome Trust, grant number 202952/Z/16/Z

**Citation**

To cite DIMSpy please use one of the Zenodo references listed `here <https://dimspy.readthedocs.io/en/latest/citation.html>`__.


License
-------
Released under the GNU General Public License v3.0 (see `LICENSE file <https://github.com/computational-metabolomics/dimspy/blob/master/LICENSE>`_)
--------
DIMSpy is licensed under the GNU General Public License v3.0 (see `LICENSE file <https://github.com/computational-metabolomics/dimspy/blob/master/LICENSE>`_ for licensing information). Copyright © 2017 - 2020 Ralf Weber, Albert Zhou

**Third-party licenses and copyright**

.. |Build Status (Travis)| image:: https://img.shields.io/travis/computational-metabolomics/dimspy.svg?style=flat&maxAge=3600&label=Travis-CI
:target: https://travis-ci.org/computational-metabolomics/dimspy
RawFileReader reading tool. Copyright © 2016 by Thermo Fisher Scientific, Inc. All rights reserved. See `RawFileReaderLicense <https://github.com/computational-metabolomics/dimspy/blob/master/RawFileReaderLicense.rst>`_ for licensing information.
Using DIMSpy software for processing Thermo Fisher Scientific *.raw files implies the acceptance of the RawFileReader license terms.
Anyone receiving RawFileReader as part of a larger software distribution (in the current context, as part of DIMSpy) is considered an "end user" under
section 3.3 of the RawFileReader License, and is not granted rights to redistribute RawFileReader.
.. |Build Status (AppVeyor)| image:: https://img.shields.io/appveyor/ci/RJMW/dimspy.svg?style=flat&maxAge=3600&label=AppVeyor

.. |Build Status (Travis)| image:: https://img.shields.io/travis/computational-metabolomics/dimspy.svg?logo=travis&maxAge=600&style=flat-square
:target: https://travis-ci.com/computational-metabolomics/dimspy

.. |Build Status (AppVeyor)| image:: https://img.shields.io/appveyor/ci/RJMW/dimspy.svg?logo=appveyor&style=flat-square&maxAge=600
:target: https://ci.appveyor.com/project/RJMW/dimspy/branch/master

.. |Py versions| image:: https://img.shields.io/pypi/pyversions/dimspy.svg?style=flat&maxAge=3600
Expand All @@ -57,8 +71,11 @@ Released under the GNU General Public License v3.0 (see `LICENSE file <https://g
.. |Git| image:: https://img.shields.io/badge/repository-GitHub-blue.svg?style=flat&maxAge=3600
:target: https://github.com/computational-metabolomics/dimspy

.. |Bioconda| image:: https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat&maxAge=3600
.. |Bioconda| image:: https://img.shields.io/conda/vn/bioconda/dimspy?style=flat-square&maxAge=3600
:target: http://bioconda.github.io/recipes/dimspy/README.html

.. |galaxy-eu| image:: https://img.shields.io/badge/usegalaxy-.eu-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAASCAYAAABB7B6eAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAACC2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjE8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlBob3RvbWV0cmljSW50ZXJwcmV0YXRpb24+MjwvdGlmZjpQaG90b21ldHJpY0ludGVycHJldGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KD0UqkwAAAn9JREFUOBGlVEuLE0EQruqZiftwDz4QYT1IYM8eFkHFw/4HYX+GB3/B4l/YP+CP8OBNTwpCwFMQXAQPKtnsg5nJZpKdni6/6kzHvAYDFtRUT71f3UwAEbkLch9ogQxcBwRKMfAnM1/CBwgrbxkgPAYqlBOy1jfovlaPsEiWPROZmqmZKKzOYCJb/AbdYLso9/9B6GppBRqCrjSYYaquZq20EUKAzVpjo1FzWRDVrNay6C/HDxT92wXrAVCH3ASqq5VqEtv1WZ13Mdwf8LFyyKECNbgHHAObWhScf4Wnj9CbQpPzWYU3UFoX3qkhlG8AY2BTQt5/EA7qaEPQsgGLWied0A8VKrHAsCC1eJ6EFoUd1v6GoPOaRAtDPViUr/wPzkIFV9AaAZGtYB568VyJfijV+ZBzlVZJ3W7XHB2RESGe4opXIGzRTdjcAupOK09RA6kzr1NTrTj7V1ugM4VgPGWEw+e39CxO6JUw5XhhKihmaDacU2GiR0Ohcc4cZ+Kq3AjlEnEeRSazLs6/9b/kh4eTC+hngE3QQD7Yyclxsrf3cpxsPXn+cFdenF9aqlBXMXaDiEyfyfawBz2RqC/O9WF1ysacOpytlUSoqNrtfbS642+4D4CS9V3xb4u8P/ACI4O810efRu6KsC0QnjHJGaq4IOGUjWTo/YDZDB3xSIxcGyNlWcTucb4T3in/3IaueNrZyX0lGOrWndstOr+w21UlVFokILjJLFhPukbVY8OmwNQ3nZgNJNmKDccusSb4UIe+gtkI+9/bSLJDjqn763f5CQ5TLApmICkqwR0QnUPKZFIUnoozWcQuRbC0Km02knj0tPYx63furGs3x/iPnz83zJDVNtdP3QAAAABJRU5ErkJggg==
:target: http://usegalaxy.eu

.. |License| image:: https://img.shields.io/pypi/l/dimspy.svg?style=flat&maxAge=3600
:target: https://www.gnu.org/licenses/gpl-3.0.html
Expand All @@ -72,3 +89,5 @@ Released under the GNU General Public License v3.0 (see `LICENSE file <https://g
.. |binder| image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/computational-metabolomics/dimspy/master?filepath=notebooks%2Fworkflow.ipynb

.. |gitter| image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/computational-metabolomics/dimspy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
68 changes: 68 additions & 0 deletions RawFileReaderLicense.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

This license (see "SOFTWARE LICENSE AGREEMENT" below) covers the following files which are distributed with the DIMSpy software package:

- ThermoFisher.CommonCore.BackgroundSubtraction.dll
- ThermoFisher.CommonCore.BackgroundSubtraction.XML
- ThermoFisher.CommonCore.Data.dll
- ThermoFisher.CommonCore.Data.XML
- ThermoFisher.CommonCore.MassPrecisionEstimator.dll
- ThermoFisher.CommonCore.MassPrecisionEstimator.XML
- ThermoFisher.CommonCore.RawFileReader.dll
- ThermoFisher.CommonCore.RawFileReader.XML

Anyone receiving RawFileReader as part of a larger software distribution (in the current context, as part of DIMSpy) is considered an "end user" under
section 3.3 of the RawFileReader License, and is not granted rights to redistribute RawFileReader.

|
**SOFTWARE LICENSE AGREEMENT ("License") FOR RawFileReader**
----------------------------------------------------------------------
These License terms are an agreement between you and Thermo Finnigan LLC ("Licensor"). They apply to Licensor's MSFileReader software program ("Software"), which includes documentation and any media on which you received it. These terms also apply to any updates or supplements for this Software, unless other terms accompany those items, in which case those terms apply. **If you use this Software, you accept this License. If you do not accept this License, you are prohibited from using this software. If you comply with these License terms, you have the rights set forth below.**

1. Rights Granted:

1.1. You may install and use this Software on any of your computing devices.

1.2. You may distribute this Software to others, but only in combination with other software components and/or programs that you provide and subject to the distribution requirements and restrictions below.

2. Use Restrictions:

2.1. You may not decompile, disassemble, reverse engineer, use reflection or modify this Software.

3. Distribution Requirements:

If you distribute this Software to others, you agree to:

3.1. Indemnify, defend and hold harmless the Licensor from any claims, including attorneys' fees, related to the distribution or use of this Software;

3.2. Display the following text in your software's "About" box: " **RawFileReader reading tool. Copyright © 2016 by Thermo Fisher Scientific, Inc. All rights reserved**.";

3.3. Require your end users to agree to a license agreement that prohibits them from redistributing this Software to others.

4. Distribution Restrictions:

4.1. You may not use the Licensor's trademarks in a way that suggests your software components and/or programs are provided by or are endorsed by the Licensor; and

4.2. You may not commercially exploit this Software or products that incorporate this Software without the prior written consent of Licensor. Commercial exploitation includes, but is not limited to, charging a purchase price, license fee, maintenance fee, or subscription fee; or licensing, transferring or redistributing the Software in exchange for consideration of any kind.

4.3. Your rights to this Software do not include any license, right, power or authority to subject this Software in whole or in part to any of the terms of an Excluded License. "Excluded License" means any license that requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other software combined and/or distributed with such software be (a) disclosed or distributed in source code form; or (b) licensed for the purpose of making derivative works. Without limiting the foregoing obligation, you are specifically prohibited from distributing this Software with any software that is subject to the General Public License (GPL) or similar license in a manner that would create a combined work.

5. Additional Terms Applicable to Software:

5.1. This Software is licensed, not sold. This License only gives you some rights to use this Software; the Licensor reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use this Software only as expressly permitted in this License.

5.2. Licensor has no obligation to fix, update, supplement or support this Software.

5.3. This Software is not designed, manufactured or intended for any use requiring fail-safe performance in which the failure of this Software could lead to death, serious personal injury or severe physical and environmental damage ("High Risk Activities"), such as the operation of aircraft, medical or nuclear facilities. You agree not to use, or license the use of, this Software in connection with any High Risk Activities.

5.4. Your rights under this License terminate automatically if you breach this License in any way. Termination of this License will not affect any of your obligations or liabilities arising prior to termination. The following sections of this License shall survive termination: 2.1, 3.1, 3.2, 3.3, 4.1, 4.2, 4.3, 5.1, 5.2, 5.3, 5.5, 5.6, 5.7, 5.8, and 5.9.

5.5. This Software is subject to United States export laws and regulations. You agree to comply with all domestic and international export laws and regulations that apply to this Software. These laws include restrictions on destinations, end users and end use.

5.6. This License shall be construed and controlled by the laws of the State of California, U.S.A., without regard to conflicts of law. You consent to the jurisdiction of the state and federal courts situated in the State of California in any action arising under this License. The application of the U.N. Convention on Contracts for the International Sale of Goods to this License is hereby expressly excluded. If any provision of this License shall be deemed unenforceable or contrary to law, the rest of this License shall remain in full effect and interpreted in an enforceable manner that most nearly captures the intent of the original language.

5.7. THIS SOFTWARE IS LICENSED "AS IS". YOU BEAR ALL RISKS OF USING IT. LICENSOR GIVES NO AND DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, REPRESENTATIONS OR GUARANTEES. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS UNDER YOUR LOCAL LAWS WHICH THIS LICENSE CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, LICENSOR EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.

5.8. LICENSOR'S TOTAL LIABILITY TO YOU FOR DIRECT DAMAGES ARISING UNDER THIS LICENSE IS LIMITED TO U.S. $1.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES, EVEN IF LICENSOR IS EXPRESSLY MADE AWARE OF THE POSSIBILITY THEREOF OR IS NEGLIGENT. THIS LIMITATION APPLIES TO ANYTHING RELATED TO THIS SOFTWARE, SERVICES, CONTENT (INCLUDING CODE) ON THIRD PARTY INTERNET SITES, OR THIRD PARTY PROGRAMS, AND CLAIMS FOR BREACH OF CONTRACT, BREACH OF WARRANTY, GUARANTEE OR CONDITION, STRICT LIABILITY, NEGLIGENCE, OR OTHER TORT TO THE EXTENT PERMITTED BY APPLICABLE LAW.

5.9. Use, duplication or disclosure of this Software by the U.S. Government is subject to the restricted rights applicable to commercial computer software (under FAR 52.227019 and DFARS 252.227-7013 or parallel regulations). The manufacturer for this purpose is Thermo Finnigan LLC, 355 River Oaks Parkway, San Jose, California 95134, U.S.A.
10 changes: 6 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ install:
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda env create -n test-environment -f environment_win.yml
- conda env create -n test-environment -f environment.yml
- activate test-environment
- python setup.py install

- conda install pytest -c conda-forge
- pip install .

test_script:
- python setup.py test
- dimspy --help
- pytest
31 changes: 26 additions & 5 deletions dimspy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@

__author__ = 'Ralf Weber ([email protected]), Albert Zhou ([email protected])'
__credits__ = 'Ralf Weber ([email protected]), Albert Zhou ([email protected])'
__version__ = '1.4.0'
__license__ = 'GPLv3'
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2017-2020 Ralf Weber, Albert Zhou.
#
# This file is part of DIMSpy.
#
# DIMSpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# DIMSpy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DIMSpy. If not, see <https://www.gnu.org/licenses/>.
#


__author__ = 'Ralf Weber ([email protected]), Albert Zhou ([email protected])'
__credits__ = 'Ralf Weber ([email protected]), Albert Zhou ([email protected])'
__version__ = '2.0.0'
__license__ = 'GPLv3'
Loading

0 comments on commit 02cbd93

Please sign in to comment.