Skip to contents

tidypopgen 1.1.0

New features and changes

  • new gt_merge_vcfs() and gt_concat_vcfs() read several VCF files into a single gen_tibble, as bcftools merge and bcftools concat
  • integer chromosomes (chromosomes_as_int) for datasets with many chromosomes; the original names of integer loci and chromosomes are kept in sidecar files (gt_lookup_loci(), gt_restore_loci() and gt_lookup_chromosomes()), which gt_get_file_names() and gt_save() list
  • phased genotypes (experimental): gen_tibble(phased = TRUE) reads phased VCF files; is_phased() and show_haplotypes() give the phase, gt_as_vcf() writes it, and rbind() keeps it
  • pairwise_ibs(missing_correction = "allele_freq") corrects for missing genotypes as PLINK 1.9’s --distance without flat-missing
  • qc_report_loci(hwe = FALSE) gives the MAF and missingness of loci in a single pass
  • faster VCF reading (in parallel with n_cores), and faster reading of .ped files straight into the backing file
  • faster gt_as_vcf(), gt_update_backingfile() and gt_order_loci() with many chromosomes; gt_as_genlight() works in chunks of loci
  • faster select_loci() with variables and function calls; .engine = "tidyselect" always uses tidyselect
  • gen_tibble() and gt_save() save the .gt file twice as fast
  • gt_impute_simple() works after removing loci (but not individuals)
  • new article on large RAD-seq datasets; the big data article uses gt_merge_vcfs()
  • new bootstrap_blocks(), for developers (not in the reference index): the blocks of loci of the block bootstrap and the blocks drawn by each replicate, so that other packages can resample the same blocks as the bootstrap functions of tidypopgen
  • new pairwise_dist(): genetic distances between individuals, as ngsDist, with the genotype or nucleotide score, corrected for saturation (-log(1 - d) by default, Jukes-Cantor, or none), e.g. to build neighbour-joining trees; an S3 generic, so that other packages (e.g. for genotype likelihoods) can add methods
  • pairwise_king(), pairwise_ibs(), pairwise_allele_sharing() (with methods for gen_tibble objects and their genotypes column) and windows_indiv_roh() (with a method for gen_tibble objects) are now S3 generics, and the generic indiv_inbreeding() only has the arguments .x and ... (its method for gen_tibble objects is a gen_tbl method), so that other packages can provide methods for their own objects, with their own arguments. windows_indiv_roh() now also works on gen_tibble objects that lost their class (e.g. with as_tibble()), as the other generics do

Bug fixes

  • functions using temporary backing files (PCA, LD clumping, KING, IBS and allele sharing) delete them, fixing occasional “File ‘…bk’ already exists” errors
  • windows_indiv_roh() and the gt_roh_*() functions give chromosome names with chromosomes_as_int
  • gen_tibble() on .ped files: a third allele always flags the locus as multi-allelic
  • gen_tibble() with the “cpp” parser: fix malformed VCF files read as wrong genotypes (now an error), missing chromosomes (now NA), and backing files left behind on errors
  • gt_as_vcf(): fix loci with missing chromosomes (now written as “.”)

tidypopgen 1.0.0

CRAN release: 2026-11-07

New features and changes

  • optimisations to work on whole genomes, both speed and memory
  • new functions to compute site frequency spectra (SFS) for demographic inference: pop_sfs(),pairwise_pop_sfs() and nwise_pop_sfs()
  • native windows_indiv_roh() matching the algorithm used by PLINK 1.9 (--homozyg); the old version, based on detectRUNS, is deprecated as gt_roh_window()
  • gt_roh_froh(), gt_roh_loci() and gt_roh_islands() summarise runs of homozygosity (F_ROH, loci in runs, and ROH islands)
  • jackknife_* functions for genome-wide statistics with block jackknife standard errors
  • pop_tajimas_d() and related functions handle missing genotypes as pixy, and work with polyploid and pseudohaploid data
  • autoplot() method for the distance matrices of pairwise_* functions
  • option to use integer loci names (names_as_int) for large datasets, when reading VCF and PLINK bed files
  • polyploid support in indiv_het_obs(), pop_het_obs(), loci_pi() and gt_as_genind(); clear errors where polyploids are not supported
  • pairwise_ibs(type = "adjusted_counts") now returns PLINK’s allele count distance (--distance flat-missing)
  • pairwise_* functions use imputed genotypes when set with gt_set_imputed(), and use several cores by default
  • gen_tibble() on ped files stores individual information in the same columns as for bed files (see ?gen_tibble)
  • gen_tibble() copies the backing file of bigSNP objects (never modifying them), and works on read-only files
  • rbind(use_position = TRUE) keeps the loci names of the reference, and needs much less memory; integer names are matched by position
  • the as_is argument of rbind() is deprecated (it was never implemented)
  • cbind() renames duplicated columns as dplyr::bind_cols(); id and genotypes can not be added
  • distruct_colours holds the 56 distinct distruct colours, recycled with a warning by scale_fill_distruct()
  • gt_as_genlight() keeps alleles, chromosomes and positions, so that gt_from_genlight() can convert back
  • classes are preserved by all dplyr verbs; grouped functions keep the order of factor levels, and work with several grouping variables and empty groups
  • heatmap_add_dendro() returns a gtable, which can be combined with patchwork
  • augment_loci() works on gt_pca_autoSVD() results
  • gt_admixture() uses ADMIXTURE on the PATH when conda is not installed
  • faster “cpp” VCF parser, and select_loci_if() no longer loads all the genotypes
  • informative errors for invalid inputs to gen_tibble(), show_loci<-, gt_order_loci(), gt_pcadapt(), gt_dapc(), pop_fst() and others

Bug fixes

tidypopgen 0.4.4

CRAN release: 2026-05-19

  • fix seed argument of gt_admixture()
  • implement our own upset plot function to avoid dependency on UpSetR package, which is no longer maintained
  • fix reading of VCFs when genotype separator symbol is present in the sample information
  • fix loci_ functions output when calculating across groups for a single loci
  • fix gt_update_backingfile() to preserve imputation metadata when backing files are updated
  • add validation in gt_impute_simple() to detect and report SNP dimension mismatches caused by excluded SNPs
  • add outdir argument in gt_admixture() to store partial outputs for large jobs
  • fix gt_admixture() output file names when n_runs > 1

tidypopgen 0.4.3

CRAN release: 2026-01-23

  • fix occasional test failure when temporary file names contained certain patterns

tidypopgen 0.4.2

CRAN release: 2026-01-22

  • allow least squares projection of multiple components at once in gt_project_pca()

tidypopgen 0.4.1

CRAN release: 2025-12-20

tidypopgen 0.4.0

CRAN release: 2025-10-24

  • store chromosomes as factors, and remove redundant column storing chromosome as integer

tidypopgen 0.3.3

  • only use the FBM backend (rather than a complete bigsnpr object)
  • fix a few minor bugs

tidypopgen 0.3.2

CRAN release: 2025-08-27

  • tidy up for CRAN submission

tidypopgen 0.3.0

tidypopgen 0.2.0

  • Lots of optimisations to speed up processing of large datasets.
  • Added an sf backend to tidypopgen for spatial data.
  • Windowed statistics.

tidypopgen 0.1.0

  • Initial public version of tidypopgen released on r-universe.