msp2db
Python package to create an SQLite database from a collection of MSP mass spectromertry spectra files. Currently works with MSP files formated as MassBank records or as MoNA records.
The resulting SQLite database can be used for spectral matching with msPurity Bioconductor R package, see vigenette.
Installation
$ pip install .
Command line
$ msp2db --msp_pth [msp file or directory of msp files] --source [name of source of msp e.g. massbank] --out_pth [out dir]
$ msp2db --help
usage: PROG [-h] -m MSP_PTH -s SOURCE [-o OUT_PTH] [-t TYPE] [-d] [-l MSLEVEL]
[-c CHUNK] [-x SCHEMA]
Convert msp to SQLite or MySQL database
optional arguments:
-h, --help show this help message and exit
-m MSP_PTH, --msp_pth MSP_PTH
path to the MSP file (or directory of msp files)
-s SOURCE, --source SOURCE
Name of data source (e.g. MassBank, LipidBlast)
-o OUT_PTH, --out_pth OUT_PTH
file path for SQLite database
-t TYPE, --db_type TYPE
database type [mysql, sqlite]
-d, --delete_tables delete tables
-l MSLEVEL, --mslevel MSLEVEL
ms level of fragmentation if not detailed in msp file
-c CHUNK, --chunk CHUNK
Chunks of spectra to parse data (useful to control
memory usage)
-x SCHEMA, --schema SCHEMA
Type of schema used (by default is "mona" msp style
but can use "massbank" style)
--------------
API
db_pth = 'spectral_library_07112018v1.db'
create_db(file_pth=db_pth, db_type='sqlite', db_name='spectra')
libdata = LibraryData(msp_pth='MoNA-export-FAHFA.msp',
db_pth=db_pth,
db_type='sqlite',
d_form=None,
schema='mona',
source='fahfa',
mslevel=None,
chunk=200)
Developers & Contributors
Tom Lawson: t.n.lawson@bham.ac.uk
License
Released under the GNU General Public License v3.0 (see LICENSE file)
Metadata
Release files for msp2db 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| msp2db-0.0.9.tar.gz | 30.5 kB | Without provenance | Details for msp2db-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| msp2db-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for msp2db-0.0.9-py3-none-any.whl |
Total release size: 61.6 kB
Release files / msp2db-0.0.9.tar.gz
| Download URL | msp2db-0.0.9.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43ede3ff591cd7a16d98d0bf76cec9d064ec7ea5cd98208bbe45ca99142c1a26
|
|
BLAKE2b-256 checksum How to use checksums |
af3160ebd31acfd3247a2c8525f1ddf6ed8d91632caf1a6d5cfa89f3a168a969
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191101 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.8.0
|
Release files / msp2db-0.0.9-py3-none-any.whl
| Download URL | msp2db-0.0.9-py3-none-any.whl |
|---|---|
| Size | 31.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e579901e4ea538a4495df1acd20d9e117e9fdd760a9a59eef9a854571efee856
|
|
BLAKE2b-256 checksum How to use checksums |
e1a443f63e619f6e6ccedb1f401b1f9dbc6f7ca43e0ee35832f3aac6d3c28898
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191101 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.8.0
|
Security for msp2db 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.