Skip to contents

Preparing Data

Prepare your data for ploidal estimation with nQuack.

prepare_data()
Prepare data - Step 1
process_data()
Process data - Step 2
process_nquire()
Use nQuire's Data
denoise_data()
Denoise Data
Bclean()
Remove noise with the beta distribution

Simulating data

Simulate data for a given ploidal level.

sim.ind.BB()
Simulate Allele Counts for Single Individual - Beta-Binomial Distribution
sim.ind.BB.tau()
Simulate Allele Counts for Single Individual - Beta-Binomial Distribution with Overdispersion and Error
sim.ind.simple()
Simulate Allele Counts for Single Individual - Simple Approach

Basic Mixture Models

Wrapper functions to run model selection for diploids, triploids, tetraploids, pentaploids, and hexaploids.

quackNormal()
Model Selection - Expectation Maximization - Normal Mixture
quackNormalNQ()
Model Selection - Expectation Maximization - Normal Mixture (nQuire)
quackBeta()
Model Selection - Expectation Maximization - Beta Mixture
quackBetaBinom()
Model Selection - Expectation Maximization - Beta-Binomial Mixture

More on Mixture Models

Wrapper functions for model selection, running specific sets of mixture models, and bootstrap replication.

quackit()
Model Selection - Based on BIC or Log-Likelihood
bestquack()
Model Selection - Expectation Maximization - Choose your distribution and type
quackNboots()
Bootstrapping - Expectation Maximization - Choose your distribution and type

Expectation Maximization Base Functions

Functions used within our mixture models

emstepN()
Expectation maximization - Normal Distribution
emstepNU()
Expectation maximization - Normal and Uniform Distribution
emstepNA()
Expectation maximization - Normal Distribution
emstepNUA()
Expectation maximization - Normal Distribution
emstepB()
Expectation maximization - Beta Distribution
emstepBU()
Expectation maximization - Beta and Uniform Distributions
emstepBB()
Expectation maximization - Beta-Binomial Distribution
emstepBBU()
Expectation maximization - Beta-Binomial and Uniform Distributions
estepB3()
E-Step for Expectation Maximization - Beta + Beta + Beta Distribution
emstepB3()
Expectation maximization - Beta + Beta + Beta Distribution

Helper functions

Everything else.

alphabetacalc()
Calculate Alpha and Beta from Mean and Variance
alphabetacalctau()
Calculate Alpha and Beta from Mean, Tau, and Error rate.
alphabetacalcvec()
Vector-based - Calculate Alpha and Beta from Mean and Variance
alphabetacalctauvec()
Vector-based - Calculate Alpha and Beta from Mean, Tau, and Error rate.
muvarcalcvec()
Variance calculation from Mean, Tau, and Sequencing Error
process_rcpp()
Data Preparation - Matrix Filtering
nQuire_reformat()
Data Preparation - Use nQuire's Data
setconvert()
Calculate Variance from Mean, Tau, and Sequencing Error
resample_xm()
Calculate Alpha and Beta from Mean and Variance