Package Bio :: Package motifs :: Package jaspar :: Module db
[hide private]
[frames] | no frames]

Module db

source code

Provides read access to a JASPAR5 formatted database.

This modules requires MySQLdb to be installed.

Example, substitute the your database credentials as
appropriate:

    >>> from Bio.motifs.jaspar.db import JASPAR5
    >>> 
    >>> JASPAR_DB_HOST = "hostname.example.org"
    >>> JASPAR_DB_NAME = "JASPAR_2013"
    >>> JASPAR_DB_USER = "guest"
    >>> JASPAR_DB_PASS = "guest"
    >>> 
    >>> DFLT_COLLECTION = 'CORE'
    >>> jdb = JASPAR5(
    ...     host=JASPAR_DB_HOST,
    ...     name=JASPAR_DB_NAME,
    ...     user=JASPAR_DB_USER,
    ...     password=JASPAR_DB_PASS
    ... )
    >>> 
    >>> 
    >>> ets1 = jdb.fetch_motif_by_id('MA0098')
    >>> print(ets1)
    TF name ETS1
    Matrix ID   MA0098.1
    Collection  CORE
    TF class    Winged Helix-Turn-Helix
    TF family   Ets
    Species 9606
    Taxonomic group vertebrates
    Accession   ['CAG47050']
    Data type used  SELEX
    Medline 1542566
    PAZAR ID    TF0000070
    Comments    -
    Matrix:
            0      1      2      3      4      5
    A:   4.00  17.00   0.00   0.00   0.00   5.00
    C:  16.00   0.00   1.00  39.00  39.00   3.00
    G:   4.00   0.00   0.00   1.00   0.00  17.00
    T:  16.00  23.00  39.00   0.00   1.00  15.00


    >>> 
    >>> motifs = jdb.fetch_motifs(
    ...     collection = 'CORE',
    ...     tax_group = ['vertebrates', 'insects'],
    ...     tf_class = 'Winged Helix-Turn-Helix',
    ...     tf_family = ['Forkhead', 'Ets'],
    ...     min_ic = 12
    ... )
    >>> 
    >>> for motif in motifs:
    ...     pass # do something with the motif

Classes [hide private]
  JASPAR5
Class representing a JASPAR5 DB.
Variables [hide private]
  JASPAR_DFLT_COLLECTION = 'CORE'
  __package__ = 'Bio.motifs.jaspar'