This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to calculate the haplotypic, nucleotidic diversity and theta of watterson with the pegas package R

Hello,

I have 100 bacteria genoms, and I need to calculate the haplotypic, nucleotidic diversity and theta of watterson with the pegas package R

I need a help

Thank you

pegas haplotypic diversity nucleotidic diversity

Hello mimi!

Questions similar to yours can already be found at:

We have closed your question to allow us to keep similar content in the same thread.

If you disagree with this please tell us why in a reply below. We'll be happy to talk about it.

Cheers!

As you do not provide any information on what you've tried or read so far, here is the simplest answer possible: Did you read the paper that describes the package?

Edit: Given that you've already posted a question on this, think about posting more elaborate questions, indicating what you have tried and read in order to motivate people to help you. One-liners typically do not motivate anyone.

Hello and thank you for your answer.

The article itself does not answer my questions, I used the pdf manual (much more detailed and clear).enter link description here

My files are genome sequences after doing an alignment.

My problem is that I divided my 100 genomes into 6 populations, and I would like to calculate the Dtajima for 6. Unfortunately I have this fault that I can not understand. enter link description here

Thank you

setwd("C:/Users/....") 
data=list() 
for(i in 1:6) {
data[[i]]=read.fasta(paste("pop",i,sep=""))
data
names(data[[i]]) = i
require(ape)
tajima.test(data[i])
}
Warning messages:
1: In tajima.test(data[i]) : Tajima test requires at least 4 sequences
2: In tajima.test(data[i]) : Tajima test requires at least 4 sequences
3: In tajima.test(data[i]) : Tajima test requires at least 4 sequences
4: In tajima.test(data[i]) : Tajima test requires at least 4 sequences
5: In tajima.test(data[i]) : Tajima test requires at least 4 sequences
6: In tajima.test(data[i]) : Tajima test requires at least 4 sequences

0 answers

No answers yet.

Log in to answer this question.