A serverless interface to Biopython to access different versions of JASPAR database

gene-regulation, jaspar, motif-discovery, motifs, tf-binding-motif, transcription-factor-binding, transcription-factors
pip install pyjaspar==2.1.0



A Pythonic interface to JASPAR transcription factor motifs

pyJASPAR uses Biopython and SQLite3 to provide a serverless interface to JASPAR database to query and access TF motif profiles across various releases of JASPAR.
pyJASPAR provides access to the following releases of JASPAR database:

Note: This is a serverless SQLite wrapper around the Biopython JASPAR module Bio.motifs.jaspar.db which requires JASPAR MySQL database sever connection details.


A detailed documentation is available in different formats: HTML | PDF | ePUB


Quick installation using conda

pyJASPAR is available on Bioconda for installation via conda.

conda install -c bioconda pyjaspar

Install using pip

pyJASPAR is also available on PyPi for installation via pip.

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:

git clone
cd pyjaspar
python sdist install

How to use pyJASPAR?

Once you have installed pyjaspar, you can create jaspardb class object:

>>> from pyjaspar import jaspardb

#Create the JASPAR2020 release object
>>> jdb_obj = jaspardb(release='JASPAR2020')

#Fetch motif by ID
>>> motif = jdb_obj.fetch_motif_by_id('MA0095.2')
>>> print(

#Fetch motifs by TF name
>>> motifs = jdb_obj.fetch_motifs_by_name('CTCF')
>>> print(len(motifs))

#Get CORE vertebrates collection
>>> motifs = jdb_obj.fetch_motifs(
    collection = 'CORE',
    tax_group = ['vertebrates']
>>> print(len(motifs))
## loop through the motifs list and perform analysis
>>> for motif in motifs:

Note: Above methods return Bio.motifs.jaspar.Motif object. You can find more details here

Find available releases

>>> print(jdb_obj.get_releases())
['JASPAR2022','JASPAR2020', 'JASPAR2018', 'JASPAR2016', 'JASPAR2014']


  • Aziz Khan. pyJASPAR: a Pythonic interface to JASPAR transcription factor motifs. (2021). doi:10.5281/zenodo.4509415
  author       = {Aziz Khan},
  title        = {{pyJASPAR: a Pythonic interface to JASPAR transcription factor motifs}},
  month        = feb,
  year         = 2021,
  publisher    = {Zenodo},
  version      = {v2.0.0},
  doi          = {10.5281/zenodo.4509415},
  url          = {}