This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Nucleotide diversity between population

I have been a sample of 20 individuals samples (of SNP/INDELS) collected from 4 different locations. I want to do nucleotide diversity pi analysis. Is it valid to do a nucleotide diversity pi test long the whole genome seq between populations? or should I compare nucleotide diversity along chromosomes?

illumina nucleotide diversity pi

1 answer

Hi, it depends on what your question is. You can do a nucelotide diversity on whole genomes within populations and then compare it between populations. You can use R to then plot how it differs along each chromosome. Here is a post explaining it (the explanation is in Mandarin), but the codes are in English. You can use vcftools to calculate pi diversity

I have used the above code to include 3 populations for my analysis:

library(ggplot2)
mydata<-read.table("pi.windowed.pi",header = T)
mydata1<-na.omit(mydata)
ggplot(mydata1, aes(x=BIN_START/100000,y=PI, group=factor(CHROM)))+geom_point()+
+xlab("Physical distance(Mb)")+ylab("pi")+theme(legend.position ="none")+facet_wrap(~mydata1$CHROM)
a<-mydata1[sample(nrow(mydata1), 200), ]

Thanks so let say I have the VCF file of Population a,b,c,d. Each population has 4 individuals' whole genome seq. (I am using Galaxy server) will the pi value that software provides be average pi vale ou 4 individual?

Log in to answer this question.