]> git.donarmstrong.com Git - paml.git/blob - examples/lysin/README.txt
import paml4.8
[paml.git] / examples / lysin / README.txt
1 Notes by Ziheng Yang\r
2 Last modified: 22 July2003\r
3 \r
4 (I) Data files for NSsites models used by Yang, Swanson & Vacquier (2000):\r
5 \r
6     README.txt\r
7     lysin.trees (tree file)\r
8     lysin.nuc  (sequence data file, with 135 codons)\r
9     codeml.ctl  (control file)\r
10     lysinResult.txt (results under M0 and M3)\r
11     lysinPosteriorP.txt (posterior probabilities under M3)\r
12     SiteNumbering.txt (site numbering according to the structure file)\r
13     1LIS.pdb            (structure file for red abalone sperm lysin)\r
14 \r
15 \r
16 (II) Data files for fixed-sites models of Yang & Swanson (2002).  Note\r
17     that the tree file is shared as above, but the sequence data file is \r
18     different, with one site with gaps in the red abalone deleted.  \r
19     Yang & Swanson (2002 table 5) also fitted two random-sites (NSsites) \r
20     models, using the following data:\r
21 \r
22     codemlYangSwanson2002.ctl (controld file)\r
23     lysinYangSwanson2002.nuc  (sequence data file, with 134 codons)\r
24     lysin.trees\r
25 \r
26 \r
27 More details follow.\r
28 \r
29 (Ia) \r
30 This folder contains the control file, the sequence data file and\r
31 the tree file for demonstrating codon models that assign different\r
32 dN/dS ratios among sites in the sequence (Nielsen & Yang 1998; Yang,\r
33 Nielsen, Goldman & Pedersen 2000).  The included data set is the sperm\r
34 lysin genes from 25 abalone species used in Yang, Swanson & Vacquier\r
35 (2000).  The default control file (with NSsites = 3) lets you\r
36 duplicate the results in table 1 of that paper.  To run the program,\r
37 try\r
38 \r
39         codeml\r
40 \r
41 The file lysinPosteriorP.txt includes part of the output from the file\r
42 rst for model M3 (NSsites=3).  The first 3 columns are the three\r
43 probabilities for the three site classes; you can use them to make\r
44 figure 1 of Yang, Swanson & Vacquier (2000).  In parentheses are the\r
45 most likely class numbers.  The last two columns are the posterior\r
46 average w for the site and the probability for the most likely class\r
47 (redundant).\r
48 \r
49 (Ib) Colouring the Crystal Structure\r
50 \r
51 If you choose verbose = 1 and provide a file named SiteNumbering.txt\r
52 with numbering of sites in the alignment, codeml will generate a file\r
53 named RasMol.txt, which collects RasMol (RasWin) scripts for coloring\r
54 the amino acid residues in the structure according to the approximate\r
55 posterior mean_w.  Look at SiteNumbering.txt.  The sequence data\r
56 file lysin.nuc has 135 amino acid (codon) sites in the alignment, but\r
57 one site is a gap, represented by the ? in SiteNumbering.txt, which is\r
58 not in the pdf file.  Compare this with Figures 4 and 5 in Yang,\r
59 Swanson, and Vacquier (2000).  \r
60 \r
61 Here are the rules codeml uses right now.  The program copies your\r
62 site labels in SiteNumbering.txt verbatim as "text" (not as number)\r
63 when it prints to RasMol.txt.  If the label has a question mark in it,\r
64 codeml won't print that site, but all other sites with no ? in the\r
65 labels are printed (using the format "select ###", "color ....".  So\r
66 if you change the ? in the included SiteNumbering.txt for the lysin\r
67 into 133a, you will get the following output in RasMol.txt for that\r
68 site:\r
69 \r
70         select 133a\r
71         color [250, 35, 35]\r
72 \r
73 After codeml has generated RasMol.txt, you read the structure file\r
74 1LIS.PDB into RasMol.  Choose "Display-Cartoon".  Then in the\r
75 command-line window, type the following command to color the amino\r
76 acids.\r
77 \r
78        script RasMol.txt\r
79 \r
80 My version of RasMol (RasWin2.7.2.1) does not seem to be properly\r
81 installed, and I can't tell it to look for the file from the right\r
82 folder.  So I copied RasMol.txt into the same folder as\r
83 raswin2.7.1.1.exe and it reads the script fine.  I got a warning\r
84 message from RasWin: "Unable to allocate shade".  I don't know what it\r
85 means, but it does not seem to do any harm.\r
86 \r
87 Both filenames SiteNumbering.txt and RosMol.txt are hard-coded in\r
88 codeml.c.  I implemented three colour schemes, hard-coded as well,\r
89 with the colour-coded temperature matching the posterior mean w.  If\r
90 you want to change the source code, go to the routine\r
91 lfunNSsites_rate() and change continuous, ncolors, colorvalues (RGB\r
92 values).\r
93 \r
94 The red abalone lysin structure file 1LIS.pdb can be downloaded from\r
95 http://www.rcsb.org/pdb/ (choose download - text format).  The RasMol\r
96 site is at http://www.umass.edu/microbio/rasmol/.\r
97 \r
98 \r
99 (II)\r
100 \r
101 The lysin gene data used by Yang & Swanson (2002) to demonstrate the\r
102 fixed-sites models are included here as well.  The sequence data file\r
103 lysinYangSwanson2002.nuc has one fewer codon than lysin.nuc.  Look at\r
104 the beginning of the sequence data file, copied below, which says\r
105 there are 25 sequences in the file, each with 402 nucleotides (134\r
106 codons).  The 134 codons are partitioned into two "genes", which are\r
107 marked by 1 or 2, for buried and exposed residues, respectively.  \r
108 \r
109   25   402  G\r
110 G2\r
111 22222222221222112111221121122212211222122122222211211112211221221122122\r
112 212222222222112211221122221222122122222112122212211222222121212\r
113 \r
114 In the control file, note the variable Mgene, which is used to run the\r
115 models described in Yang & Swanson (2002, table 1), with results shown\r
116 in table 6 of the same paper.  To run the program, you type\r
117     codeml codemlYangSwanson2002.ctl\r
118 \r
119 If you are using an old mac with OS 9 or earlier, you make a copy of \r
120 codeml.ctl and then copy codemlYangSwanson2002.ctl into codeml.ctl and \r
121 then run \r
122    codeml\r
123 \r
124 method = 0 is probably faster for those Mgene models than method = 1.\r
125 \r
126 \r
127 References\r
128 \r
129 Nielsen, R., and Z. Yang. 1998. Likelihood models for detecting\r
130 positively selected amino acid sites and applications to the HIV-1\r
131 envelope gene. Genetics 148:929-936.\r
132 \r
133 Yang, Z., R. Nielsen, N. Goldman and A.-M. K. Pedersen. 2000. \r
134 Codon-substitution models for heterogeneous selection pressure at amino \r
135 acid sites. Genetics 155:431-449.\r
136 \r
137 Yang, Z., W. J. Swanson and V. D. Vacquier. 2000. Maximum likelihood\r
138 analysis of molecular adaptation in abalone sperm lysin reveals\r
139 variable selective pressures among lineages and\r
140 sites. Mol. Biol. Evol. 17:1446-1455.\r
141 \r
142 Yang, Z., and W. J. Swanson. 2002. Codon-substitution models to detect\r
143 adaptive evolution that account for heterogeneous selective pressures\r
144 among site classes. Mol. Biol. Evol. 19:49-57.\r