You would typically begin a query session by starting the Pathway Tools or EcoCyc (depending on which software configuration you have installed) in a mode in which it enters the Lisp interpreter on startup, rather than entering the Pathway/Genome Navigator interface. Use the command
pathway-tools -lispor
ecocyc -lisp
% pathway-tools -lisp [Lisp started at 17:08:59 on Tue Oct 23, 2001] ; Loading /home/swami1/pkarp/lisp/misc.lisp ; Loading /home/hapuna1/biogrp/lisp/meta.lisp [changing package from "COMMON-LISP-USER" to "ECOCYC"] ;; Select E. coli as the current organism EC(1): (select-organism :org-id 'ecoli) ECOLI ;; Count the number of genes in the KB. EC(1): (length (get-class-all-instances '|Genes|)) 4425 ;; Find all genes whose nucleotide position on the chromosome is ;; less than 10,000. EC(3): (loop for x in (get-class-all-instances '|Genes|) for pos = (get-slot-value x 'left-end-position) when (and pos (< pos 10000)) collect x) (EG11512 EG11555 EG10998 EG11000 EG10999 EG11556 EG11511 G6081 EG10011 EG11277) ;; Set variable g to the previous result. EC(4): (setq g *) (EG11512 EG11555 EG10998 EG11000 EG10999 EG11556 EG11511 G6081 EG10011 EG11277) ;; Load the example.lisp file from the PTools web site, which ;; defines various additional functions. You can write you own ;; additional functions in such files. EC(5): (load "~/examples") ;; Loading ~/examples.lisp ;; Print the previously generated list of genes as a table. EC(6): (object-table g) EG11512 b0010 EG11555 b0007 EG10998 thrA EG11000 thrC EG10999 thrB EG11556 talB EG11511 mog G6081 b0005 EG10011 b0006 EG11277 thrL NIL ;; End our session EC(7): (exit) ; killing "Initial Lisp Listener" ; Exiting Lisp
(in-package :ecocyc) (defun num-monomers () (length (get-class-all-instances '|Polypeptides|)) )To define or redefine this function within your Lisp session, load the file using the Lisp load function. If the preceding file was called monomers.lisp in your home directory, you could load it into your session by typing:
(load "~/monomers")