(define-ontology alzantibodies (:base "http://www.w3.org/2001/sw/hcls/ontologies/reagent.owl" :includes '(reagent)) (let ((individuals nil) (count 0)) (block limit (foreach-antibody-entry (lambda(entry) (flet ((field (field) (let ((value (cdr (assoc field entry)))) (if (and (char= (char value 0) #\") (char= (char value (1- (length value))) #\")) (setq value (subseq value 1 (- (length value) 2)))) (if (or (equal value "NULL") (equal value " ")) nil (progn (#"replaceAll" (#"replaceAll" value "&" "&") "\"" "%22")))))) ; (when (> (incf count) 2000) ; (return-from limit nil)) (let* ((name (make-uri-base-relative (format nil "antibody-~a" (field :antibodyid)) "alz:")) (individual (individual name (annotation !alz:hasAntibodyId (field :antibodyid)) (and (field :epitope) (annotation !hasEpitopeDescription (field :epitope))) (and (field :specificity) (annotation !hasSpecificityDescription (field :specificity))) (annotation !hasHostDescription (format nil "~a~a" (field :hostfastoutput) (if (field :hostExtraInfo) (format nil " (~a)" (field :hostExtraInfo)) ""))) (annotation !hasReactivityDescription (format nil "~a~a" (field :reactivityfastoutput) (if (field :reactivityextrainfo) (format nil " (~a)" (field :reactivityextrainfo)) ""))) (annotation !hasCompanyDescription (field :companyname)) (annotation !alz:hasAntigenClass (field :antigenId)) (type !Antibody)))) (push individual individuals)))))) individuals))