whitlock / OutFLANK

A procedure to find Fst outliers based on an inferred distribution of neutral Fst
18 stars 9 forks source link

Please clear about this output from outflank #17

Open Mary-00 opened 5 years ago

Mary-00 commented 5 years ago

Hi all,

I used outflank for finding outlier SNPs between my population (about 1100 individuals, human) and other populations (about 500 individuals) among about 2500 SNP variants related to a specific trait. I followed your instruction and did the analysis without any error. the below code is used:

vcf <- read.vcfR("file1.vcf", verbose=FALSE)
convertVCFtoCount3 <- function(string){
    a <- as.numeric(unlist(strsplit(string, split = c("[|///]"))))
    odd = seq(1, length(a), by=2)
    a[odd] + a[odd+1]
 }
 all.vcf.gen <- vcf@gt[,-1]
  system.time(gen_table <- matrix(convertVCFtoCount3(all.vcf.gen), ncol=ncol(all.vcf.gen)))
   locinames <- paste(vcf@fix[,"CHROM"], vcf@fix[,"POS"], sep="_")
   SNPdata <- t(gen_table)
   ind <- read.table("pop.txt", header=TRUE)
   FstDataFrame <- MakeDiploidFSTMat(SNPdata,locinames,ind$pop)
   out1 <- OutFLANK(FstDataFrame, NumberOfSamples=2)

The missing data was considered to be 9, not NA.

the results of FstDataFrame looks with no problem. But, In the out1 file, the FSTbar and FSTNoCorrbar values are the same for all 2500 variants!! Could you please kindly let me know what's the problem and how to solve it?

Thank you in advance