Generating A Tree From Nucleotide Frequencies
1
0
Entering edit mode
12.7 years ago
Oliver • 0

Hello, I am trying to generate a distance tree in PAUP from base frequencies. The 'Basefreq' command gives the base frequencies for each taxon but i need this to be converted to distances for tree building. Does anybody know how to convert these frequencies to distances? (either within PAUP or via another program)

Thankyou very much.

tree frequency • 2.5k views
ADD COMMENT
0
Entering edit mode

If you're familiar with R, you can easily calculate distances between sequences using the dist.dna function from the ape package.

From there on it's easy to create a graphical tree using other functions from that package. Please let us know if you need help.

ADD REPLY
0
Entering edit mode

Thank you for your reply Fucitol,

My problem is the need to calculate distances based on a frequency table rather than directly from sequences,

for example turning something like this...

##Taxon          A       C         G      T
A           0.345     0.270   0.094   0.284      
B           0.304     0.331   0.107   0.256       
C           0.309     0.324   0.101   0.264

into...

            A     B     C
A           0     x1    x2  
B           x3    0     x4
C           x5    x6    0

Thank you again

ADD REPLY
0
Entering edit mode

Thank you for your reply Fucitol,

My problem is the need to calculate distances based on a frequency table rather than directly from sequences, for example turning something like this...

Taxon   A     C     G     T
 A    0.345 0.270 0.094 0.284 
 B    0.304 0.331 0.107 0.256 
 C    0.309 0.324 0.101 0.264

into...

       A   B   C 
    A  0   x   x 
    B  x   0   x
    C  x   x   0

Thank you again

ADD REPLY
0
Entering edit mode

Thank you for your reply Fucitol,

My problem is the need to calculate distances based on a frequency table rather than directly from sequences. The frequency table will contain for each taxa; the frequencies of each nucleotide and I need to figure out how to convert this to a distance table which contains the pairwise distances between each taxa pairing.

Thank you again

ADD REPLY
0
Entering edit mode
11.4 years ago
Joseph Hughes ★ 3.0k

If I understand correctly, you want to determine the similarities between the base frequencies of your taxa. Here is a bit of code that should help you to do that in R:

#using the data you provided above
freq<-c( 0.345, 0.270 ,0.094 ,0.284, 0.304, 0.331 ,0.107 ,0.256, 0.309, 0.324, 0.101, 0.264 )
freq<-matrix(freq, nrow = 3, byrow=TRUE)
freq<-as.data.frame(freq)
row.names(freq)<-c("A","B","C")
# using dist will calculate the pairwise distances from the frequencies
hc = hclust(dist(freq))
plot(hc)

This gives you a dendrogram as follows:

enter image description here

I hope this might help even if it is 16 months ago you posted.

ADD COMMENT

Login before adding your answer.

Traffic: 2712 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6