Changeset 459
- Timestamp:
- 05/31/11 15:16:34 (2 years ago)
- Location:
- trunk/ontoCAT
- Files:
-
- 5 edited
-
dist/release_notes.txt (modified) (10 diffs)
-
src/uk/ac/ebi/ontocat/bioportal/BioportalOntologyService.java (modified) (1 diff)
-
src/uk/ac/ebi/ontocat/examples/Example2.java (modified) (1 diff)
-
src/uk/ac/ebi/ontocat/examples/Sandbox.java (modified) (3 diffs)
-
src/uk/ac/ebi/ontocat/file/FileOntologyService.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ontoCAT/dist/release_notes.txt
r458 r459 5 5 Add getUri method to OntologyTerm 6 6 7 Version 0.9.8 //20117 Version 0.9.8 31/05/2011 8 8 Added GNU and Apache license boilerplates to all source files 9 9 10 Modified distribution package by adding a top-level directory to avoid polluting 10 the directory that it is unzipped into 11 the directory that it is unzipped into 12 13 OntoCAT's default apikey is now added to all BioPortal REST queries 14 (note that you can also use your private apikey by supplying it in the 15 alternative BioportalOntologyService constructor) 16 17 As per OBO Foundry policy (http://www.obofoundry.org/id-policy.shtml) 18 OBO accessions are now translated by OWL API into URIs. This results in 19 colons (:) being replaced with underscores (_) in the accessions. In line with 20 this policy OntoCAT leaves the accessions as is, however it it still possible 21 to getTerm() by its OBO accession, e.g. GO:0000003, but the accession 22 on the retrieved corresponding OntologyTerm will be GO_0000003. 11 23 12 24 Version 0.9.7.7 17/05/2011 13 25 FIX: ReasonedFileOntologyService basic constructor was not being instantiated properly 26 14 27 FIX: Another work-around for OWL API 3.2.2 introducing invalid object properties 15 28 URIs and messing up with the reasoner. The new approach relies on removing unused 16 29 object properties rather than merging as it is difficult to predict which properties 17 30 to merge with OBO namespace introducing another unknown into the object propery URI 31 18 32 UPDATE: Updated BioPortal's OntologyBean signature with userAcl field 19 33 20 34 Version 0.9.7.6 26/04/2011 21 35 FIX: Manual fix for EFO synonyms and definitions to be parsable through BioPortal 36 22 37 Added an internal cache to BioportalOntologyService that stores the results of 23 38 recent queries (LRU type, 100 queries capacity) 39 24 40 Modified the way BioportalOntologyService accesses hierarchy to reuse ConceptBean 25 41 rather than calling parents/children signatures (considerable speed improvement due … … 30 46 the "owlapi" prefixes in OBO ontologies, but the OBO parser now incorrectly 31 47 loads the object property IRIs, which required a different fix. 48 32 49 FIX: Added an override for the arbitrary limit in the SAXParser of 64k entity expansions 33 50 when using RDFXMLParser (error message: The parser has encountered more than "64,000" … … 35 52 36 53 Version 0.9.7.4 31/03/2011 37 The owlapi prefix is now removed from OBO term accessions when using the ReasonedFileOntologyService 54 The owlapi prefix is now removed from OBO term accessions when using the 55 ReasonedFileOntologyService 38 56 39 57 Version 0.9.7.3 23/03/2011 40 58 FIX: ReasonedFileOntologyService was incorrectly calculating root terms 59 41 60 FIX: ReasonedFileOntologyService now also computes relationships for OBO ontologies 42 61 … … 47 66 Version 0.9.7.1 11/03/2011/ 48 67 Some internal refactoring of ReasonedFileOntologyService 68 49 69 Renamed ReasonedFileOntologyService.getRelationsShortcut() to getSpecificRelation() 50 70 … … 52 72 Change in OntologyService.getRelations signature from return Map<String, List<String>> 53 73 to Map<String,Set<OntologyTerm>> 74 54 75 Added ReasonedFileOntologyService, which uses the HermiT reasoner to infer hierarchy and relations 76 55 77 Added support for individuals/instances/particulars to FileOntologyService 78 56 79 FIX: OLS.getRelations() now returns a proper result set 57 80 … … 61 84 Version 0.9.6.2 8/02/2011 62 85 Added LocalisedFileService that harmonises and overwrites ontology accessions for FileOntologyService 86 63 87 Updated to latest BioPortal REST signature 88 64 89 FIX: property search was case sensitive in FileOntologyService 90 65 91 FIX: sorting by similarity now includes properties in BioportalOntologyService and FileOntologyService 66 92 67 93 Version 0.9.6.1 24/11/2010 68 94 Rolled out similarity enabled search (Levenshtein distance across normalised strings) 95 69 96 Updated to the newest BioPortal ontology bean xml signature 97 70 98 Customised XStream parser so that future BioPortal xml updates will no longer block the parser 99 71 100 Fix for some of the issues with term context and service type 101 72 102 Fix for "The ontology could not be created:" error in FileOntologyService 73 103 74 104 Version 0.9.6 15/11/2010 75 105 Updated OWL API dependency to 3.1 106 76 107 On creation of FileOntologyService you can specify a user-defined ontology accession 108 77 109 New utils package containing some convenience methods for the R ontocat package 110 78 111 BioportalOntologyService.getOntologies() also lists the views 112 79 113 FIX: Unnecessary warnings when searching OLS 114 80 115 FIX: Occasional incorrect parsing of ontology accessions when searching OLS 116 81 117 FIX: FileOntologyService will throw exception if there are classes with no properties 82 118 83 119 Version 0.9.5.3 1/10/2010 84 120 FIX: Colon in query would crash BioPortal 121 85 122 FIX: CachedOntologyService -> OntologyTermContext was not serializable 123 86 124 FIX: BioportalOntologyService would not populate ontologyAccession in getAllTerms() 125 87 126 FIX: include sources inside the distribution so that javadoc shows up properly 88 127 … … 93 132 Version 0.9.5.1, 24/9/2010 94 133 FIX: getAnnotations() would result in IndexOutOfBoundsException in some cases 134 95 135 FIX: Updated to recent BioPortal web services signature for OntologyBean - authorSlot 136 96 137 FIX: Various fixes to javadoc 97 138 98 139 Version 0.9.5, 22/9/2010 99 140 Added support for labels being part of the class URI 141 100 142 FIX: removed unnecessary eager fetching on some of the methods in BioportalOntologyService 101 143 (e.g. getParents, getChildren where the return list was post-processed on 102 144 individual term basis) 145 103 146 FIX: updated to the latest BioPortal service signature, i.e. instances XML 147 104 148 Less warnings on using unoptimised getAllParents and getAllChildren 105 149 … … 108 152 -automatically recognises OBO definition and synonyms 109 153 -drops metadata EXACT, RELATED [] etc from synonyms 154 110 155 Removed a bottleneck in OLS.searchOntology to speed up queries 156 111 157 Extended OntologyService interface with getAllTerms(), getAllChildren(), getAllParents() 112 158 -FileOntologyService has optimised versions for all three … … 114 160 -all other cases are emulated in a slow unopotimized fashion (a warning 115 161 is issued) 162 116 163 Added downloadLocation to OntologyBean (fix for a new field in BioPortal response) 117 164 118 Version 0.9.3, 9/07/2010 165 Version 0.9.3, 9/07/2010 119 166 Extended BioportalOntologyService with the searchSubtree method 167 120 168 Added OntologyContext to OntologyTerm 169 121 170 Harmonised all services to return null values or empty lists on empty results 171 122 172 Added full internal caching to FileOntologyService to improve performance 123 173 124 174 Version 0.9.2, 28/05/2010 125 175 Added SearchOptions for searchAll() and searchOntology(): EXACT, INCLUDE_PROPERTIES 176 126 177 Fixed maxnumhits setting in BioPortal query to arbitrary large number 178 127 179 Updated BioPortal rest signatures to support URLs as concept IDs 180 128 181 URL encoding parameters in BioPortal queries 182 129 183 Some fixes to make BioportalOntologyService and CachedServiceDecorator thread safe 130 184 131 185 Version 0.9.1, 8/04/2010 132 186 Re-implemented searchAll() in OLSOntologyService as it suddenly stopped working 187 133 188 Consistent exceptions throwing for incorrect accessions 134 189 135 190 Version 0.9, 25/03/2010 136 191 Updates to recent BioPortal web services signature 192 137 193 Includes a number of improvements: 138 194 -caching … … 146 202 COPYRIGHT & LICENSE 147 203 =================== 148 149 204 Copyright (c) 2010 - 2011 European Molecular Biology Laboratory and University of Groningen 150 205 -
trunk/ontoCAT/src/uk/ac/ebi/ontocat/bioportal/BioportalOntologyService.java
r458 r459 135 135 * Instantiates a new bioportal service. 136 136 * 137 * @param email138 * the email139 */ 140 public BioportalOntologyService(String email) {137 * @param apikey 138 * the apikey required by BioPortal for REST queries 139 */ 140 public BioportalOntologyService(String apikey) { 141 141 // Now map the xml to the java beans 142 142 // FIXME level? 143 urlAddOn = "&email=" + email + "&level=1"; 143 urlAddOn = "&apikey=" + apikey 144 + "&level=1"; 144 145 configureXstream(); 145 146 } 146 147 147 148 /** 148 * Shorthand that uses ontocat -svn email to instantiate the service149 * Shorthand that uses ontocat apikey l to instantiate the service 149 150 * 150 151 */ 151 152 public BioportalOntologyService() { 152 this(" ontocat-svn@lists.sourceforge.net");153 this("c6ae1b27-9f86-4e3c-9dcf-087e1156eabe"); 153 154 } 154 155 -
trunk/ontoCAT/src/uk/ac/ebi/ontocat/examples/Example2.java
r458 r459 37 37 public static void main(String[] args) throws OntologyServiceException { 38 38 // Instantiate BioPortal service 39 // Note that this uses ontocat's default apkikey 40 // but you can pass your private apikey into the service 41 // by using the alternative constructor 42 // new BioportalOntologyServcie( "your apkiey" ); 39 43 OntologyService os = new BioportalOntologyService(); 40 44 -
trunk/ontoCAT/src/uk/ac/ebi/ontocat/examples/Sandbox.java
r458 r459 24 24 import jargs.gnu.CmdLineParser.UnknownOptionException; 25 25 26 import java. io.File;26 import java.net.URI; 27 27 import java.net.URISyntaxException; 28 import java.util.Set;29 28 30 29 import org.apache.log4j.Logger; … … 32 31 import uk.ac.ebi.ontocat.OntologyService; 33 32 import uk.ac.ebi.ontocat.OntologyServiceException; 34 import uk.ac.ebi.ontocat.OntologyTerm;35 33 import uk.ac.ebi.ontocat.file.ReasonedFileOntologyService; 36 34 … … 51 49 52 50 OntologyService os = new ReasonedFileOntologyService( 53 new File( 54 "C:\\work\\EFO\\EFO on bar\\ExperimentalFactorOntology\\ExFactorInOWL\\releasecandidate\\efo_release_candidate.owl") 55 .toURI(), "efo"); 56 Set<OntologyTerm> organisms = os.getAllChildren("efo", "OBI_0100026"); 57 log.info("Organism has " + organisms.size() 58 + " children"); 51 URI.create("http://www.geneontology.org/GO_slims/goslim_generic.obo")); 59 52 60 for (OntologyTerm t : organisms) { 61 if (!t.getAccession().contains("NCBITaxon")) { 62 System.out.println(t.getLabel() + "\t" 63 + t.getAccession()); 64 for (String syn : os.getSynonyms(t)) { 65 System.out.println(syn + "\t" 66 + t.getAccession()); 67 } 68 } 53 log.info(os.getTerm("GO_0000003")); 54 if (os.getTerm("GO:0000003") == null) { 55 log.warn("NULL"); 69 56 } 70 57 71 58 } 72 59 73 public static String getURI(OntologyTerm term) { 74 return "http://purl.org/obo/owl/CL#" + term.getAccession(); 75 // return ((ConceptBean) term).getFullId(); 76 } 60 77 61 } -
trunk/ontoCAT/src/uk/ac/ebi/ontocat/file/FileOntologyService.java
r458 r459 612 612 protected OWLEntity getOwlEntity(String termAccession) 613 613 throws OntologyServiceException { 614 return cache.get(termAccession); 614 OWLEntity result = cache.get(termAccession); 615 if (result == null){ 616 // try replacing : with _ as per the OBO Foundry 617 // id policy http://www.obofoundry.org/id-policy.shtml 618 result = cache.get(termAccession.replace(":", "_")); 619 } 620 return result; 615 621 } 616 622
Note: See TracChangeset
for help on using the changeset viewer.