Hi,

I have two files with about 4 fasta sequences each in the PHYLIP format for Da/Ds (Ka/Ks) comparison. After a search on the net, I found that the best software to do so is PAML and it requires a control file and 2 input files. For the tree input, I used PHYML which accepts PHYLIP file inputs and gives NEWICK format outputs. However I am unsure as to how to get the sequence file. I tried the sequential format but it gives me the "Error in sequence data file" error.

[This][1] is my control file. [Here][2] is my sequence file and [here][3] is my tree file.

Could I get some advice on what is wrong with my input file please. Also, this is just one set of the sequences which I wanted to compare. How do I compare two sets of sequences for the Da/Ds values. I know that this might be basic so thank you for your patience.

 [1]: https://www.dropbox.com/s/dupmdmufapmfzdk/codeml.ctl?dl=0
 [2]: https://www.dropbox.com/s/mwr05pxvlzvk9ea/tm-lrr.txt?dl=0
 [3]: https://www.dropbox.com/s/e6hi4pirbr8goho/tmphy_phy_phyml_tree.txt?dl=0
I don't think your sequence file is in correct format and does not look like a multiple alignment. You need a multiple sequence alignment as input. You can use the online tools (either Readseq or Built-in converter) at [Phylogeny.fr][1] website to check if your sequence file is in correct format (by trying to convert to other format).

The sequences in your file are also not of same length. If the 'cleandata' option is set to 1 in the .ctl file (which is the default), PAML will remove any sites with gaps in at least one sequence.

From the [PAML User Guide][2] (Page 11):

The way that ambiguity characters and alignment gaps are treated in baseml and codeml depends on the variable `cleandata` in the control file. In the maximum likelihood analysis, sites at which at least one sequence involves an ambiguity character are removed from all sequences before analysis if `cleandata` = 1, while if `cleandata` = 0, both ambiguity characters and alignment gaps are treated as ambiguity characters. In the pairwise distance calculation (the lower-diagonal distance matrix in the output), `cleandata` = 1 means "complete deletion", with all sites involving ambiguity characters and alignment gaps removed from all sequences, while `cleandata` = 0 means "pairwise deletion", with only sites which have missing characters in the pair removed.

 [1]: http://phylogeny.lirmm.fr/phylo_cgi/programs.cgi
 [2]: http://abacus.gene.ucl.ac.uk/software/pamlDOC.pdf