将msp转换为数据库的Python包
项目描述
Python包,用于将一组MSP质谱仪光谱文件转换为SQLite数据库。目前可以处理格式为MassBank记录或MoNA记录的MSP文件。
生成的SQLite数据库可用于与msPurity Bioconductor R包进行光谱匹配,请参阅教程。
安装
$ pip install .
命令行
$ 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)
开发者 & 贡献者
Tom Lawson: t.n.lawson@bham.ac.uk
许可证
在GNU通用公共许可证v3.0下发布(见LICENSE文件)
项目详情
下载文件
下载适用于您平台的文件。如果您不确定该选择哪个,请了解更多关于安装软件包的信息。
源分布
msp2db-0.0.9.tar.gz (30.5 kB 查看哈希值)
构建分布
msp2db-0.0.9-py3-none-any.whl (31.1 kB 查看哈希值)