BridgeDB was recently published (doi:10.1186/1471-2105-11-5) and is a combination of Open Source, a web services, and Creative Commons-licensed mapping data, that links many bio- and cheminformatics related databases. To learn more about the BridgeDB source code, I created a Bioclipse manager (see doi:10.1186/1471-2105-10-397) to make BridgeDB functionality (both the library and the webservice) accessible in the JavaScript environment. This is one of the scripts you can now try (of course, this is not how it will be used in Open PHACTS):
// BridgeDB is a database that knows about equivalence
// of data from different databases.
// The website has a number of examples of how to use
// The website has a number of examples of how to use
// the BridgeDB Java API to perform various of the
// tasks it can do.
//
// http://www.bridgedb.org/wiki/ApiOverview
// This script repeats those examples, using BSL.
// The first example shows a Ensemble Human identifier
//
// http://www.bridgedb.org/wiki/ApiOverview
// This script repeats those examples, using BSL.
// The first example shows a Ensemble Human identifier
// being defined as a BridgeDB Xref resource. In BSL,
// this example can be reproduces as:
ref = bridgedb.xref(“ENSG00000171105″, “EnHs”);
js.say(“<a href=\”" + ref.getUrl() + “\”>clicky</a>”);
// The second example maps a Entrez Gene (code ‘L’) to
ref = bridgedb.xref(“ENSG00000171105″, “EnHs”);
js.say(“<a href=\”" + ref.getUrl() + “\”>clicky</a>”);
// The second example maps a Entrez Gene (code ‘L’) to
// Ensemble Human (code ‘EnHs’):
dests = bridgedb.map(
dests = bridgedb.map(
“idmapper-bridgerest:" +
“http://webservice.bridgedb.org/Human”,
“3643″, “L”, “EnHs”
)
js.say(
js.say(
bridgedb.xref(“3643″, “L”).getURN() + ” maps to:”
);
for (i = 0; i<dests.length(); i++) {
js.say(” ” + dests.get(i).getURN());
}
// We can repeat this script also with a small
for (i = 0; i<dests.length(); i++) {
js.say(” ” + dests.get(i).getURN());
}
// We can repeat this script also with a small
// modification in the first line to get mappings
// to any database, by simply dropping the target
// database code:
dests = bridgedb.map(
dests = bridgedb.map(
“idmapper-bridgerest:" +
“http://webservice.bridgedb.org/Human”,
“3643″, “L”
)
js.say(
bridgedb.xref(“3643″, “L”).getURN() + ” maps to:”
);
for (i = 0; i<dests.length(); i++) {
js.say(” ” + dests.get(i).getURN());
}
// The next example from the BridgeDB wiki page
for (i = 0; i<dests.length(); i++) {
js.say(” ” + dests.get(i).getURN());
}
// The next example from the BridgeDB wiki page
// demonstrates that this approach works for other
// (bio)chemical entities, like metabolites. The
// example maps an entry from ChEBI (code ‘Ce’) to
// PubChem (code ‘Cp’):
dests = bridgedb.map(
“idmapper-bridgerest:" +
“http://webservice.bridgedb.org/Human”,
“16811″, “Ce”, “Cp”
)
for (i = 0; i<dests.length(); i++) {
js.say(” ” + dests.get(i).getURN());
}
// Searching is wrapped in the Bioclipse extension too.
query = “3643″;
for (i = 0; i<dests.length(); i++) {
js.say(” ” + dests.get(i).getURN());
}
// Searching is wrapped in the Bioclipse extension too.
query = “3643″;
hits = bridgedb.map(
“idmapper-bridgerest:" +
“http://webservice.bridgedb.org/Human”,
query, 100
);
js.say(query + ” search results:”);
for (i = 0; i<hits.length(); i++) {
js.say(” ” + hits.get(i));
}
// And so is identifier typing
query = “NP_036430″;
js.say(“Which patterns match ” + query + “?”);
sources = bridgedb.guessIdentifierType(query);
for (i = 0; i<sources.length(); i++) {
js.say(sources.get(i).getFullName() + ” matches!”);
}
The Bioclipse that has this functionality is available as alpha release from this website for various platforms. The source code is found on my GitHub account.
js.say(query + ” search results:”);
for (i = 0; i<hits.length(); i++) {
js.say(” ” + hits.get(i));
}
// And so is identifier typing
query = “NP_036430″;
js.say(“Which patterns match ” + query + “?”);
sources = bridgedb.guessIdentifierType(query);
for (i = 0; i<sources.length(); i++) {
js.say(sources.get(i).getFullName() + ” matches!”);
}
The Bioclipse that has this functionality is available as alpha release from this website for various platforms. The source code is found on my GitHub account.
No comments:
Post a Comment