Question: adegent for Tajima's D:
gravatar for biobudhan
5.3 years ago by
biobudhan20 wrote:

Hello everyone,

I am trying to use adegent in R for calculating the Tajima's D. I have a DNA.bin object containing my sequences from different populations. The sequences are of varying length because of the SNP and indels in them. I get the following error when I run the tajima.test function: 

Error in as.matrix.DNAbin(x) : 
  DNA sequences in list not of the same length.

How could one deal with calculating Tajima's D for sequences of different length? 




adegent snp fasta tajima • 1.8k views
ADD COMMENTlink modified 5.3 years ago by Brice Sarver3.6k • written 5.3 years ago by biobudhan20
gravatar for Brice Sarver
5.3 years ago by
Brice Sarver3.6k
United States
Brice Sarver3.6k wrote:

The input requires that the sequences be aligned, i.e., all sites are homologous. Think of it this way: how will you know which site an insertion or deletion corresponds to in other sequences if they are not aligned? Additionally, if sequences are not the same length, how would you calculate the number of segregating sites or pi?

ADD COMMENTlink modified 14 months ago by _r_am32k • written 5.3 years ago by Brice Sarver3.6k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1566 users visited in the last hour