Skip to main content

This python module allows to extract data from the RAW-file-format produces by devices from Thermo Fisher Scientific.

Project description

fisher_py

This Python module allows access to Thermo Orbitrap raw mass spectrometer files. Using this library makes it possible to automate the analysis of mass spectra, without having to export the data first with another tool. This module is a wrapper that builds uppon the RawFileReader project which is a library developed for C#. Structures have been implemented to make processing data more convenient for Python users.

Installation

fisher_py can be installed via the package repository PyPi:

pip install fisher_py

System Requirements

fishery_py shoud work on any modern desktop operating system (Linux, Windows, Mac OS) with Python 3.6 (or higher) installed.

  • Windows: Tested on Windows 10 Pro x64
  • Linux: Tested on Ubuntu 20.04 LTS x64
  • Mac OS: Not tested

The module relies on the RawFileReader DLLs (Dynamic-Linked-Libraries) to be loaded at runtime (using pythonnet). Since Microsoft introduced .NET Standard it is possible to load DLLs compiled with this framework to be loaded on non-Windows systems (such as Mac OS and Linux). However, systems other than Windows may require additional setup steps in order for fisher_py to work. If you have trouble problems installing fisher_py it is probably because of pythonnet not being able to compile. To resolve this the usualy path is to install mono (https://www.mono-project.com/). There are several guides online to do this but one that was tested can be found here.

Examples

The following example demonstrates how to extract and plot data from a raw-file:

import matplotlib.pyplot as plt
from fisher_py import RawFile
from fisher_py.data.business import TraceType
raw_file = RawFile('my_file.raw')

target_mass = 848.36862
mass_tolerance_ppm = 10
rt, i = raw_file.get_chromatogram(target_mass, mass_tolerance_ppm, TraceType.MassRange)
mz, i2, charges, real_rt = raw_file.get_scan_ms1(1)
print(real_rt)

plt.figure()
plt.plot(rt, i)

plt.figure()
plt.plot(mz, i2)

plt.show()

This example may be fine for some use-cases but the RawFile class only provides limited access to all the functionalities and can serve as an example how to use the module wihtin a project. For an example that uses more of the modules capabilites have a look at raw_file_reader_examle.py.

License and copyright

fisher_py (Copyright 2021 ethz-institute-of-microbiology) is licensed under the MIT license.

Third-party licenses and copyright

RawFileReader reading tool. Copyright © 2016 by Thermo Fisher Scientific, Inc. All rights reserved. See RawFileReaderLicense.md for licensing information. Note: anyone recieving RawFileReader as part of a larger software distribution (in the current context, as part of fisher_py) is considered an "end user" under section 3.3 of the RawFileReader License, and is not granted rights to redistribute RawFileReader.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fisher_py-1.0.19.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fisher_py-1.0.19-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file fisher_py-1.0.19.tar.gz.

File metadata

  • Download URL: fisher_py-1.0.19.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for fisher_py-1.0.19.tar.gz
Algorithm Hash digest
SHA256 85fe0f01ccf410d4fb6d9719a51c9ae87254e6d86a87998d22a17ae427c432f8
MD5 364ce22ee1ef93c66cdd4f6586e94af1
BLAKE2b-256 a5cc0afec6f99e98b5f768688cbe8fd30a3d192caa94c5e025f8dada85062d08

See more details on using hashes here.

File details

Details for the file fisher_py-1.0.19-py3-none-any.whl.

File metadata

  • Download URL: fisher_py-1.0.19-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for fisher_py-1.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 9d6bbacd53448fc4aaa89194c00324c9e5d8333d3d45cbf0f9ceb36fe545bbc1
MD5 9550823c87d4eafa91dbefee7b5e153f
BLAKE2b-256 e830ba074dbfc0ee765fba2b156f8a50571c3ae493a365f19c89ef92115ed321

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page