jgx65 / hierfstat

the hierfstat package
24 stars 14 forks source link

2 funny problems when i use HierFstat #39

Closed zxy1555847 closed 3 years ago

zxy1555847 commented 3 years ago

Hello,I am glad that my last question was answered by you and,now,i have other questions and hope to get your help

  1. Is there a one-to-one correspondence between the result file after using the genind2hierfstat to convert the adegenet::genind file and the genepop file I input? and my code as follows: _x <- read.genepop("maf0.05.recode.p.snps.gen",ncode = 2L) basic.stats(x) genet.dist(x) head(genind2hierfstat(x)[,1:10]) b <- genind2hierfstat(x)_

so what i want to know is whether the loci of maf0.05.recode.p.snps.gen and b is one - to - one?

  1. i want to extract the loci of b that fst > 0.01 ,and convert it to vcf file , how can i achieve this goal? Or i want to use these loci perform PCA,can you give me some clues?

sorry about these clueless questions ,i am a really freshman in R and bioinformatics. so i am waiting for your reply!

jgx65 commented 3 years ago
  1. it should
  2. indpca is a good start for the PCA. For creating / reading VCF, see https://cran.r-project.org/web/packages/vcfR/vignettes/converting_data.html