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.
python3.10
pipenv
sqlite3 or postgresql (these instruction use posrgresql)
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
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
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.
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