# HG changeset patch # User Mikel Egana Aranguren # Date 1349699104 -7200 # Node ID e2b16720ef25dbeab209cc9d62aa7479b6eb6845 # Parent 354aa87772e0ebb78170c843784921e232ef0f0b Directories re-arranged for easier installation via mercurial diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/README --- a/NCBO_services/README Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ - - - - ============= - NCBO Services - ============= - - - -INSTALLATION -============ - -1.- Stop Galaxy. - -2.- Copy the .jar files to /galaxy-dist/tool-data/shared/jars/ - -3.- Create directory /galaxy-dist/tools/NCBO_services/ - -4.- Copy the .xml files to /galaxy-dist/tools/NCBO_services/ - -5.- Add the following lines to /galaxy-dist/tool_conf.xml: - -
- - - - - - - -
- -6.- Start Galaxy. - - - -USAGE -===== - -Each tool has a different functionality, but all of them need a -bioportal API key. The API key can be obtained by creating an account at -bioportal (http://bioportal.bioontology.org/). - - - -CONTACT -======= - -Please send any request or comment to mikel.egana.aranguren@gmail.com or -jose.minya@gmail.com. - - - -ACKNOWLEDGEMENTS -================ - -The work on get_ontology, extract and get_ontology_view is funded by the -Marie Curie Cofund program of the EU, FP7. - - - -COPYRIGHT AND LICENSE -===================== - -get_ontology, extract and get_ontology_view are copyright of Mikel -EgaƱa Aranguren (2012), and they are distributed under a GPL 3 license -(http://www.gnu.org/licenses/) - - - - - - - - - - - - - - - diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/extract.jar Binary file NCBO_services/extract.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/extract.java --- a/NCBO_services/extract.java Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -package es.upm.fi.dia.oeg.ncbo.galaxy; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.DefaultHttpClient; - -public class extract { - - /** - * @param args - * @throws IOException - * @throws ClientProtocolException - */ - public static void main(String[] args) throws ClientProtocolException, IOException { - -// http://www.bioontology.org/wiki/index.php/View_Extraction -// ./viewextractor/{ontology version id}[?{args}]&apikey={YourAPIKey} - - String api_key = args [0]; - String ontologyversionid = args [1]; // 35686 - String conceptid = args [2]; // E800-E999.9 - String filterrelations = args [3]; // PAR,isa,CHD,inverse_isa,SUBSETMEMBER,SubClass,SuperClass,[R]SIB,SI - String ontologyname = args [4]; // http://who.int/icd9 - - HttpClient client = new DefaultHttpClient(); - -// HttpGet get = new HttpGet("http://rest.bioontology.org/bioportal/viewextractor/35686/" + -// "?conceptid=E800-E999.9&filterrelations=PAR,isa,CHD,inverse_isa,SUBSETMEMBER,SubClass,SuperClass," + -// "[R]SIB,SIB&existontology=true&ontologyname=http://who.int/icd9&apikey=74c12fc6-9423-455a-a619-b94f47d1951b"); - - HttpGet get = new HttpGet("http://rest.bioontology.org/bioportal/viewextractor/" + ontologyversionid + - "/?conceptid="+ conceptid +"&filterrelations=" + filterrelations + - "&existontology=true&ontologyname="+ ontologyname + "&apikey=" + api_key); - - HttpResponse response = client.execute(get); - HttpEntity entity = response.getEntity(); - if (entity != null) { - InputStream instream = entity.getContent(); - InputStreamReader is=new InputStreamReader(instream); - BufferedReader br=new BufferedReader(is); - String read=br.readLine(); - BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); - while(read!=null){ -// System.out.println(read); - bw.write(read); - bw.newLine(); - read=br.readLine(); - } - bw.close(); - instream.close(); - } - - } - -} diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/extract.xml --- a/NCBO_services/extract.xml Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ - - Retrieves a subtree from an ontology using a root concept - java -jar ${__tool_data_path__}/shared/jars/extract.jar $api_key $ontologyversionid $conceptid $filterrelations $ontologyname > $output - - - - - - - - - - - - - - - - - - -**What it does** - -It extracts a subtree from an ontology contained in BioPortal, and retrieves such subtree as an OWL ontology. - -**Parameters** - -* Bioportal API key: to obtain an API key, open an account in http://bioportal.bioontology.org. -* Ontology version ID: it can be obtained from BioPortal, in the Ontology page, on the versions column, by looking at the version URL. For example, it is 46754 for the Gene Ontology. -* Concept ID: the root term. For example, GO:0051179. -* Filter relations: for example "is_a,part_of". -* Ontology name: the URI for the new ontology. For example http://go_redux_is_a.owl. - -**Contact** - -Please send any request or comment to mikel.egana.aranguren@gmail.com. - -**More information** - -http://bioportal.bioontology.org - -http://www.bioontology.org/wiki/index.php/BioPortal_REST_services - - - - diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/get_ontology.jar Binary file NCBO_services/get_ontology.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/get_ontology.java --- a/NCBO_services/get_ontology.java Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -package es.upm.fi.dia.oeg.ncbo.galaxy; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.impl.client.DefaultHttpClient; - -public class get_ontology { - - /** - * @param args - * @throws IOException - * @throws ClientProtocolException - */ - public static void main(String[] args) throws ClientProtocolException, IOException { - String api_key = args [0]; - String ontology_id = args [1]; // 1522 - HttpClient client = new DefaultHttpClient(); - - HttpGet get = new HttpGet("http://rest.bioontology.org/bioportal/virtual/download/" + ontology_id + "?apikey=" +api_key); - HttpResponse response = client.execute(get); - HttpEntity entity = response.getEntity(); - if (entity != null) { - InputStream instream = entity.getContent(); - InputStreamReader is=new InputStreamReader(instream); - BufferedReader br=new BufferedReader(is); - String read=br.readLine(); - BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); - while(read!=null){ -// System.out.println(read); - bw.write(read); - bw.newLine(); - read=br.readLine(); - } - bw.close(); - instream.close(); - } - } -} diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/get_ontology.xml --- a/NCBO_services/get_ontology.xml Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,384 +0,0 @@ - - Retrieves an ontology from bioportal using its id - - - #if $id_opts.id_opts_menu=="id_by_hand" #java -jar ${__tool_data_path__}/shared/jars/get_ontology.jar $api_key $id_opts.ontology_id > $output - #else #java -jar ${__tool_data_path__}/shared/jars/get_ontology.jar $api_key $id_opts.ontology_id > $output - #end if - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -**What it does** - -It retrieves an ontology from BioPortal. - -**Parameters** - -* Bioportal API key: to obtain an API key, open an account in http://bioportal.bioontology.org. -* Ontology ID: provide it by hand (e.g. 1522 for BioPAX), or select from list. - -**Contact** - -Please send any request or comment to mikel.egana.aranguren@gmail.com. - -**More information** - -http://bioportal.bioontology.org - -http://www.bioontology.org/wiki/index.php/BioPortal_REST_services - - - - - - diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/get_ontology_view.jar Binary file NCBO_services/get_ontology_view.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/get_ontology_view.java --- a/NCBO_services/get_ontology_view.java Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -package es.upm.fi.dia.oeg.ncbo.galaxy; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.impl.client.DefaultHttpClient; - -public class get_ontology_view { - - /** - * @param args - * @throws IOException - * @throws ClientProtocolException - */ - public static void main(String[] args) throws ClientProtocolException, IOException { -// http://www.bioontology.org/wiki/index.php/BioPortal_REST_services#Download_a_specific_ontology_view_based_on_the_ontology_view_version_id -// Download a specific ontology view based on the ontology view version id - - String api_key = args [0]; - String ontology_view_id = args [1]; - - HttpClient client = new DefaultHttpClient(); -// http://rest.bioontology.org/bioportal/ontologies/download/43072?apikey=YourAPIKey - HttpGet get = new HttpGet("http://rest.bioontology.org/bioportal/ontologies/download/" + ontology_view_id + "?apikey=" + api_key); - - HttpResponse response = client.execute(get); - HttpEntity entity = response.getEntity(); - if (entity != null) { - InputStream instream = entity.getContent(); - InputStreamReader is=new InputStreamReader(instream); - BufferedReader br=new BufferedReader(is); - String read=br.readLine(); - BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); - while(read!=null){ -// System.out.println(read); - bw.write(read); - bw.newLine(); - read=br.readLine(); - } - bw.close(); - instream.close(); - } - } -} diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/get_ontology_view.xml --- a/NCBO_services/get_ontology_view.xml Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ - - Retrieves a view of an ontology using the view id - java -jar ${__tool_data_path__}/shared/jars/get_ontology_view.jar $api_key $ontologyviewid > $output - - - - - - - - - - - - - - - -**What it does** - -It retrieves a view from an ontology contained in BioPortal. - -**Parameters** - -* Bioportal API key: to obtain an API key, open an account in http://bioportal.bioontology.org. -* Ontology view ID: it can be obtained from BioPortal, in the Ontology page, on the views section, by looking at the view URL. For example, it is 41014 for the generic Gene Ontology slim. - -**Contact** - -Please send any request or comment to mikel.egana.aranguren@gmail.com. - -**More information** - -http://bioportal.bioontology.org - -http://www.bioontology.org/wiki/index.php/BioPortal_REST_services - - - - diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/ncbo_annotator.xml --- a/NCBO_services/ncbo_annotator.xml Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,704 +0,0 @@ - - Annotates biological texts with the terms of the bio-ontologies from BioPortal - java -jar ${__tool_data_path__}/shared/jars/ncbo_annotator_galaxy.jar $longestOnly $wholeWordOnly $filterNumber $stopWords $withDefaultStopWords $isTopWordsCaseSensitive $mintermSize $scored $withSynonyms $ontologiesToExpand $ontologiesToKeepInResult $semanticTypes $levelMax $mappingTypes $textToAnnotate $format $apikey > $output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -**Usage** - Enter bioportal API key, a text to annotate and specify the parameters, and the annotations will be retrieved. - -**Contact** - - Please send any request or comment to jose.minyarro@um.es - -**More information** - - http://bioportal.bioontology.org - - - - \ No newline at end of file diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/ncbo_annotator_galaxy.jar Binary file NCBO_services/ncbo_annotator_galaxy.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/ncbo_recommender.xml --- a/NCBO_services/ncbo_recommender.xml Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,286 +0,0 @@ - - Provides a bio-ontology as a recommendation depending on the annotations from a biological text - java -jar ${__tool_data_path__}/shared/jars/ncbo_recommender_galaxy.jar $text $format $ontologyId $apikey > $output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -**Usage** - Enter bioportal API key, a text, the output format and a list of bioontolgies Ids and the recommender retrieves the bioontology with the best annotations. - -**Contact** - - Please send any request or comment to jose.minyarro@um.es - -**More information** - - http://bioportal.bioontology.org - - - - \ No newline at end of file diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/ncbo_recommender_galaxy.jar Binary file NCBO_services/ncbo_recommender_galaxy.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/ncbo_resourceIndex.xml --- a/NCBO_services/ncbo_resourceIndex.xml Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,320 +0,0 @@ - - Search for resources matched up with terms in bio-ontologies depending on the given text - java -jar ${__tool_data_path__}/shared/jars/ncbo_resourceIndex_galaxy.jar $query $ontologyids $resourceId $mode $elementDetails $format $apikey > $output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -**Usage** - Enter bioportal API key, a text, a list of bioontolgies Ids,a list of resources to search for, the mode, tick if you want detailed element and the format of the results, and the Resource Index interface retrieves the resources matched up with the bioontology terms associated with the text provided. - Example of search text: Melanoma - -**Contact** - - Please send any request or comment to jose.minyarro@um.es - -**More information** - - http://bioportal.bioontology.org - - - - \ No newline at end of file diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/ncbo_resourceIndex_galaxy.jar Binary file NCBO_services/ncbo_resourceIndex_galaxy.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/ncbo_search.xml --- a/NCBO_services/ncbo_search.xml Mon Mar 19 08:25:59 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,281 +0,0 @@ - - Search for terms in bio-ontologies depending on the text provided - java -jar ${__tool_data_path__}/shared/jars/ncbo_search_galaxy.jar $query $ontologyids $apikey > $output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -**Usage** - Enter bioportal API key, a text, and the list of bioontolgies Ids to search for and the search interface retrieves the bioontology terms associated with the text provided. - Example of search text: Breast cancer - -**Contact** - - Please send any request or comment to jose.minyarro@um.es - -**More information** - - http://bioportal.bioontology.org - - - - \ No newline at end of file diff -r 354aa87772e0 -r e2b16720ef25 NCBO_services/ncbo_search_galaxy.jar Binary file NCBO_services/ncbo_search_galaxy.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,82 @@ + + + + ============= + NCBO Services + ============= + + + +INSTALLATION +============ + +1.- Stop Galaxy. + +2.- Copy the .jar files to /galaxy-dist/tool-data/shared/jars/ + +3.- Create directory /galaxy-dist/tools/NCBO_services/ + +4.- Copy the .xml files to /galaxy-dist/tools/NCBO_services/ + +5.- Add the following lines to /galaxy-dist/tool_conf.xml: + +
+ + + + + + + +
+ +6.- Start Galaxy. + + + +USAGE +===== + +Each tool has a different functionality, but all of them need a +bioportal API key. The API key can be obtained by creating an account at +bioportal (http://bioportal.bioontology.org/). + + + +CONTACT +======= + +Please send any request or comment to mikel.egana.aranguren@gmail.com or +jose.minya@gmail.com. + + + +ACKNOWLEDGEMENTS +================ + +The work on get_ontology, extract and get_ontology_view is funded by the +Marie Curie Cofund program of the EU, FP7. + + + +COPYRIGHT AND LICENSE +===================== + +get_ontology, extract and get_ontology_view are copyright of Mikel +EgaƱa Aranguren (2012), and they are distributed under a GPL 3 license +(http://www.gnu.org/licenses/) + + + + + + + + + + + + + + + diff -r 354aa87772e0 -r e2b16720ef25 extract.jar Binary file extract.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 extract.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extract.java Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,65 @@ +package es.upm.fi.dia.oeg.ncbo.galaxy; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.DefaultHttpClient; + +public class extract { + + /** + * @param args + * @throws IOException + * @throws ClientProtocolException + */ + public static void main(String[] args) throws ClientProtocolException, IOException { + +// http://www.bioontology.org/wiki/index.php/View_Extraction +// ./viewextractor/{ontology version id}[?{args}]&apikey={YourAPIKey} + + String api_key = args [0]; + String ontologyversionid = args [1]; // 35686 + String conceptid = args [2]; // E800-E999.9 + String filterrelations = args [3]; // PAR,isa,CHD,inverse_isa,SUBSETMEMBER,SubClass,SuperClass,[R]SIB,SI + String ontologyname = args [4]; // http://who.int/icd9 + + HttpClient client = new DefaultHttpClient(); + +// HttpGet get = new HttpGet("http://rest.bioontology.org/bioportal/viewextractor/35686/" + +// "?conceptid=E800-E999.9&filterrelations=PAR,isa,CHD,inverse_isa,SUBSETMEMBER,SubClass,SuperClass," + +// "[R]SIB,SIB&existontology=true&ontologyname=http://who.int/icd9&apikey=74c12fc6-9423-455a-a619-b94f47d1951b"); + + HttpGet get = new HttpGet("http://rest.bioontology.org/bioportal/viewextractor/" + ontologyversionid + + "/?conceptid="+ conceptid +"&filterrelations=" + filterrelations + + "&existontology=true&ontologyname="+ ontologyname + "&apikey=" + api_key); + + HttpResponse response = client.execute(get); + HttpEntity entity = response.getEntity(); + if (entity != null) { + InputStream instream = entity.getContent(); + InputStreamReader is=new InputStreamReader(instream); + BufferedReader br=new BufferedReader(is); + String read=br.readLine(); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + while(read!=null){ +// System.out.println(read); + bw.write(read); + bw.newLine(); + read=br.readLine(); + } + bw.close(); + instream.close(); + } + + } + +} diff -r 354aa87772e0 -r e2b16720ef25 extract.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/extract.xml Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,46 @@ + + Retrieves a subtree from an ontology using a root concept + java -jar ${__tool_data_path__}/shared/jars/extract.jar $api_key $ontologyversionid $conceptid $filterrelations $ontologyname > $output + + + + + + + + + + + + + + + + + + +**What it does** + +It extracts a subtree from an ontology contained in BioPortal, and retrieves such subtree as an OWL ontology. + +**Parameters** + +* Bioportal API key: to obtain an API key, open an account in http://bioportal.bioontology.org. +* Ontology version ID: it can be obtained from BioPortal, in the Ontology page, on the versions column, by looking at the version URL. For example, it is 46754 for the Gene Ontology. +* Concept ID: the root term. For example, GO:0051179. +* Filter relations: for example "is_a,part_of". +* Ontology name: the URI for the new ontology. For example http://go_redux_is_a.owl. + +**Contact** + +Please send any request or comment to mikel.egana.aranguren@gmail.com. + +**More information** + +http://bioportal.bioontology.org + +http://www.bioontology.org/wiki/index.php/BioPortal_REST_services + + + + diff -r 354aa87772e0 -r e2b16720ef25 get_ontology.jar Binary file get_ontology.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 get_ontology.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get_ontology.java Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,49 @@ +package es.upm.fi.dia.oeg.ncbo.galaxy; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.DefaultHttpClient; + +public class get_ontology { + + /** + * @param args + * @throws IOException + * @throws ClientProtocolException + */ + public static void main(String[] args) throws ClientProtocolException, IOException { + String api_key = args [0]; + String ontology_id = args [1]; // 1522 + HttpClient client = new DefaultHttpClient(); + + HttpGet get = new HttpGet("http://rest.bioontology.org/bioportal/virtual/download/" + ontology_id + "?apikey=" +api_key); + HttpResponse response = client.execute(get); + HttpEntity entity = response.getEntity(); + if (entity != null) { + InputStream instream = entity.getContent(); + InputStreamReader is=new InputStreamReader(instream); + BufferedReader br=new BufferedReader(is); + String read=br.readLine(); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + while(read!=null){ +// System.out.println(read); + bw.write(read); + bw.newLine(); + read=br.readLine(); + } + bw.close(); + instream.close(); + } + } +} diff -r 354aa87772e0 -r e2b16720ef25 get_ontology.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get_ontology.xml Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,384 @@ + + Retrieves an ontology from bioportal using its id + + + #if $id_opts.id_opts_menu=="id_by_hand" #java -jar ${__tool_data_path__}/shared/jars/get_ontology.jar $api_key $id_opts.ontology_id > $output + #else #java -jar ${__tool_data_path__}/shared/jars/get_ontology.jar $api_key $id_opts.ontology_id > $output + #end if + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**What it does** + +It retrieves an ontology from BioPortal. + +**Parameters** + +* Bioportal API key: to obtain an API key, open an account in http://bioportal.bioontology.org. +* Ontology ID: provide it by hand (e.g. 1522 for BioPAX), or select from list. + +**Contact** + +Please send any request or comment to mikel.egana.aranguren@gmail.com. + +**More information** + +http://bioportal.bioontology.org + +http://www.bioontology.org/wiki/index.php/BioPortal_REST_services + + + + + + diff -r 354aa87772e0 -r e2b16720ef25 get_ontology_view.jar Binary file get_ontology_view.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 get_ontology_view.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get_ontology_view.java Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,54 @@ +package es.upm.fi.dia.oeg.ncbo.galaxy; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.impl.client.DefaultHttpClient; + +public class get_ontology_view { + + /** + * @param args + * @throws IOException + * @throws ClientProtocolException + */ + public static void main(String[] args) throws ClientProtocolException, IOException { +// http://www.bioontology.org/wiki/index.php/BioPortal_REST_services#Download_a_specific_ontology_view_based_on_the_ontology_view_version_id +// Download a specific ontology view based on the ontology view version id + + String api_key = args [0]; + String ontology_view_id = args [1]; + + HttpClient client = new DefaultHttpClient(); +// http://rest.bioontology.org/bioportal/ontologies/download/43072?apikey=YourAPIKey + HttpGet get = new HttpGet("http://rest.bioontology.org/bioportal/ontologies/download/" + ontology_view_id + "?apikey=" + api_key); + + HttpResponse response = client.execute(get); + HttpEntity entity = response.getEntity(); + if (entity != null) { + InputStream instream = entity.getContent(); + InputStreamReader is=new InputStreamReader(instream); + BufferedReader br=new BufferedReader(is); + String read=br.readLine(); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + while(read!=null){ +// System.out.println(read); + bw.write(read); + bw.newLine(); + read=br.readLine(); + } + bw.close(); + instream.close(); + } + } +} diff -r 354aa87772e0 -r e2b16720ef25 get_ontology_view.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get_ontology_view.xml Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,40 @@ + + Retrieves a view of an ontology using the view id + java -jar ${__tool_data_path__}/shared/jars/get_ontology_view.jar $api_key $ontologyviewid > $output + + + + + + + + + + + + + + + +**What it does** + +It retrieves a view from an ontology contained in BioPortal. + +**Parameters** + +* Bioportal API key: to obtain an API key, open an account in http://bioportal.bioontology.org. +* Ontology view ID: it can be obtained from BioPortal, in the Ontology page, on the views section, by looking at the view URL. For example, it is 41014 for the generic Gene Ontology slim. + +**Contact** + +Please send any request or comment to mikel.egana.aranguren@gmail.com. + +**More information** + +http://bioportal.bioontology.org + +http://www.bioontology.org/wiki/index.php/BioPortal_REST_services + + + + diff -r 354aa87772e0 -r e2b16720ef25 ncbo_annotator.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ncbo_annotator.xml Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,704 @@ + + Annotates biological texts with the terms of the bio-ontologies from BioPortal + java -jar ${__tool_data_path__}/shared/jars/ncbo_annotator_galaxy.jar $longestOnly $wholeWordOnly $filterNumber $stopWords $withDefaultStopWords $isTopWordsCaseSensitive $mintermSize $scored $withSynonyms $ontologiesToExpand $ontologiesToKeepInResult $semanticTypes $levelMax $mappingTypes $textToAnnotate $format $apikey > $output + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**Usage** + Enter bioportal API key, a text to annotate and specify the parameters, and the annotations will be retrieved. + +**Contact** + + Please send any request or comment to jose.minyarro@um.es + +**More information** + + http://bioportal.bioontology.org + + + + \ No newline at end of file diff -r 354aa87772e0 -r e2b16720ef25 ncbo_annotator_galaxy.jar Binary file ncbo_annotator_galaxy.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 ncbo_recommender.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ncbo_recommender.xml Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,286 @@ + + Provides a bio-ontology as a recommendation depending on the annotations from a biological text + java -jar ${__tool_data_path__}/shared/jars/ncbo_recommender_galaxy.jar $text $format $ontologyId $apikey > $output + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**Usage** + Enter bioportal API key, a text, the output format and a list of bioontolgies Ids and the recommender retrieves the bioontology with the best annotations. + +**Contact** + + Please send any request or comment to jose.minyarro@um.es + +**More information** + + http://bioportal.bioontology.org + + + + \ No newline at end of file diff -r 354aa87772e0 -r e2b16720ef25 ncbo_recommender_galaxy.jar Binary file ncbo_recommender_galaxy.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 ncbo_resourceIndex.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ncbo_resourceIndex.xml Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,320 @@ + + Search for resources matched up with terms in bio-ontologies depending on the given text + java -jar ${__tool_data_path__}/shared/jars/ncbo_resourceIndex_galaxy.jar $query $ontologyids $resourceId $mode $elementDetails $format $apikey > $output + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**Usage** + Enter bioportal API key, a text, a list of bioontolgies Ids,a list of resources to search for, the mode, tick if you want detailed element and the format of the results, and the Resource Index interface retrieves the resources matched up with the bioontology terms associated with the text provided. + Example of search text: Melanoma + +**Contact** + + Please send any request or comment to jose.minyarro@um.es + +**More information** + + http://bioportal.bioontology.org + + + + \ No newline at end of file diff -r 354aa87772e0 -r e2b16720ef25 ncbo_resourceIndex_galaxy.jar Binary file ncbo_resourceIndex_galaxy.jar has changed diff -r 354aa87772e0 -r e2b16720ef25 ncbo_search.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ncbo_search.xml Mon Oct 08 14:25:04 2012 +0200 @@ -0,0 +1,281 @@ + + Search for terms in bio-ontologies depending on the text provided + java -jar ${__tool_data_path__}/shared/jars/ncbo_search_galaxy.jar $query $ontologyids $apikey > $output + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +**Usage** + Enter bioportal API key, a text, and the list of bioontolgies Ids to search for and the search interface retrieves the bioontology terms associated with the text provided. + Example of search text: Breast cancer + +**Contact** + + Please send any request or comment to jose.minyarro@um.es + +**More information** + + http://bioportal.bioontology.org + + + + \ No newline at end of file diff -r 354aa87772e0 -r e2b16720ef25 ncbo_search_galaxy.jar Binary file ncbo_search_galaxy.jar has changed