xi-mzidentml-converter uses pyteomics (https://pyteomics.readthedocs.io/en/latest/index.html) to parse mzIdentML files (v1.2.0) and extract crosslink information. Results are written to a relational database (PostgreSQL or SQLite) using sqlalchemy.
Project description
xi-mzidentml-converter
xi-mzidentml-converter uses pyteomics (https://pyteomics.readthedocs.io/en/latest/index.html) to parse mzIdentML files (v1.2.0) and extract crosslink information. Results are written to a relational database (PostgreSQL or SQLite) using sqlalchemy.
Requirements:
python3.10
pipenv
sqlite3 or postgresql (these instruction use posrgresql)
1. Installation
Clone git repository :
git clone https://github.com/Rappsilber-Laboratory/xi-mzidentml-converter.git
cd into the repository:
cd xi-mzidentml-converter
Checkout python3 branch:
git checkout python3
2. create a postgresql role and database to use
sudo su postgres
psql
create database xiview;
create user xiadmin with login password 'your_password_here';
grant all privileges on database xiview to xiadmin;
find the hba.conf file in the postgresql installation directory and add a line to allow the xiadmin role to access the database: e.g.
sudo nano /etc/postgresql/13/main/pg_hba.conf
then add the line:
local xiview xiadmin md5
then restart postgresql:
sudo service postgresql restart
3. Configure the python environment for the file parser
edit the file xiSPEC_ms_parser/credentials.py to point to your postgressql database. e.g. so its content is:
hostname = 'localhost'
username = 'xiadmin'
password = 'your_password_here'
database = 'xiview'
port = 5432
Set up the python environment:
cd xiSPEC_ms_parser
pipenv install --python 3.10
run create_db_schema.py to create the database tables:
python create_db_schema.py
parse a test dataset:
python process_dataset.py -d ~/PXD038060 -i PXD038060
The argument -d
is the directory to read files from and -i
is the project identifier to use in the database.
To run tests
Make sure we have the right db user available
psql -p 5432 -c "create role ximzid_unittests with password 'ximzid_unittests';"
psql -p 5432 -c 'alter role ximzid_unittests with login;'
psql -p 5432 -c 'alter role ximzid_unittests with createdb;'
psql -p 5432 -c 'GRANT pg_signal_backend TO ximzid_unittests;'
run the tests
pipenv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for xi_mzidentml_converter-0.1.27.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c52b66d1173b74cbbaf3f5b03bf94cbfa630b0c6aa6f0a1f96b7e6ba7bfbd719 |
|
MD5 | 88a65455988be1af9fec3c2d16876c62 |
|
BLAKE2b-256 | a86d55774584a0c58c16f5dc923c54c9a809ccc915500b39bdaee27228986f06 |
Hashes for xi_mzidentml_converter-0.1.27-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d3d7d3b21d92d0b0d8a3d501dcf4f0393eeba84b7e7abb215f1dbbd72955803 |
|
MD5 | 95b561ce80e1c2c01414c01e04d716b6 |
|
BLAKE2b-256 | 9516a624d5f87199f68f32d43a26b5837d3210e0b8f06f17c8f107621cfdb992 |