Package: bnpsd 1.3.14.9000

Alejandro Ochoa

bnpsd: Simulate Genotypes from the BN-PSD Admixture Model

The Pritchard-Stephens-Donnelly (PSD) admixture model has k intermediate subpopulations from which n individuals draw their alleles dictated by their individual-specific admixture proportions. The BN-PSD model additionally imposes the Balding-Nichols (BN) allele frequency model to the intermediate populations, which therefore evolved independently from a common ancestral population T with subpopulation-specific FST (Wright's fixation index) parameters. The BN-PSD model can be used to yield complex population structures. This simulation approach is now extended to subpopulations related by a tree. Method described in Ochoa and Storey (2021) <doi:10.1371/journal.pgen.1009241>.

Authors:Alejandro Ochoa [aut, cre], John D. Storey [aut]

bnpsd_1.3.14.9000.tar.gz
bnpsd_1.3.14.9000.zip(r-4.7)bnpsd_1.3.14.9000.zip(r-4.6)bnpsd_1.3.14.9000.zip(r-4.5)
bnpsd_1.3.14.9000.tgz(r-4.6-any)bnpsd_1.3.14.9000.tgz(r-4.5-any)
bnpsd_1.3.14.9000.tar.gz(r-4.7-any)bnpsd_1.3.14.9000.tar.gz(r-4.6-any)
bnpsd_1.3.14.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
bnpsd/json (API)
NEWS

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

Bug tracker:https://github.com/storeylab/bnpsd/issues

On CRAN:

Conda:

5.52 score 8 stars 41 scripts 310 downloads 2 mentions 21 exports 6 dependencies

Last updated from:c101b07810. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK131
source / vignettesOK174
linux-release-x86_64OK126
macos-release-arm64OK191
macos-oldrel-arm64OK360
windows-develOK92
windows-releaseOK85
windows-oldrelOK75
wasm-releaseOK127

Exports:admix_prop_1d_circularadmix_prop_1d_linearadmix_prop_indep_subpopscoanc_admixcoanc_to_kinshipcoanc_treedraw_all_admixdraw_all_unstructureddraw_genotypes_admixdraw_p_ancdraw_p_subpopsdraw_p_subpops_treefit_treefixed_locifst_admixmake_p_ind_admixscale_treetree_additivetree_reindex_tipstree_reorderundiff_af

Dependencies:apedigestlatticenlmennlsRcpp

Simulate Admixed Populations with bnpsd

Rendered frombnpsd.Rmdusingknitr::rmarkdownon May 19 2026.

Last update: 2021-08-02
Started: 2017-08-13

Readme and manuals

Help Manual

Help pageTopics
Construct admixture proportion matrix for circular 1D geographyadmix_prop_1d_circular
Construct admixture proportion matrix for 1D geographyadmix_prop_1d_linear
Construct admixture proportion matrix for independent subpopulationsadmix_prop_indep_subpops
A package for modeling and simulating an admixed populationbnpsd-package bnpsd
Construct the coancestry matrix of an admixture modelcoanc_admix
Transform coancestry matrix to kinship matrixcoanc_to_kinship
Calculate coancestry matrix corresponding to a treecoanc_tree
Simulate random allele frequencies and genotypes from the BN-PSD admixture modeldraw_all_admix
Simulate random allele frequencies and genotypes from the unstructured modeldraw_all_unstructured
Draw genotypes from the admixture modeldraw_genotypes_admix
Draw random Uniform or Beta ancestral allele frequenciesdraw_p_anc
Draw allele frequencies for independent subpopulationsdraw_p_subpops
Draw allele frequencies for subpopulations related by a treedraw_p_subpops_tree
Fit a tree structure to a coancestry matrixfit_tree
Identify fixed locifixed_loci
Calculate FST for the admixed individualsfst_admix
Construct individual-specific allele frequency matrix under the PSD admixture modelmake_p_ind_admix
Scale a coancestry treescale_tree
Calculate additive edges for a coancestry tree, or viceversatree_additive
Reindex tree tips in order of appearance in edgestree_reindex_tips
Reorder tree tips to best match a desired ordertree_reorder
Undifferentiate an allele distributionundiff_af