Is There A Web Api To Find The Go Term From A Given Locus Name?
3
For example, if i have this locus name, LOC_Os01g20940, I want the associated GO data:
GO accession Type Name Code Reference With
GO:0016787 molecular_function hydrolase activity IEA Osa1r6:autoGO TAIR6:AT5G23720.1
This website( http://rice.plantbiology.msu.edu/analyses_search_locus.shtml ) does what I want but I would like the results in a structured format like JSON or XML and not an HTML page.
Is there an alternative service like this?
gene
identifiers
mapping
• 2.9k views
You can get this information from the Gramene BioMart service.
Start at Gramene BioMart
Choose database = Ensembl Genes; dataset = Oryza sativa genes (MSU6)
Click "Filters" (left menu); expand "Gene"
Check "ID list limit"; use selection "Ensembl Gene ID(s)" and either paste your query into the box (e.g. LOC_Os01g20940) or upload a file of query IDs, one per line.
Click "Attributes" (left menu); expand "External"
Check the GO term that you require e.g. GO Molecular Function -> GO Term Accession (mf)
Click "Results" (menu, top-left)
You should see a table mapping the gene and a single transcript to 5 GO accessions, including GO:0016787.
To get the results in something other than HTML you can: (1) download as tab- or comma-delimited text or (2) click the "URL", "XML" or "Perl" buttons (top of page), which will indicate how to interact with the API.
Using the Ensembl API:
#!/usr/bin/perl
use strict;
use warnings;
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use Bio::EnsEMBL::DBSQL::OntologyDBAdaptor;
my $dbCore = Bio::EnsEMBL::DBSQL::DBAdaptor->new
(-host => 'mysql.ebi.ac.uk',
-port => '4157',
-dbname => 'oryza_sativa_core_8_61_6',
-species => 'rice',
-group => 'core',
-user => 'anonymous'
);
my $dbOntology = Bio::EnsEMBL::DBSQL::OntologyDBAdaptor->new
(-host => 'mysql.ebi.ac.uk',
-port => '4157',
-dbname => 'ensemblgenomes_ontology_61',
-species => 'multi',
-group => 'ontology',
-user => 'anonymous'
);
my $gene_adaptor = $dbCore->get_GeneAdaptor;
my $ontologyterm_adaptor = $dbOntology->get_OntologyTermAdaptor;
my @genes = @{$gene_adaptor->fetch_all_by_external_name('LOC_Os01g20940')};
while (my $gene = shift @genes){
my @dblinks = @{$gene->get_all_DBLinks('GO')};
while (my $dblink = shift @dblinks){
my $ontologyterm = $ontologyterm_adaptor->fetch_by_accession($dblink->display_id);
print
$ontologyterm->accession, "\t",
join(' ', @{$dblink->get_all_linkage_types}), "\t",
$ontologyterm->namespace, "\t",
$ontologyterm->name, "\n";
}
}
This gives:
GO:0003677 IEA molecular_function DNA binding
GO:0004725 IEA molecular_function protein tyrosine phosphatase activity
GO:0006470 IEA biological_process protein dephosphorylation
GO:0008138 IEA molecular_function protein tyrosine/serine/threonine phosphatase activity
GO:0016311 IEA biological_process dephosphorylation
GO:0016787 IEA molecular_function hydrolase activity
GO:0016791 IEA molecular_function phosphatase activity
you can tried ensembl plant database, they did have good API to query their data.
Login before adding your answer.
Traffic: 1476 users visited in the last hour
Is there a api link? I only see their web/database links on http://www.ensemblgenomes.org/info/data_access