rubias0.3.4 package

Bayesian Inference from the Conditional Genetic Stock Identification Model

a_freq_list

Convert data frame of allele frequencies to nested lists

allelic_list

Create genotype lists for each locus

assess_pb_bias_correction

Test the effects of the parametric bootstrap bias correction on a refe...

assess_reference_loo

Simulate mixtures and estimate reporting group and collection proporti...

assess_reference_mc

Partition a reference dataset and estimate reporting group and collect...

avg_coll2correctRU

Get the average within-RU assignment rate for each collection

bootstrap_rho

Perform a parametric bootstrapping correction on an estimated rho vect...

check_known_collections

check a baseline and mixture file together to ensure the known_collect...

check_refmix

A helper function to check that the input data frame is OK

close_matching_samples

check for matching (or close to matching) genotypes in a data frame

count_missing_data

for each individual count the number or loci missing and non_missing

custom_pi_prior

Create a vector of pi Dirichlet priors with specified values for one o...

dirch_from_allocations

Given a vector of different categories in 1...n and a prior, simulate ...

dirch_from_counts

Given a vector of counts for different categories in 1...n and a prior...

geno_logL

Calculate a matrix of genotype log-likelihoods for a genetic dataset

geno_logL_ssq

Calculate a matrix of sum-of-squares of genotype log-likelihoods for a...

get_ploidy_from_frame

infer the ploidy from the pattern of NAs in the columns of data

gprob_sim_gc

Simulate genotype log-likelihoods from a population by gene copy

gprob_sim_gc_missing

Simulate genotypes by gene copy, with missing data from chosen individ...

gprob_sim_ind

Simulate genotype log-likelihoods from a population by individual

gsi_em_1

EM algorithm from the simplest GSI model for pi and the individual pos...

gsi_mcmc_1

MCMC from the simplest GSI model for pi and the individual posterior p...

gsi_mcmc_fb

MCMC from the fully Bayesian GSI model for pi and the individual poste...

Hasselman_sim_colls

Generate a random population structure and mixture sample, as in Hasse...

infer_mixture

Estimate mixing proportions and origin probabilities from one or sever...

list_diploid_params

Collect essential data values before mixture proportion estimation

mixture_draw

Separate a chosen proportion of a reference dataset into a mixture wit...

modify_scaled_likelihoods_for_known_mixture_fish

for individuals of known origin in the mixture, put all their weight o...

per_locus_means_and_vars

Compute the mean and variance of the single-locus genotype likelihoods...

pipe

Pipe operator

rcpp_close_matchers

Find all pairs that have close matches

rcpp_indiv_specific_logl_means_and_vars

From the pattern of missing data at each individual, compute the expec...

rcpp_per_locus_logls

Return a matrix of locus-specific self-assignment logls

read_gsi_sim

read a gsi_sim formatted input file into a tibble that rubias can use

ref_and_mix_pipeline

Estimate mixing proportions from reference and mixture datasets

reference_allele_counts

Tabulate occurrences of all observed alleles in reference genetic data

round2

Round a given number, with 5 always rounded up

rubias

rubias: Bayesian inference from the conditional genetic stock identifi...

samp_from_mat

Sample 1 observation from cell probabilities that are columns of a mat...

self_assign

Do leave-one-out self-assignment of individuals in a reference baselin...

simulate_random_samples

Generate a samples for a mixture.

tcf2long

Convert Two-Column Genetic Data to Long Format

tcf2param_list

Generate MCMC parameter list from two-column genetic data & print summ...

tidy_mcmc_coll_rep_stuff

A helper function to tidy up the output from the gsi_mcmc functions

tidy_mcmc_pofz

A helper function to tidy up the PofZ-like output from the gsi_mcmc fu...

tidy_pi_traces

a helper function to tidy up the pi-traces that come out of the mcmc f...

write_gsi_sim_mixture

Write a mixture data frame to gsi_sim format baseline and repunits fil...

write_gsi_sim_reference

Write a reference data frame to gsi_sim format baseline and repunits f...

Implements Bayesian inference for the conditional genetic stock identification model. It allows inference of mixed fisheries and also simulation of mixtures to predict accuracy. A full description of the underlying methods is available in a recently published article in the Canadian Journal of Fisheries and Aquatic Sciences: <doi:10.1139/cjfas-2018-0016>.

  • Maintainer: Eric C. Anderson
  • License: CC0
  • Last published: 2024-01-24