xi-mzidentml-converter


Namexi-mzidentml-converter JSON
Version 0.1.29 PyPI version JSON
download
home_pagehttps://github.com/PRIDE-Archive/xi-mzidentml-converter
Summaryxi-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.
upload_time2024-04-30 13:33:13
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
license'Apache 2.0
keywords crosslinking python proteomics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # xi-mzidentml-converter
![python-app](https://github.com/Rappsilber-Laboratory/xi-mzidentml-converter/actions/workflows/python-app.yml/badge.svg)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

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```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PRIDE-Archive/xi-mzidentml-converter",
    "name": "xi-mzidentml-converter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "crosslinking python proteomics",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/3e/20/655a8642d0b5b9dffffd3f435f63fe4cb67b7617a9b16a78ff152ee6c0b1/xi_mzidentml_converter-0.1.29.tar.gz",
    "platform": "any",
    "description": "# xi-mzidentml-converter\n![python-app](https://github.com/Rappsilber-Laboratory/xi-mzidentml-converter/actions/workflows/python-app.yml/badge.svg)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nxi-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.\n\n### Requirements:\npython3.10\n\npipenv\n\nsqlite3 or postgresql (these instruction use posrgresql)\n\n## 1. Installation\n\nClone git repository :\n\n```git clone https://github.com/Rappsilber-Laboratory/xi-mzidentml-converter.git```\n\ncd into the repository:\n\n```cd xi-mzidentml-converter```\n\nCheckout python3 branch:\n\n```git checkout python3```\n\n## 2. create a postgresql role and database to use\n\n```\nsudo su postgres\npsql\ncreate database xiview;\ncreate user xiadmin with login password 'your_password_here';\ngrant all privileges on database xiview to xiadmin;\n```\n\nfind the hba.conf file in the postgresql installation directory and add a line to allow  the xiadmin role to access the database:\ne.g.\n```\nsudo nano /etc/postgresql/13/main/pg_hba.conf\n```\nthen add the line:\n`local   xiview   xiadmin   md5`\n\nthen restart postgresql:\n```\nsudo service postgresql restart\n```\n\n## 3. Configure the python environment for the file parser\n\nedit the file xiSPEC_ms_parser/credentials.py to point to your postgressql database.\ne.g. so its content is:\n```\nhostname = 'localhost'\nusername = 'xiadmin'\npassword = 'your_password_here'\ndatabase = 'xiview'\nport = 5432\n```\n\nSet up the python environment:\n\n```\ncd xiSPEC_ms_parser\npipenv install --python 3.10\n```\n\nrun create_db_schema.py to create the database tables:\n```\npython create_db_schema.py\n```\n\nparse a test dataset:\n```\npython process_dataset.py -d ~/PXD038060 -i PXD038060\n```\n\nThe argument ```-d``` is the directory to read files from and ```-i``` is the project identifier to use in the database.\n\n### To run tests\n\nMake sure we have the right db user available\n```\npsql -p 5432 -c \"create role ximzid_unittests with password 'ximzid_unittests';\"\npsql -p 5432 -c 'alter role ximzid_unittests with login;'\npsql -p 5432 -c 'alter role ximzid_unittests with createdb;'\npsql -p 5432 -c 'GRANT pg_signal_backend TO ximzid_unittests;'\n```\nrun the tests\n\n```pipenv run pytest```\n",
    "bugtrack_url": null,
    "license": "'Apache 2.0",
    "summary": "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.",
    "version": "0.1.29",
    "project_urls": {
        "Homepage": "https://github.com/PRIDE-Archive/xi-mzidentml-converter"
    },
    "split_keywords": [
        "crosslinking",
        "python",
        "proteomics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b920b1eebeb253cd63334704cb90e084097f9130521893e757de5ac6457d67c",
                "md5": "d54bf15619aafec82f5b4d31172cabce",
                "sha256": "f715a49ffc8283981fcab43c158aa7174c4240a9e91381dd83536769db11d59b"
            },
            "downloads": -1,
            "filename": "xi_mzidentml_converter-0.1.29-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d54bf15619aafec82f5b4d31172cabce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 65291,
            "upload_time": "2024-04-30T13:33:12",
            "upload_time_iso_8601": "2024-04-30T13:33:12.136137Z",
            "url": "https://files.pythonhosted.org/packages/6b/92/0b1eebeb253cd63334704cb90e084097f9130521893e757de5ac6457d67c/xi_mzidentml_converter-0.1.29-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e20655a8642d0b5b9dffffd3f435f63fe4cb67b7617a9b16a78ff152ee6c0b1",
                "md5": "7c8b1e6ba1d97d941b5a2753ff72eecd",
                "sha256": "13575da34c36df3eaad4b10bff28e24f52ab8bdfdd129a2f0f8be9e79854ab10"
            },
            "downloads": -1,
            "filename": "xi_mzidentml_converter-0.1.29.tar.gz",
            "has_sig": false,
            "md5_digest": "7c8b1e6ba1d97d941b5a2753ff72eecd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 49249,
            "upload_time": "2024-04-30T13:33:13",
            "upload_time_iso_8601": "2024-04-30T13:33:13.286868Z",
            "url": "https://files.pythonhosted.org/packages/3e/20/655a8642d0b5b9dffffd3f435f63fe4cb67b7617a9b16a78ff152ee6c0b1/xi_mzidentml_converter-0.1.29.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-30 13:33:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PRIDE-Archive",
    "github_project": "xi-mzidentml-converter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "xi-mzidentml-converter"
}
        
Elapsed time: 0.26810s