How to calculate Fst of each SNP between populations using PopGenome
Hello everyone,
I'd like to calculate Fst of each SNP between population using PopGenome. Finally, I'd like to detect high-Fst SNPs and plot Fst of each SNP like manhattan plot.
In my case, there are 3 bacteria populations. I'd like to calculate Fst of each SNP such that [Pop1 vs other populations(Pop2 and Pop3)], [Pop2 vs others(Pop1 and Pop3)], [Pop3 vs others(Pop1 and Pop2)].
At first, I defined 3 populations.
x <- readData("VCF", format="VCF", gffpath="GFF")
Pop1 <- as.character(read.csv("pop1.csv")[[1]])
Pop2 <- as.character(read.csv("pop2.csv")[[1]])
Pop3 <- as.character(read.csv("pop3.csv")[[1]])
x <- set.populations(x, list(Pop1, Pop2, Pop3))
x@populations #check
Then, to verify synonymous and non-synonymous SNPs,
x <- set.synnonsyn(x, ref.chr="referene.fasta")
To calculate Fst of each SNPs,
x <- detail.stats(x, site.FST=TRUE)
x@region.stats@siteFST
But, I don't know how to set population information.
Could you please tell me how to?
Regards,
• 1,123 views
•
link
0 answers
No answers yet.
Log in to answer this question.