Comments (4)
The following seems to work for me (has the XML returned from bioportal changed structure?)
I have only tested it on GAZ and UO (units) terms at the moment.
function itemDefinitionHandler(e) {
var app = UiApp.getActiveApplication();
var value = e.parameter.source;
var ontologyObject = createOntologyObjectFromString(value);
var searchString = "http://rest.bioontology.org/bioportal/concepts/" + ontologyObject.ontologyVersion
+ "?conceptid=" + ontologyObject.conceptId + "&apikey=INSERT-YOURS-HERE"; // we are using our own
Logger.log(searchString);
var text = UrlFetchApp.fetch(searchString).getContentText();
var doc = Xml.parse(text, true);
var definition = "";
if (doc.success.data.classBean.definitions != null) {
var strings = doc.success.data.classBean.definitions.getElements("string");
for (var strIndex in strings) {
var string = strings[strIndex];
definition += string.getText() + " ";
}
}
if(definition == "") {
definition = "No definition available for this term.";
}
SpreadsheetApp.getActiveSpreadsheet().toast("Definition: " + definition, ontologyObject.conceptId, -1);
return app;
}
from ontomaton.
I had to copy the files over manually since all the coding has to be done
within googles app script UI. I obviously missed this off when I was
copying and pasting...apologies.
Eamonn Maguire
Sent from my iPhone with tiny buttons
On 22 Jan 2013, at 08:11, bobular [email protected] wrote:
Hi guys,
Really finding this tool useful. Thanks very much. We modified it to insert
ONTO:00012345 rather than purls which don't help when we are trying to load
the experiment data into Chado.
What's happened to itemDefinitionHandler() ? I can't find the code for it
anywhere on GitHub - although I can find it in Utils.gs on my local copy.
We found that this is essential (try looking up "London" in GAZ) but seems
broken. I am trying to fix it - will post what I find.
cheers,
Bob.
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/6.
from ontomaton.
That does look very different from what we originally had. Before there was
no explicit definition block, just lists of generic elements that were
tagged with a label 'definition' sometimes.
If this is a change across the board, then it's great and makes the task of
getting the definition much easier :)
Eamonn Maguire
Sent from my iPhone with tiny buttons
On 22 Jan 2013, at 08:23, bobular [email protected] wrote:
The following seems to work for me (has the XML returned from bioportal
changed structure?)
I have only tested it on GAZ and UO (units) terms at the moment.
function itemDefinitionHandler(e) {
var app = UiApp.getActiveApplication();
var value = e.parameter.source;
var ontologyObject = createOntologyObjectFromString(value);
var searchString =
"http://rest.bioontology.org/bioportal/concepts/" +
ontologyObject.ontologyVersion
+ "?conceptid=" + ontologyObject.conceptId +
"&apikey=INSERT-YOURS-HERE"; // we are using our own
Logger.log(searchString);
var text = UrlFetchApp.fetch(searchString).getContentText();
var doc = Xml.parse(text, true);
var definition = "";
if (doc.success.data.classBean.definitions != null) {
var strings =
doc.success.data.classBean.definitions.getElements("string");
for (var strIndex in strings) {
var string = strings[strIndex];
definition += string.getText() + " ";
}
}
if(definition == "") {
definition = "No definition available for this term.";
}
SpreadsheetApp.getActiveSpreadsheet().toast("Definition: " +
definition, ontologyObject.conceptId, -1);
return app;}
—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/6#issuecomment-12544019.
from ontomaton.
This is now added.
from ontomaton.
Related Issues (20)
- Restrictions over searches on LOV seem not to be working HOT 1
- Add support for a new setting placing 'term' and 'accession' in consecutive rows
- Extend OntoMaton to talk to AgroPortal and SIFR BioPortal HOT 3
- Detect hidden columns HOT 2
- Fix display 'restriction added' message HOT 2
- Change 'Term URI' and add service in Terms sheet HOT 1
- Addition of searches over OLS
- Update documentation
- Add support for restrictions for the annotator functionality. HOT 4
- Support multiple ontologies in restrictions for each service HOT 1
- make ontomaton aware of ISA-Tab templates
- Access denied for example sheet
- 'UiApp has been deprecated' Error HOT 4
- Still working HOT 5
- How do I get OntoMaton to show up in Add-ons in a Googlesheet? HOT 1
- ScriptError: You do not have the necessary permission to access the requested document. HOT 2
- the Biological Collections Ontology in BioPortal seems not included in search results HOT 2
- Wrong =HYPERLINK() syntax HOT 1
- Feature: add service.tib.eu/ts4tib as OLS endpoint HOT 1
- Update to OLS4 if needed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ontomaton.