Recently visited
Please sign in to see a list of articles you recently visited.
Recently updated
 SOX9
Homo sapiens
 HIF1A
Homo sapiens
 Pax6
Mus musculus
 PAX6
Homo sapiens
 Snai2
Mus musculus
 PPARA
Homo sapiens
 Ppara
Mus musculus
 Thrb
Mus musculus
 SNAI2
Homo sapiens
 Tbr1
Mus musculus
Transcription Factor Encyclopedia  BETA

API

One of the goals of TFe is to make transcription factor data easily accessible to all. To support this goal, we have built a web-based Application Programing Interface (API) to facilitate a straightforward approach to extracting data from the TFe website for both programmers and end-users.
Much of the data available in TFe, including binding sites, genomic targets, interactors, key papers, and even ontology terms, can be downloaded through the API. For easy parsing, this data is sent in tab-delimited plain text format. And since the API is web-based and communicates through the ubiquitous HTTP protocol, the TFe API is compatible with all common scripting and programming languages including PHP, Perl, and Python.

Synopsis

The TFe API can be summoned via a simple HTTP request like this:
The above request will retrieve a list of TFe TFIDs (transcription factor IDs) for all transcription factors in the TFe database.
The above request will retrieve all binding site data for the transcription factor with the TFe TFID of 323 (human NR2F2). If no data is currently available, the API will simply not return anything. There are two components to the query, the tfid and the code. In the above example, the tfid is 323, and the code is tfbs. The "tfbs" code is just one of 28 possible codes that you can use to access different types of information through the API. For detailed information on the properties of each code, please refer to the Codes section below.
You can easily get the appropriate TFe TFID for your transcription factor of interest if you know your transcription factor's Ensembl Gene ID, Entrez Gene ID, Refseq DNA ID, Uniprot ID, or any other attribute that is supported by one of our 28 codes.
All these queries return "323", which is the TFe TFID for NR2F2 (identified by ENSG00000185551, 7026, P24468, and NP_066285).
As you can see, all queries must have two variables, a "code" variable (which is absolutely mandatory) and either a "tfid" or a "data" variable. If a tfid is entered, data will be given. If a piece of data is entered, tfid(s) will be given.

Codes

Below is a table of all 28 access codes available in the TFe API. In practice, each of the "Additional columns" is seperated by a single tab character. Each row is separated by a single line break character.
  Access code First column (searchable) Additional columns Rows Example
1 authors Authors' full names (text) 1 First name
2 Middle name
3 Last name
4 Institution
5 City
6 Province
7 Country
8 Homepage
9 Interests
≥ 1 tfid=188&code=authors
2 child-tf Child TF(s) (TFe TFID) (none) ≥ 1 tfid=118&code=child-tf
3 class-family Family classification (text) (none) 1 tfid=323&code=class-family
4 class-group Group classification (text) (none) 1 tfid=323&code=class-group
5 class-subfamily Subfamily classification (text) (none) 1 tfid=323&code=class-subfamily
6 description Long name of TF (text) (none) 1 tfid=436&code=description
7 ensembl-gene-id Ensembl Gene ID (none) 1 tfid=436&code=ensembl-gene-id
8 entrez-gene-id Entrez Gene ID (none) 1 tfid=436&code=entrez-gene-id
9 gene-ontology Gene Ontology ID 1 GO term
2 Category
3 Evidence code
4 Entrez Gene ID
5 Pubmed ID
≥ 1 tfid=436&code=gene-ontology
10 homologs Similar TF(s) (TFe TFID) (none) ≥ 1 tfid=436&code=homologs
11 interators Entrez Gene ID1 1 Gene symbol
2 Experiment type
3 Nature of interaction
4 Pubmed ID
5 Source (user or auto)
≥ 1 tfid=436&code=interactors
12 ligands Compound name 1 Pubchem ID
2 IUPAC name
3 Experiment types
4 Nature of interaction
5 Pubmed ID
6 Source (user or auto)
≥ 1 tfid=323&code=ligands
13 mesh-all MeSH term 1 Fisher's exact p-value
2 Associated Entrez Gene ID
3 Frequency2 A ∩ B
4 Frequency A
5 Frequency B
6 Date of computation
≥ 1 tfid=436&code=mesh-all
14 mesh-disease MeSH term 1 Fisher's exact p-value
2 Associated Entrez Gene ID
3 Frequency2 A ∩ B
4 Frequency A
5 Frequency B
6 Date of computation
≥ 1 tfid=436&code=mesh-disease
15 mgi-phenotype MGI phenotype ID 1 MGI ID
2 Entrez Gene ID
3 Mouse gene symbol
4 Human gene symbol
5 MGI phenotype term
≥ 1 tfid=436&code=mgi-phenotype
16 omim-id Online MIM ID (none) ≥ 1 tfid=436&code=omim-id
17 papers Pubmed ID 1 Authors
2 Article title
3 Journal information
4 Year indexed
5 Recommendation
6 Is review article?
≥ 1 tfid=436&code=papers
18 parent-tf Parent TF (TFe TFID) (none) 1 tfid=170&code=parent-tf
19 refseq-id Refseq protein ID (none) ≥ 1 tfid=436&code=refseq-id
20 regulators Entrez Gene ID 1 Ensembl gene ID
2 Ensembl transcript ID
3 Regulator gene symbol
4 Regulator gene species
5 Complex members (Entrez Gene ID)
6 Complex name
7 Pazar TF ID
8 Pubmed ID
≥ 1 tfid=548&code=regulators
21 score Article completion score (none) 1 tfid=436&code=score
22 species Species of TF (none) 1 tfid=436&code=species
23 symbol Official symbol of TF (none) 1 tfid=436&code=symbol
24 synonyms Symbol synonym(s) of TF (none) ≥ 1 tfid=436&code=synonyms
25 targets Entrez Gene ID 1 Target gene symbol
2 Acting TF complex
3 Regulatory effect on target
4 Pubmed ID
5 Source (user or auto)
≥ 1 tfid=436&code=targets
26 tfbs Binding site sequence 1 Pazar sequence ID
2 Target gene name
3 Target Pazar ID
4 Acting TF complex
5 TF Pazar ID
6 TF Ensembl ID
7 TF species
8 TF given name
9 Pazar project name
≥ 1 tfid=436&code=tfbs
27 uniprot-id Uniprot ID (none) ≥ 1 tfid=436&code=uniprot-id
28 all-tfids All TFe TFIDs (none) ≥ 1 code=all-tfids
1 Some IDs might be Ensembl Gene IDs
2 Where A = term occurrence and B = reference occurrence

Example

The following example illustrates how you can use the Perl programming language, available in today's major operating systems including Windows and Mac OS X, to retrieve binding site data for the transcription factor PBX1 (human) and write this data onto a text file.
use strict;

use LWP::Simple qw(!head);
# NOTE: LWP::Simple is a simple module that lets you connect to our web API.
# NOTE: You can download this module at http://www.cpan.org/.

my $tfid = get("http://www.cisreg.ca/cgi-bin/tfe/api.pl?code=entrez-gene-id&data=5087");
# NOTE: First we retrieve the correct TFe TFID for PBX1, using a known Entrez Gene ID (5087)

my $data = get("http://www.cisreg.ca/cgi-bin/tfe/api.pl?code=tfbs&tfid=$tfid");
# NOTE: After we have the TFe TFID for PBX1, we can get the binding site data

my @rows = split(/\n/,$data);
# NOTE: Split the data into individual rows.

open FILE, ">sample.txt";
# NOTE: Open a text file to store the data.

foreach my $line (@rows) {
	
	# NOTE: Process each line of data individually.

	my @columns = split(/\t/,$line);
	# NOTE: Split each line into individual columns of data.
	
	my $binding_site = $columns[0];
	# NOTE: Locate the binding site, which is in column zero.
	
	print FILE $binding_site; 
	# NOTE: Write the binding site data into the text file.

}

close FILE;
# Close the text file.

Suggestions

As we continually strive to adapt to the needs of our user base, we would be grateful if you can share with us your suggestions on how our API can be further developed to fulfill your needs. Please feel free to leave us an anonymous feedback. We read every single feedback we receive, and unless the feedback is anonymous, we typically give a response. Sincere thanks for being a part of the TFe community.