(defclass phosphosite ()
((entries :initarg :entries :initform (make-hash-table :test 'equal) :accessor entries)
(indices :initarg :indices :initform nil :accessor indices)
(roots :initarg :roots :initform nil :accessor roots)
))
(defmethod each-phosphosite-page ((p phosphosite) function)
(loop for site in
(remove-duplicates
(loop for (nil url) in (roots p)
for page = (get-url (if (numberp url)
(format nil "http://www.phosphosite.org/ParentProteinHomePage.jsp?proteinId=~a&organismId=5" url)
url)
:nofetch t)
append (mapcar 'car (all-matches page "PhosphoSiteHomePage.jsp\\?psdbId=(\\d+)" 1))
) :test 'equal)
do
(funcall function site)))
(defmethod extract-site-page-headers ((p phosphosite) site)
(let ((page (page-for-site p site)))
(remove-if-not (lambda(s) (char= (char s (1- (length s))) #\:))
(mapcar 'car (all-matches page "(?i)(?s)(.*?)(){0,1}\\s*([^<]*?)\\s*\\s*([^<]*?)\\s*\\s*([^<]*?)
[^<]*?