Archive for July, 2008

Phylogenetic Dilemma

July 14, 2008

(This post is for my own notes.  It will probably make sense to about 0.00000001% of people subscribed to this blog.)

Consider the two unrooted phylogenies shown below.  Both trees contain the same taxa.  Suppose these topologies were discovered during an MCMC run. The “ingroup” taxa are blue and named with “i-.”  The outgroup taxa are red and named with “o-.”  On the ML tree, its pretty clear which nodes are the last-common ancestor of the ingroup and outgroup.  However, on the alternate tree, the rooting is ambiguous.

Phylogenetic Dilemma

Phylogenetic Dilemma

Simply put, the ingroup and outgroup are not monophyletic. This dilemma is problematic for ancestral sequence reconstruction (ASR) methods which attempt to incorporate phylogenetic uncertainty.  In such methods, we want to calculate the Bayesian average of the ancestral sequence from both trees.  On the alternate tree, which ancestor do we choose?

Here are three potential solutions:

  1. Discard trees with non-monophyletic ingroups/outgroups.
  2. Randomly select one of the putative ancestors, and forget about the other one.
  3. Use the average of the putative ancestral sequences.  In our example, the alternate tree contains two possible roots.  Therefore, we average the ancestral sequences from both of these nodes, and then use this averaged sequence in our overall Bayesian average with other trees.

Protein alignments, ART, and buggy Nexus Files

July 12, 2008

Here are some notes about a strange problem with ART and Nexus files

If you attempt to run ART, and see an error message like this:

ART is veriyfing that your tree file corresponds with your sequence file. .

-> ART says: some of the taxa in your treefile do not exist in your sequence file.

Missing taxa:
SpADH2 KlADH2 SkADH4 ScADH3 KmADH2 KLADH4 KwADH3 SkADH3 SpADH5 SbADH2 SbADH5 SpADH1 SkADH2 PsADH2 KlADH3 KwADH4 SbADH3 PsADH1 KmADH1 ScADH2 SpADH3 ScADH5 KlADH1 SkADH1 KwADH1 SbADh1 ScADH1

Error!
ART was unable to import your data.  See previous errors.

The problem is that ALL of your taxa are not found in your sequence file.  Obviously, you might feel like you’re going crazy, because your alignment looks fine.

SOLUTION: In your Nexus alignment, find a line which looks like this:

FORMAT DATATYPE=PROTEIN  SYMBOLS = ” 1 2 3 4″  MISSING=? GAP=- ;

Remove the “SYMBOLS” parameter.  Apparently, this parameter trips-up the BioNexus parser.

FORMAT DATATYPE=PROTEIN MISSING=? GAP=- ;

. . . and hopefully that should solve the problem!

Fixing Mr. Bayes, MPI, and SSH keys

July 2, 2008

Here are obscure notes about solving a problem with Mr. Bayes, MPI, and SSH:

PROBLEM: Mr. Bayes (or some other MPI application) fails. When we execute this command:

mpirun -v -machinefile .bhosts -np 8 mb < script.nex

. . . we get the following output:

running /common/bin/mb on 8 freebsd_ppc ch_p4 processors
Created /Users/victor/PI26710
Password:
Parallel version of
p0_26516: p4_error: Child process exited while making connection to remote process on node003.cluster.private: 0
p0_26516: (15.092200) net_send: could not write to fd=5, errno = 32
DIAGNOSIS: Your SSH keys are not correctly setup to allow MPI to communicate with other nodes.
SOLUTION: Follow these steps. . .
  1. cd .ssh
  2. ssh-keygen -t dsa -f id_dsa
  3. cat id_dsa.pub >> authorized_keys
  4. chmod 640 authorized_keys
  5. Open authorized_keys with your favorite text editor. The first line should contain a key for you@your.awesome.cluster.
  6. Copy the first line. Paste this line once for each node in the cluster. Change the hostname to match the name of the node. For example, the first few lines of my authorized_keys file looks like this (where “. . .” are pieces I’ve abridged for security reasons):

ssh-dss AAAAB3NzaC1kc3MAAACBAO6K5GKxrd2UO. . .
. . .
b8R7y6RJCTDRDw6iOJK8xKSvnC
X8= victor@my.awesome.cluster.edu
ssh-dss AAAAB3NzaC1kc3MAAACBAO6K5GKxrd2UO. . .
. . .
b8R7y6RJCTDRDw6iOJK8xKSvnC

X8= victor@node002.cluster.private
ssh-dss AAAAB3NzaC1kc3MAAACBAO6K5GKxrd2UO. . .
. . .
b8R7y6RJCTDRDw6iOJK8xKSvnC

X8= victor@node003.cluster.private

. . . and now your MPI application should work.

If you’re fixing this problem for someone else (assuming you have root privileges), do the following additional steps:

  1. All the keys you generate will be for root@my.awesome.cluster. In authorized_keys and id_dsa.pub, change root@my.awesome.cluster to someone.else@my.awesome.cluster, where someone.else is the appropriate username.
  2. All the keyfiles you generate will be owned by root, which is not what we want. “chown USERNAME” authorized_keys and id_dsa*.

Follow

Get every new post delivered to your Inbox.