pyJASPAR
--------
A Pythonic interface to JASPAR transcription factor motifs
**pyJASPAR** uses *Biopython* and *SQLite3* to provide a serverless interface to `JASPAR database <http://jaspar.genereg.net>`_ to query and access TF motif profiles across various releases of JASPAR.
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4509415.svg
:target: https://doi.org/10.5281/zenodo.4509415
.. image:: https://travis-ci.org/asntech/pyjaspar.svg?branch=main
:target: https://travis-ci.org/asntech/pyjaspar
.. image:: https://img.shields.io/pypi/pyversions/pyjaspar.svg
:target: https://www.python.org
.. image:: https://img.shields.io/pypi/v/pyjaspar.svg
:target: https://pypi.python.org/pypi/pyjaspar
.. image:: https://anaconda.org/bioconda/pyjaspar/badges/version.svg
:target: https://anaconda.org/bioconda/pyjaspar
.. image:: https://anaconda.org/bioconda/pyjaspar/badges/downloads.svg
:target: https://bioconda.github.io/recipes/pyjaspar/README.html
.. image:: https://img.shields.io/github/issues/asntech/pyjaspar.svg
:target: https://github.com/asntech/pyjaspar/issues
pyJASPAR provides access to the following releases of JASPAR database: *JASPAR2026*, *JASPAR2024*, *JASPAR2022*, *JASPAR2020*, *JASPAR2018*, *JASPAR2016*, *JASPAR2014*.
**Note**: This is a serverless SQLite wrapper around the Biopython JASPAR module `Bio.motifs.jaspar.db` which requires JASPAR MySQL database sever connection details.
Documentation
-------------
**A detailed documentation is available in different formats:** `HTML <http://pyjaspar.readthedocs.org>`_ | `PDF <http://readthedocs.org/projects/pyjaspar/downloads/pdf/latest/>`_ | `ePUB <http://readthedocs.org/projects/pyjaspar/downloads/epub/latest/>`_
Installation
------------
**Note**: The *JASPAR2026* release is available for peer-review purpose via GitHub only. It will be made public after the official release of JASPAR2026 database.
Quick installation using conda
================================
pyJASPAR is available on `Bioconda <https://anaconda.org/bioconda/pyjaspar>`_ for installation via ``conda``.
.. code-block:: bash
conda install -c bioconda pyjaspar
Install using pip
==================
pyJASPAR is also available on `PyPi <https://pypi.org/project/pyjaspar/>`_ for installation via ``pip``.
.. code-block:: bash
pip install pyjaspar
pyJASPAR uses BioPython and it supports python ``3.x``.
Install pyjaspar from source
=============================
You can install a development version by using ``git`` from GitHub.
Install development version from `GitHub`
==========================================
If you have `git` installed, use this:
.. code-block:: bash
git clone https://github.com/asntech/pyjaspar.git
cd pyjaspar
python setup.py sdist install
How to use pyJASPAR?
--------------------
Once you have installed pyjaspar, you can create jaspardb class object:
.. code-block:: pycon
>>> from pyjaspar import jaspardb
#Create the JASPAR2026 release object
>>> jdb_obj = jaspardb(release='JASPAR2026')
#Fetch motif by ID
>>> motif = jdb_obj.fetch_motif_by_id('MA0095.2')
>>> print(motif.name)
YY1
#Fetch motifs by TF name
>>> motifs = jdb_obj.fetch_motifs_by_name('KFL4')
>>> print(len(motifs))
1
# Get a dictionary of frequency count matrics
>>> print(motifs[0].counts)
{'A': [2465.0, 2105.0, 7021.0, 1173.0, 45602.0, 852.0, 1617.0, 1202.0],
'C': [49209.0, 47865.0, 45405.0, 52875.0, 161.0, 52366.0, 51112.0, 51045.0],
'G': [1583.0, 1214.0, 1422.0, 793.0, 6598.0, 1470.0, 1870.0, 1005.0],
'T': [2560.0, 4633.0, 1969.0, 976.0, 3456.0, 1129.0, 1218.0, 2565.0]}
#Get CORE vertebrates non-redundent collection
>>> motifs = jdb_obj.fetch_motifs(
collection = ['CORE'],
tax_group = ['Vertebrates'],
all_versions = False)
>>> print(len(motifs))
1019
## loop through the motifs list and perform analysis
>>> for motif in motifs:
pass
**Note**: Above methods return `Bio.motifs.jaspar.Motif` object. You can find more details `here <http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec262>`_
Find available releases
=======================
.. code-block:: pycon
>>> print(jdb_obj.get_releases())
['JASPAR2026', 'JASPAR2024','JASPAR2022','JASPAR2020', 'JASPAR2018', 'JASPAR2016', 'JASPAR2014']
Cite
=====
- Aziz Khan. pyJASPAR: a Pythonic interface to JASPAR transcription factor motifs. (2021). Zenodo, doi:10.5281/zenodo.4485856
.. code-block:: bash
@software{aziz_khan_2021_4509415,
author = {Aziz Khan},
title = {{pyJASPAR: a Pythonic interface to JASPAR transcription factor motifs}},
month = feb,
year = 2021,
publisher = {Zenodo},
version = {v4.0.0},
doi = {10.5281/zenodo.4485856},
url = {https://doi.org/10.5281/zenodo.4485856}
}
Raw data
{
"_id": null,
"home_page": null,
"name": "pyjaspar",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "JASPAR, transcription factors, motifs, TF, bioinformatics",
"author": null,
"author_email": "Aziz Khan <azez.khan@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e4/b6/df3470cb7bda17a3cc5afa6e0d5e165db9662ec11efa6e95bdcc9ef967b0/pyjaspar-4.0.0.tar.gz",
"platform": null,
"description": "pyJASPAR\n--------\n\n A Pythonic interface to JASPAR transcription factor motifs\n\n**pyJASPAR** uses *Biopython* and *SQLite3* to provide a serverless interface to `JASPAR database <http://jaspar.genereg.net>`_ to query and access TF motif profiles across various releases of JASPAR.\n\n.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4509415.svg\n :target: https://doi.org/10.5281/zenodo.4509415\n\n.. image:: https://travis-ci.org/asntech/pyjaspar.svg?branch=main\n :target: https://travis-ci.org/asntech/pyjaspar\n\n.. image:: https://img.shields.io/pypi/pyversions/pyjaspar.svg\n :target: https://www.python.org\n\n.. image:: https://img.shields.io/pypi/v/pyjaspar.svg\n :target: https://pypi.python.org/pypi/pyjaspar\n\n.. image:: https://anaconda.org/bioconda/pyjaspar/badges/version.svg\n :target: https://anaconda.org/bioconda/pyjaspar\n\n.. image:: https://anaconda.org/bioconda/pyjaspar/badges/downloads.svg\n :target: https://bioconda.github.io/recipes/pyjaspar/README.html\n\n.. image:: https://img.shields.io/github/issues/asntech/pyjaspar.svg\n :target: https://github.com/asntech/pyjaspar/issues\n\n\npyJASPAR provides access to the following releases of JASPAR database: *JASPAR2026*, *JASPAR2024*, *JASPAR2022*, *JASPAR2020*, *JASPAR2018*, *JASPAR2016*, *JASPAR2014*.\n\n**Note**: This is a serverless SQLite wrapper around the Biopython JASPAR module `Bio.motifs.jaspar.db` which requires JASPAR MySQL database sever connection details.\n\n\n\nDocumentation\n-------------\n\n**A detailed documentation is available in different formats:** `HTML <http://pyjaspar.readthedocs.org>`_ | `PDF <http://readthedocs.org/projects/pyjaspar/downloads/pdf/latest/>`_ | `ePUB <http://readthedocs.org/projects/pyjaspar/downloads/epub/latest/>`_\n\n\nInstallation\n------------\n\n**Note**: The *JASPAR2026* release is available for peer-review purpose via GitHub only. It will be made public after the official release of JASPAR2026 database.\n\n\nQuick installation using conda\n================================\npyJASPAR is available on `Bioconda <https://anaconda.org/bioconda/pyjaspar>`_ for installation via ``conda``.\n\n.. code-block:: bash\n\n\tconda install -c bioconda pyjaspar\n\n\nInstall using pip\n==================\npyJASPAR is also available on `PyPi <https://pypi.org/project/pyjaspar/>`_ for installation via ``pip``.\n\n.. code-block:: bash\n\n\tpip install pyjaspar\n\t\n\npyJASPAR uses BioPython and it supports python ``3.x``. \n\nInstall pyjaspar from source\n=============================\nYou can install a development version by using ``git`` from GitHub.\n\n\nInstall development version from `GitHub`\n==========================================\nIf you have `git` installed, use this:\n\n.. code-block:: bash\n\n git clone https://github.com/asntech/pyjaspar.git\n cd pyjaspar\n python setup.py sdist install\n\nHow to use pyJASPAR?\n--------------------\n\nOnce you have installed pyjaspar, you can create jaspardb class object:\n\n.. code-block:: pycon\n\n >>> from pyjaspar import jaspardb\n \n #Create the JASPAR2026 release object \n >>> jdb_obj = jaspardb(release='JASPAR2026')\n\n #Fetch motif by ID\n >>> motif = jdb_obj.fetch_motif_by_id('MA0095.2')\n >>> print(motif.name)\n YY1\n\n #Fetch motifs by TF name\n >>> motifs = jdb_obj.fetch_motifs_by_name('KFL4')\n >>> print(len(motifs))\n 1\n\n # Get a dictionary of frequency count matrics\n >>> print(motifs[0].counts)\n {'A': [2465.0, 2105.0, 7021.0, 1173.0, 45602.0, 852.0, 1617.0, 1202.0],\n 'C': [49209.0, 47865.0, 45405.0, 52875.0, 161.0, 52366.0, 51112.0, 51045.0],\n 'G': [1583.0, 1214.0, 1422.0, 793.0, 6598.0, 1470.0, 1870.0, 1005.0],\n 'T': [2560.0, 4633.0, 1969.0, 976.0, 3456.0, 1129.0, 1218.0, 2565.0]}\n\n #Get CORE vertebrates non-redundent collection\n >>> motifs = jdb_obj.fetch_motifs(\n collection = ['CORE'],\n tax_group = ['Vertebrates'],\n all_versions = False)\n >>> print(len(motifs))\n 1019\n ## loop through the motifs list and perform analysis\n >>> for motif in motifs:\n pass\n\n**Note**: Above methods return `Bio.motifs.jaspar.Motif` object. You can find more details `here <http://biopython.org/DIST/docs/tutorial/Tutorial.html#sec262>`_ \n\n\nFind available releases\n=======================\n.. code-block:: pycon\n \n >>> print(jdb_obj.get_releases())\n ['JASPAR2026', 'JASPAR2024','JASPAR2022','JASPAR2020', 'JASPAR2018', 'JASPAR2016', 'JASPAR2014']\n\n\nCite\n=====\n - Aziz Khan. pyJASPAR: a Pythonic interface to JASPAR transcription factor motifs. (2021). Zenodo, doi:10.5281/zenodo.4485856\n\n.. code-block:: bash\n\n @software{aziz_khan_2021_4509415,\n author = {Aziz Khan},\n title = {{pyJASPAR: a Pythonic interface to JASPAR transcription factor motifs}},\n month = feb,\n year = 2021,\n publisher = {Zenodo},\n version = {v4.0.0},\n doi = {10.5281/zenodo.4485856},\n url = {https://doi.org/10.5281/zenodo.4485856}\n }\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Pythonic interface to access different versions of the JASPAR database via Biopython",
"version": "4.0.0",
"project_urls": {
"Homepage": "https://github.com/asntech/pyjaspar",
"Source": "https://github.com/asntech/pyjaspar",
"Tracker": "https://github.com/asntech/pyjaspar/issues"
},
"split_keywords": [
"jaspar",
" transcription factors",
" motifs",
" tf",
" bioinformatics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5eafc5112b33abd99c9f296cdc552cca9e0915e7b905dc3e4c99f7b91f442bb2",
"md5": "877a421a3c796d4da112eec6378ba4b4",
"sha256": "01b393f668c3cb552d3d58262a50005b1410e389e0a6bf5d570e976fbdaf01b3"
},
"downloads": -1,
"filename": "pyjaspar-4.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "877a421a3c796d4da112eec6378ba4b4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 57171738,
"upload_time": "2025-10-24T07:53:23",
"upload_time_iso_8601": "2025-10-24T07:53:23.967702Z",
"url": "https://files.pythonhosted.org/packages/5e/af/c5112b33abd99c9f296cdc552cca9e0915e7b905dc3e4c99f7b91f442bb2/pyjaspar-4.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e4b6df3470cb7bda17a3cc5afa6e0d5e165db9662ec11efa6e95bdcc9ef967b0",
"md5": "462d0a4e01793a7b5fa236936b8ca133",
"sha256": "b31893b0791770c044f2b7b424d89abe7cca6d698fe98467bc1cd276a7a2cd90"
},
"downloads": -1,
"filename": "pyjaspar-4.0.0.tar.gz",
"has_sig": false,
"md5_digest": "462d0a4e01793a7b5fa236936b8ca133",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 57036527,
"upload_time": "2025-10-24T07:53:38",
"upload_time_iso_8601": "2025-10-24T07:53:38.707854Z",
"url": "https://files.pythonhosted.org/packages/e4/b6/df3470cb7bda17a3cc5afa6e0d5e165db9662ec11efa6e95bdcc9ef967b0/pyjaspar-4.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-24 07:53:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "asntech",
"github_project": "pyjaspar",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "wheel",
"specs": []
},
{
"name": "biopython",
"specs": []
}
],
"lcname": "pyjaspar"
}