Tidy Population Genetics
An arrange method for gen_tibble
objects
An arrange method for grouped gen_tibble
objects
Augment data with information from a gt_pca object
Augment the loci table with information from a gt_pca object
Augment the loci table with information from a analysis object
Augment data with information from a q_matrix object
Augment data with information from a gt_dapc object
Autoplots for gt_admix
objects
Autoplots for gt_cluster_pca
objects
Autoplots for gt_dapc
objects
Autoplots for gt_pca
objects
Autoplots for gt_pcadapt
objects
Autoplots for q_matrix
objects
Autoplots for qc_report_indiv
objects
Autoplots for qc_report_loci
objects
Combine method for gt_admix objects
A $ method for gen_tibble
objects
Combine a gen_tibble to a data.frame or tibble by column
Count the number of loci in a gen_tibble
Filter individuals based on a relationship threshold
Tidyverse methods for gt objects
A filter method for grouped gen_tibble
objects
Find duplicates in the loci table
Constructor for a gen_tibble
Return a single P matrix from a gt_admix
object
Return a single Q matrix from a gt_admix
object
Add an simple feature geometry to a gen_tibble
Reorder the q matrices based on the grouping variable
Run ADMIXTURE from R
Convert a gen_tibble
to a genind
object from adegenet
Convert a gen_tibble
to a genlight
object from adegenet
Convert a gentibble
to a .geno file for sNMF from the LEA package
Convert a gen_tibble
to a data.frame compatible with hierfstat
Export a gen_tibble
object to PLINK bed format
Convert a gen_tibble
to a VCF
Find the best number of clusters based on principal components
Run K-clustering on principal components
Discriminant Analysis of Principal Components for gen_tibble
Compute and store blocked f2 statistics for ADMIXTOOLS 2
Get the names of files storing the genotypes of a gen_tibble
Checks if a gen_tibble
has been imputed
Simple imputation based on allele frequencies
Imputation based XGBoost
Load a gen_tibble
Order the loci table of a gen_tibble
PCA controlling for LD for gen_tibble
objects
PCA for gen_tibble
objects by partial SVD
PCA for gen_tibble
objects by randomized partial SVD
Principal Component Analysis for gen_tibble
objects
pcadapt analysis on a gen_tibble
object
Set the ploidy of a gen_tibble
to include pseudohaploids
Save a gen_tibble
Sets a gen_tibble
to use imputed data
Run SNMF from R in tidypopgen
Update the backing matrix
Checks if a gen_tibble
uses imputed data
Estimate individual observed heterozygosity
Individual inbreeding coefficient
Estimate individual missingness
Return individual ploidy
Test if the loci table is ordered
Load example gen_tibble
Estimate allele frequencies at each locus
Get the chromosomes of loci in a gen_tibble
Test Hardy-Weinberg equilibrium at each locus
Clump loci based on a Linkage Disequilibrium threshold
Estimate missingness at each locus
Get the names of loci in a gen_tibble
Estimate nucleotide diversity (pi) at each locus
Find transitions
Find transversions
A mutate method for gen_tibble
objects
A mutate method for grouped gen_tibble
objects
Compute the Population Branch Statistics for each combination of popul...
Compute the Pairwise Allele Sharing Matrix for a gen_tibble
object
Compute the Genomic Relationship Matrix for a gen_tibble
object
Compute the Identity by State Matrix for a gen_tibble
object
Compute the KING-robust Matrix for a a gen_tibble
object
Compute pairwise population Fst
Pipe operator
Compute population specific FIS
Compute population specific Fst
Compute basic population global statistics
Compute the population expected heterozygosity
Compute the population observed heterozygosity
Estimate Tajima's D for the whole genome
Predict scores of a PCA
Convert a standard matrix to a q_matrix
object
Create a Quality Control report for individuals
Create a Quality Control report for loci
Generate a report of what would happen to each SNP in a merge
Combine two gen_tibbles
Read and structure .Q files or existing matrices as q_matrix
or `gt_...
Objects exported from other packages
Scale constructor using the distruct colours
The select_if
verb for loci
The select
verb for loci
Show the genotypes of a gen_tibble
Show the loci information of a gen_tibble
Show the ploidy information of a gen_tibble
Compute the Pairwise Allele Sharing Matrix for a bigSNP object
Compute the Identity by State Matrix for a bigSNP object
Compute the KING-robust Matrix for a bigSNP object
Print a summary of a merge report
Summary method for gt_admix objects
A theme to match the output of distruct
Tidy a gt_pca
object
Tidy a gt_dapc
object
Tidy a Q matrix
tidypopgen: Tidy Population Genetics
Detect runs of homozygosity using a sliding-window approach
Compute the Population Branch Statistics over a sliding window
Compute pairwise Fst for a sliding window
Compute Tajima's D for a sliding window
Estimate window statistics from per locus estimates
We provide a tidy grammar of population genetics, facilitating the manipulation and analysis of data on biallelic single nucleotide polymorphisms (SNPs). 'tidypopgen' scales to very large genetic datasets by storing genotypes on disk, and performing operations on them in chunks, without ever loading all data in memory. The full functionalities of the package are described in Carter et al. (2025) <doi:10.1101/2025.06.06.658325>.
Useful links