xrefExists <- function(mapper, source, identifier, compactIdentifier = NA) {
if (!is.na(compactIdentifier)) {
source <- gsub(":.*", "", compactIdentifier)
identifier <- gsub(".*:", "", compactIdentifier)
datasource <- getDataSource(prefix = source)
} else {
datasource <- getDataSource(code = source)
}
xref <- .jnew("org/bridgedb/Xref", identifier, datasource)
mapper$xrefExists(xref)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.