[infectious-disease-ontology] r339 committed - bug fixes

0 views
Skip to first unread message

infectious-di...@googlecode.com

unread,
Dec 5, 2010, 6:00:31 PM12/5/10
to ido-t...@googlegroups.com
Revision: 339
Author: alanruttenberg
Date: Sun Dec 5 14:59:33 2010
Log: bug fixes

http://code.google.com/p/infectious-disease-ontology/source/detail?r=339

Modified:
/trunk/src/tools/generate-obo.lisp
/trunk/src/tools/ido-to-obo.lisp

=======================================
--- /trunk/src/tools/generate-obo.lisp Sun Jul 18 20:53:25 2010
+++ /trunk/src/tools/generate-obo.lisp Sun Dec 5 14:59:33 2010
@@ -1,4 +1,4 @@
-# This is a modified version of the OBI to OBO script lightly edited to
work with owlapiv3. Changes should be merged back to OBI.
+; This is a modified version of the OBI to OBO script lightly edited to
work with owlapiv3. Changes should be merged back to OBI.

(defun obo-format-time (&optional (time-value (get-universal-time)))
"Format a time how the obo format likes to see it"
@@ -193,7 +193,7 @@
(if obsolete
(format f "is_obsolete: true~%")
(loop for super in (parents class kb)
- unless (or (#"matches" (rdfs-label super) "^_.*") (eq
super !owl:Thing))
+ unless (or (#"matches" (or (rdfs-label super) "") "^_.*") (eq
super !owl:Thing))
do (format f "is_a: ~a ! ~a~%" (localname-namespaced super)
(rdfs-label super))))
(terpri f))
;; now write out the list of properties we will use (we don't actually
write their values out yet in the above)
=======================================
--- /trunk/src/tools/ido-to-obo.lisp Sun Jul 18 20:53:25 2010
+++ /trunk/src/tools/ido-to-obo.lisp Sun Dec 5 14:59:33 2010
@@ -1,8 +1,8 @@
-# This is a patched together conversion script, relying on a modified
version of the OBI to OBO script lightly edited to work with owlapiv3
+; This is a patched together conversion script, relying on a modified
version of the OBI to OBO script lightly edited to work with owlapiv3

(defun ido-dont-include (uri)
"return t to mean include this term"
- (let ((matches (or
+ '(let ((matches (or
(#"matches" (uri-full uri) ".*OGMS.*")
(#"matches" (uri-full uri) ".*IAO_.*")
(#"matches" (uri-full uri) "http://www.geneontology.org/formats.*"))
@@ -11,7 +11,7 @@
(member uri
`(,!obo:OGMS_0000063 ,!obo:OGMS_0000031 ,!obo:OGMS_0000045)))
(not matches))))

-(defun generate-ido-obo (&key (kb (load-ontology "ido:ido-core;ido.owl"))
+(defun generate-ido-obo (&key (ido (load-ontology "ido:ido-core;ido.owl"))
(path (translate-logical-pathname "ido:ido-core;ido.obo"))
(saved-by "generate-ido-obo")
(default-namespace "IDO")
@@ -20,7 +20,7 @@
)
(instantiate-reasoner ido :pellet-sparql)
(setf (gethash !owl:Thing (rdfs-labels ido)) '("Thing"))
- (generate-obo :kb kb :path path :saved-by saved-by :default-namespace
default-namespace
+ (generate-obo :kb ido :path path :saved-by saved-by :default-namespace
default-namespace
:ontology-name ontology-name :ontology-uri
ontology-uri :default-definition-source " [OBO:sourced \"IDO consortium
http://www.infectiousdiseaseontology.org\"]" :filter-dont-include 'ido-dont-include :include-obsolete
t))

(defun rdfs-comments (kb)

Reply all
Reply to author
Forward
0 new messages