A Lipidomics Database Explorer Package
Project description
Lipid Librarian
Build and Installation Instructions
Make sure you've installed python 3.11 and are using this version to create the virtual environment as well. If you experience slow performance, consider running a local SQL server to serve the ALEX¹²³ database instead of reading it from a file, or disable ALEX¹²³ for your queries.
Python Virtual Environment
make install install_optional
Docker Container
docker build -t lipidlibrarian -f Containerfile .
OCI Container for Docker/Podman/Kubernetes
buildah build -t lipidlibrarian -f Containerfile .
Test Lipid Librarian
Run pytest in the git root directory with a venv activated with LipidLibrarian installed. It is highly recommended to run a local ALEX123 SQL Database for performance reasons (see below)
pytest
Run Lipid Librarian
CLI
In case you installed Lipid Librarian into a 'venv' virtual environment, make sure you activate it before with source venv/bin/activate.
lipidlibrarian "PC(18:1_20:0)" "PE 38:1" "816.6477;0.001;+H+" "Cholesterol" "SLM:000487065"
lipidlibrarian path/to/file
cat path/to/file | lipidlibrarian
Docker
docker run lipidlibrarian "PC(18:1_20:0)" "PE 38:1" "816.6477;0.001;+H+" "Cholesterol" "SLM:000487065"
Podman
podman run lipidlibrarian "PC(18:1_20:0)" "PE 38:1" "816.6477;0.001;+H+" "Cholesterol" "SLM:000487065"
Import Python Package
from lipidlibrarian.LipidQuery import *
query1 = LipidQuery("PC(18:1_20:0)").query()
query2 = LipidQuery("PE 38:1").query()
query3 = LipidQuery("816.6477;0.001;+H+").query()
query4 = LipidQuery("Cholesterol").query()
query5 = LipidQuery("SLM:000487065").query()
for lipid in query1:
print(repr(lipid))
for lipid in query2:
print(format(lipid, 'json'))
for lipid in query3:
print(format(lipid, 'html'))
for lipid in query4:
print(repr(lipid))
for lipid in query5:
print(repr(lipid))
Run a local ALEX¹²³ SQL Database
The performance of querying the ALEX¹²³ database is quite low, as the whole file has to be parsed into memory first. To alleviate this issue, run a local SQL database to serve the information from ALEX¹²³ to lipidlibrarian:
from an SQL dump file:
mkdir -p data/alex123/sql
gdown 1K5-PnK9HEA5L0Y79CaLgFMKOQGddDSgi -O data/alex123/sql/alex123_db.sql
podman run --detach --name alex123-sql --env MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 --env MARIADB_USER=alex123 --env MARIADB_PASSWORD=alex123 --env MARIADB_DATABASE=alex123 -p 3306:3306 -v ./data/alex123/sql:/docker-entrypoint-initdb.d:O mariadb:latest
or alternatively:
podman run --detach --name alex123-sql --env MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 --env MARIADB_USER=alex123 --env MARIADB_PASSWORD=alex123 --env MARIADB_DATABASE=alex123 -p 3306:3306 docker.io/library/mariadb:latest
sync_alex123_sql_database --sql mysql+pymysql://alex123:alex123@127.0.0.1:3306/alex123
lipidlibrarian --sql --sql-host 127.0.0.1 --sql-port 3306 --sql-user alex123 --sql-password alex123 --sql-database alex123 "PC(18:1_20:0)"
from this container you can create the SQL dump file:
podman exec alex123-sql mariadb-dump --user alex123 --password=alex123 alex123 > alex123_db.sql
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lipidlibrarian-0.5.1.tar.gz.
File metadata
- Download URL: lipidlibrarian-0.5.1.tar.gz
- Upload date:
- Size: 88.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d87c5fb81b3ab0c4a183858eff1b4590418b3b3ea980463b5ea6c7ed98a6aa25
|
|
| MD5 |
c6870958df7a15da0176f5550907b249
|
|
| BLAKE2b-256 |
3bd09d8e0212923fa6dc78552054eb9903e821d8e6b475e5b1ed92b3014f7af1
|
Provenance
The following attestation bundles were made for lipidlibrarian-0.5.1.tar.gz:
Publisher:
publish.yaml on LipiTUM/lipidlibrarian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lipidlibrarian-0.5.1.tar.gz -
Subject digest:
d87c5fb81b3ab0c4a183858eff1b4590418b3b3ea980463b5ea6c7ed98a6aa25 - Sigstore transparency entry: 1273270890
- Sigstore integration time:
-
Permalink:
LipiTUM/lipidlibrarian@5e77572ea3029bbf20a43c3eca4a2a183fb5aeea -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/LipiTUM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@5e77572ea3029bbf20a43c3eca4a2a183fb5aeea -
Trigger Event:
release
-
Statement type:
File details
Details for the file lipidlibrarian-0.5.1-py3-none-any.whl.
File metadata
- Download URL: lipidlibrarian-0.5.1-py3-none-any.whl
- Upload date:
- Size: 89.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fee2b4b5d3481dffcaf4cfbd24b29b1502dd73ea322cd74e746e9405332963c
|
|
| MD5 |
5babde814450b2bcb6396126ada5bc99
|
|
| BLAKE2b-256 |
7d1789a276f313b1411196361c935031247ddfd28224b19dec52fed4d9db9b20
|
Provenance
The following attestation bundles were made for lipidlibrarian-0.5.1-py3-none-any.whl:
Publisher:
publish.yaml on LipiTUM/lipidlibrarian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lipidlibrarian-0.5.1-py3-none-any.whl -
Subject digest:
5fee2b4b5d3481dffcaf4cfbd24b29b1502dd73ea322cd74e746e9405332963c - Sigstore transparency entry: 1273271030
- Sigstore integration time:
-
Permalink:
LipiTUM/lipidlibrarian@5e77572ea3029bbf20a43c3eca4a2a183fb5aeea -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/LipiTUM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@5e77572ea3029bbf20a43c3eca4a2a183fb5aeea -
Trigger Event:
release
-
Statement type: