Package: segtest 2.0.2

segtest: Tests for Segregation Distortion in Polyploids

Provides tests for segregation distortion in F1 polyploid populations under different assumptions of meiosis. These tests can account for double reduction, partial preferential pairing, and genotype uncertainty through the use of genotype likelihoods. Parallelization support is provided. Details of these methods are described in Gerard et al. (2025a) <doi:10.1007/s00122-025-04816-z> and Gerard et al. (2025b) <doi:10.1093/g3journal/jkaf212>. Part of this material is based upon work supported by the National Science Foundation under Grant No. 2132247. The opinions, findings, and conclusions or recommendations expressed are those of the author and do not necessarily reflect the views of the National Science Foundation.

Authors:David Gerard [aut, cre], Mira Thakkar [aut], Guilherme da Silva Pereira [ctb], NSF DBI 2132247 [fnd]

segtest_2.0.2.tar.gz
segtest_2.0.2.zip(r-4.7)segtest_2.0.2.zip(r-4.6)segtest_2.0.2.zip(r-4.5)
segtest_2.0.2.tgz(r-4.6-x86_64)segtest_2.0.2.tgz(r-4.6-arm64)segtest_2.0.2.tgz(r-4.5-x86_64)segtest_2.0.2.tgz(r-4.5-arm64)
segtest_2.0.2.tar.gz(r-4.7-arm64)segtest_2.0.2.tar.gz(r-4.7-x86_64)segtest_2.0.2.tar.gz(r-4.6-arm64)segtest_2.0.2.tar.gz(r-4.6-x86_64)
segtest_2.0.2.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
segtest/json (API)

# Install 'segtest' in R:
install.packages('segtest', repos = c('https://dcgerard.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/dcgerard/segtest/issues

Pkgdown/docs site:https://dcgerard.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • seg - Disomic and polysomic segregation patterns
  • ufit - Genotype data from Cappai et al.
  • ufit2 - Genotype data from Cappai et al.
  • ufit3 - Genotype data from Cappai et al.

On CRAN:

Conda:

cpp

5.43 score 2 stars 18 scripts 127 downloads 36 exports 40 dependencies

Last updated from:42f1978b83. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK196
linux-devel-x86_64OK215
source / vignettesOK265
linux-release-arm64OK210
linux-release-x86_64OK201
macos-release-arm64OK200
macos-release-x86_64OK283
macos-oldrel-arm64OK131
macos-oldrel-x86_64OK558
windows-develOK168
windows-releaseOK201
windows-oldrelOK129
wasm-releaseOK143

Exports:beta_boundschisq_gchisq_g4chisq_glchisq_gl4drboundsem_ligamfreqgcount_to_gvecgf_freqgvec_to_gcountis_valid_2like_gknown_2like_gknown_3like_glpknown_2like_glpknown_3llike_lilrt_men_g4lrt_men_gl4multi_lrtmultidog_to_gn_pp_mixoffspring_genooffspring_gf_2offspring_gf_3otest_gpo_glpolymapr_testpvec_tet_2pvec_tet_3seg_lrtseg_multisimf1gsimf1glsimglthree_to_two

Dependencies:assertthatclicodetoolscpp11digestdoFuturedoRNGfarverforeachfuturefuture.applyggplot2globalsgluegtableisobanditeratorslabelinglifecyclelistenvmagrittrminqanloptrparallellyplyrR6RColorBrewerRcppRcppArmadilloreshape2rlangrngtoolsS7scalesstringistringrupdogvctrsviridisLitewithr

Introduction to segtest Version 1.0
Offspring genotype frequencies | When the null is true | When the alternative is true | References

Last update: 2025-09-23
Started: 2025-06-18

Introduction to segtest Version 2.0
Gamete genotype frequencies | Simulating data | Testing for segregation distortion | References

Last update: 2025-09-23
Started: 2025-06-18

Parallel Testing
Introduction | Analysis | multi_lrt() | References

Last update: 2025-09-23
Started: 2024-10-03

Readme and manuals

Help Manual

Help pageTopics
Bounds on the distortion at simplex loci caused by double reduction.beta_bounds
Chi Square test when genotypes are knownchisq_g chisq_g4
Chi-Sq for GLchisq_gl chisq_gl4
Upper bounds on double reduction rates.drbounds
EM algorithm from Li (2011)em_li
Gamete frequencies under a generalized modelgamfreq
Converts genotype counts to genotype vectors.gcount_to_gvec
Genotype frequencies of an F1 population under a generalized model.gf_freq
Inverse function of 'gcount_to_gvec()'.gvec_to_gcount
Tests if the two parameter model is validis_valid_2
Iterator over arrayiter.array
Likelihood under three parameter model when genotypes are knownlike_gknown_2
Likelihood under three parameter model when genotypes are knownlike_gknown_3
Likelihood under three parameter model when using offspring genotypes likelihoods but parent genotypes are known.like_glpknown_2
Likelihood under three parameter model when using offspring genotypes likelihoods but parent genotypes are known.like_glpknown_3
Objective function for 'em_li()'llike_li
Likelihood ratio test for segregation distortion with known genotypeslrt_men_g4
Likelihood ratio test using genotype likelihoods.lrt_men_gl4
Parallelized likelihood ratio test for segregation distortion.multi_lrt
Converts multidog output to a format usable for seg_multi() and multi_lrt()multidog_to_g
Number of mixture componentsn_pp_mix
Next element in an arraynextElem.arrayiter
Simulates genotypes given genotype frequencies.offspring_geno
Calculates offspring genotype frequencies under the two-parameter model.offspring_gf_2
Calculates offspring genotype frequencies under the three-parameter model.offspring_gf_3
Jointly tests for segregation distortion and number of incompatible genotypesotest_g
Generate genotype likelihoods from offspring genotypes.po_gl
Run segregation distortion tests as implemented in the polymapR package.polymapr_test
Tetraploid gamete frequencies of gametes when one parent's genotype is knownpvec_tet_2
Tetraploid gamete frequencies of gametes when one parent's genotype is knownpvec_tet_3
Disomic and polysomic segregation patternsseg
Test for segregation distortion in a polyploid F1 population.seg_lrt
Parallelized likelihood ratio test for segregation distortion for arbitrary (even) ploidies.seg_multi
Simulate genotype counts from F1 individualssimf1g
Simulate genotype likelihoods of F1 individuals.simf1gl
Simulate genotype (log) likelihoods from genotype countssimgl
Convert from three parameters to two parametersthree_to_two
Genotype data from Cappai et al. (2020)ufit ufit2 ufit3