1. Two input files are required: - 19 amino acid frequencies in this order: KNTRSIMHPLEDAGVQYCW - 3 periodicity variables: GES crossover, Polarity crossover, and Polarity var of 1st derivative The 19 aa frequency data are used to calculate the AAindex using S-Plus (see below), and combined with the other 3 to obtain the 4 variables. See example files for how to prepare these files. For the description of these 4 variables, see Kim et al. (2000) Bioinformatics 16:767. 2. For all other analysis, S-PLUS is required. R should also work, but we have not tested yet, and some minor changes may necessary. 3. Copy the 2 input files prepared above to the directory where Splus is run. Make sure this directory cotains .Data directory prepared for Splus. 4. Download the trained model files: gpcrtrainaaf.lda, gpcrtrainmw4.lda, and gpcrtrainmw4.qda. If you want to do KNN prediction, your need two more files, gpcrtrainmw4.mat and gpcrtrain.label. Copy these files in the .Data directory. If you do not have .Data directory prepared by Splus in the directory you want to work, type: > Splus CHAPTER It creates .Data directory, and now you can run Splus from this directory. 5. Start S-PLUS on your machine. 6. Attach the required libraries as follows (">" is the Splus prompt): > library(MASS) 7. Read the two input files into Splus: > testaaf.dat = read.table("test.aafout") > testmw.dat = read.table("test.mwout") where test.aafout is the 19 aa frequency file and test.mwout is the 3 variable file. 8. Convert the two data.frames to numeric matrices: > testaaf.mat = as.matrix(testaaf.dat[]) > testmw.mat = as.matrix(testmw.dat[]) To make sure the .mat files are numeric matrices: > mode(testaaf.mat) This should return "numeric". 9. Calculate AA index (LD1) and produce a 4-variable matrix: > testmw4.mat = as.matrix(cbind(predict(aaflda, as.matrix(testaaf.mat))$x, testmw.mat)) 10. Prediction by LDA, QDA, and KNN20 are done as follows: > testmw4.lda.predict = predict(gpcrtrainmw4.lda, testmw4.mat) > testmw4.qda.predict = predict(gpcrtrainmw4.qda, testmw4.mat) > testmw4.knn20.predict = knn(gpcrtrainmw4.mat, testmw4.mat, gpcrtrain.label, k = 20, use.all = T) 11. To see the prediction results, simply type the file names: > testmw4.lda.predict It should show the classification result (G for GPCR or R for nonGPCR) and posterior probability for each category (G or R)