snp_fst | R Documentation |
Fixation index (Fst), either per variant, or genome-wide
snp_fst(list_df_af, min_maf = 0, overall = FALSE)
list_df_af |
List of data frames with |
min_maf |
Minimum MAF threshold (for the average of populations) to be
included in the final results. Default is |
overall |
Whether to compute Fst genome-wide ( |
If overall
, then one value, otherwise a value for each variant
with missing values for the variants not passing min_maf
.
This should be equivalent to using '--fst --within
' in PLINK.
Weir, B. S., & Cockerham, C. C. (1984). Estimating F-statistics for the analysis of population structure. Evolution, 1358-1370.
bedfile <- system.file("extdata", "example.bed", package = "bigsnpr")
obj.bed <- bed(bedfile)
pop <- rep(1:3, c(143, 167, 207))
ind_pop <- split(seq_along(pop), pop)
list_df_af <- lapply(ind_pop, function(ind) bed_MAF(obj.bed, ind.row = ind))
snp_fst(list_df_af)
snp_fst(list_df_af[c(1, 2)], overall = TRUE)
snp_fst(list_df_af[c(1, 3)], overall = TRUE)
snp_fst(list_df_af[c(3, 2)], overall = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.