Package: nQuack 1.0.4

nQuack: Predicting Ploidal Level from Sequence Data

Predicts ploidal level from sequence data using site-based heterozygosity and a mixture models approach. See Gaynor et al. (2024) <doi:10.1002/aps3.11606>.

Authors:Michelle L. Gaynor [aut, cre, cph]

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

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

Bug tracker:https://github.com/mgaynor1/nquack/issues

Pkgdown/docs site:https://mlgaynor.com

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

expectation-maximizationploidy-inferenceploidy-levelpolyploidyr-basedrcpprcpparmadilloopenblascppopenmp

7.23 score 19 stars 20 scripts 35 exports 29 dependencies

Last updated from:9281dd1d46. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK223
linux-devel-x86_64OK218
source / vignettesOK351
linux-release-arm64OK212
linux-release-x86_64OK217
macos-release-arm64OK218
macos-release-x86_64OK563
macos-oldrel-arm64OK200
macos-oldrel-x86_64OK319
windows-develOK239
windows-releaseOK206
windows-oldrelOK244
wasm-releaseOK189

Exports:alphabetacalcalphabetacalctaualphabetacalctauvecalphabetacalcvecBcleanbestquackdenoise_dataemstepBemstepB3emstepBBemstepBBUemstepBUemstepNemstepNAemstepNUemstepNUAestepB3muvarcalcvecnQuire_reformatprepare_dataprocess_dataprocess_nquireprocess_rcppquackBetaquackBetaBinomquackitquackNbootsquackNormalquackNormalNQresample_xmsetconvertSetupBasicExamplesim.ind.BBsim.ind.BB.tausim.ind.simple

Dependencies:askpassclicodetoolscurldata.tabledigestdoParallelevdextraDistrforeachfutureglobalsgluehttr2iteratorslifecyclelistenvmagrittropensslparallellyR6RcppRcppArmadilloRcppProgressrlangsystruncdistvctrswithr

Basic Example
Download All Data Files | Data description | Load packages | Data preparation | 01. Prepare data | 02. Process data. | Model inference | Explore all models | Model interpretation | Running only the best model | Bootstrap replicates

Last update: 2026-06-30
Started: 2024-01-31

Data Preparation
Preprocessing | Option 1: Reference genome | Align to a reference genome | Remove repeats | Identify repeat regions | Remove repeats from your alignment | Filter low quality | Option 2: Target-based | Data processing with nQuack | Step 1: Prepare. | Warning: samtools must be local! | Step 2: Process | When should you filter your data? | Coverage filters. | Allele Frequency | Comparing nQuack to nQuire | What about 'denoising'? | Alternative approach - Bclean | Bclean and Denoise

Last update: 2026-06-30
Started: 2024-01-31

FAQ
Can it go faster? | Should I subsample my data? | What about higher ploidal levels? | Can I identify if my sample is an allopolyploid or autopolyploid? | What about RNA-seq? HI-C? or PacBio HIFI?

Last update: 2026-06-30
Started: 2025-10-14

Qploidy2 to nQuack
Introduction to Qploidy2 | Using data from Qploidy2 with nQuack | Predicting individual's ploidal level | Step 1: Modifying input from Qploidy2 to nQuack | Step 2: Model inference | Identify the most accurate model

Last update: 2026-06-30
Started: 2026-05-26

VCF to nQuack
Load Packages | Read in your VCF file | Subset information from the Genotypes | 01. Subset total read depth | 02. Subset reference read depth and alternative read depth | 02A. Subset reference read depth | 02B. Subset alternative read depth | 03. Process for nQuack

Last update: 2025-12-02
Started: 2025-12-02

Faster Example
Part 1: Data preparation | Load packages | Set up parallel | 01. Prepare data | 02. Process data. | Stop cluster | Part 2: Model inference | SLURM Example | 02_Model.R | What if I am not using SLURM? | Wait, this is still slow! | 02_Model_withTimers.R

Last update: 2025-10-14
Started: 2025-10-13

Model Options
Site-based heterozygosity | nQuack | Model types | Additional arguments. | Mixture model implementation. | Implementation | Interpretation

Last update: 2024-05-02
Started: 2024-01-31

Simulate Data
Simple or Idealisitic | Advanced or Realistic

Last update: 2024-02-17
Started: 2024-01-31

Outliers
Simulate Data | Comparing the Log-Likelihood | TLDR

Last update: 2024-02-17
Started: 2024-01-31

Readme and manuals

Help Manual

Help pageTopics
Calculate Alpha and Beta from Mean and Variancealphabetacalc
Calculate Alpha and Beta from Mean, Tau, and Error rate.alphabetacalctau
Vector-based - Calculate Alpha and Beta from Mean, Tau, and Error rate.alphabetacalctauvec
Vector-based - Calculate Alpha and Beta from Mean and Variancealphabetacalcvec
Remove Noise with the Beta DistributionBclean
Model Selection - Expectation Maximization - Optimal Distribution and Typebestquack
Denoise Datadenoise_data
Expectation maximization - Beta DistributionemstepB
Expectation maximization - Beta + Beta + Beta DistributionemstepB3
Expectation maximization - Beta-Binomial DistributionemstepBB
Expectation maximization - Beta-Binomial and Uniform DistributionsemstepBBU
Expectation maximization - Beta and Uniform DistributionsemstepBU
Expectation maximization - Normal DistributionemstepN
Expectation maximization - Normal DistributionemstepNA
Expectation maximization - Normal and Uniform DistributionemstepNU
Expectation maximization - Normal DistributionemstepNUA
E-Step for Expectation Maximization - Beta + Beta + Beta DistributionestepB3
Variance calculation from Mean, Tau, and Sequencing Errormuvarcalcvec
Data Preparation - Use nQuire's DatanQuire_reformat
Prepare Data - Step 1prepare_data
Process Data - Step 2process_data
Use nQuire's Dataprocess_nquire
Data Preparation - Matrix Filteringprocess_rcpp
Model Selection - Expectation Maximization - Beta MixturequackBeta
Model Selection - Expectation Maximization - Beta-Binomial MixturequackBetaBinom
Model Selection - Based on BIC or Log-Likelihoodquackit
Bootstrapping - Expectation Maximization - Optimal Distribution and TypequackNboots
Model Selection - Expectation Maximization - Normal MixturequackNormal
Model Selection - Expectation Maximization - Normal Mixture (nQuire)quackNormalNQ
Calculate Alpha and Beta from Mean and Varianceresample_xm
Calculate Variance from Mean, Tau, and Sequencing Errorsetconvert
Setup Basic ExampleSetupBasicExample
Simulate Allele Counts for Single Individual - Beta-Binomial Distributionsim.ind.BB
Simulate Allele Counts for Single Individual - Beta-Binomial Distribution with Overdispersion and Errorsim.ind.BB.tau
Simulate Allele Counts for Single Individual - Simple Approachsim.ind.simple