Skip to main content

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

python-app License

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


Download files

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

Source Distribution

xi-mzidentml-converter-0.1.2.tar.gz (43.0 kB view details)

Uploaded Source

Built Distribution

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

xi_mzidentml_converter-0.1.2-py3-none-any.whl (58.5 kB view details)

Uploaded Python 3

File details

Details for the file xi-mzidentml-converter-0.1.2.tar.gz.

File metadata

  • Download URL: xi-mzidentml-converter-0.1.2.tar.gz
  • Upload date:
  • Size: 43.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for xi-mzidentml-converter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b9ca75cddcd5c161b5ce784e3bc4bb9bb2d181b827b27e921696f11791556370
MD5 45b261c6f5f4264ca9ab65619c6b7385
BLAKE2b-256 c8030457ae4d58a3d3d75df9dbbc3bc857889bd2233810af7481a02a9762e06e

See more details on using hashes here.

File details

Details for the file xi_mzidentml_converter-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for xi_mzidentml_converter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f0ac44f8dad6abc25c925ca6f73635173bb589b78b70923d55953877393b159
MD5 bdf9ffa7c42972bb19fdfa63172a4d11
BLAKE2b-256 8c3b03149101a516f31b0efbb394166cecf430a3e5aa715f141107f1d37d1553

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