Package {AlleloBin}


Type: Package
Title: A Shiny Application for Allele Binning in Microsatellite Markers
Version: 1.0.0
Description: Provides allele binning functionality for SSR/microsatellite markers using least-squares minimization (Idury & Cardon (1997) <doi:10.1101/gr.7.11.1104>). Includes a 'Shiny' application for interactive use, summary statistics, and visualization.
License: GPL-3
Encoding: UTF-8
Imports: shiny, readxl, stats, utils, openxlsx
Suggests: testthat (≥ 3.0.0), roxygen2
Config/roxygen2/version: 8.0.0
Config/testthat/edition: 3
URL: https://github.com/vpprasanth/AlleloBin
BugReports: https://github.com/vpprasanth/AlleloBin/issues
NeedsCompilation: no
Packaged: 2026-08-29 08:07:51 UTC; vppra
Author: VP Prasanth [aut, cre], Subhash Chandra [aut], DA Hoisington [aut], B Jayashree [aut]
Maintainer: VP Prasanth <prasanth.stat@gmail.com>
Repository: CRAN
Date/Publication: 2026-09-10 09:10:02 UTC

Run AlleloBin Shiny App

Description

Launches the Shiny application for allele binning.

Usage

AlleloBin()

Value

No return value, launches 'Shiny' app


Allele Binning Function

Description

This function bins observed SSR allele sizes into discrete allele classes using repeat length information (Idury & Cardon, 1997).

Usage

allele_binning(data, repeat_lengths, ploidy = 2, progress = FALSE)

Arguments

data

A data.frame with columns: Marker, Genotype, Allele1...AlleleN

repeat_lengths

A numeric vector of repeat lengths (same order as markers)

ploidy

Integer, number of alleles per genotype (default = 2)

progress

Logical, whether to update a Shiny progress bar

Value

A list of results per marker: min/max allele, bins, frequencies


Example Data

Description

Example SSR allele dataset ('data.txt') and repeat length file ('info.txt') included with the package.

Details

References Idury, R.M. & Cardon, L.R. (1997). A Simple Method for Automated Allele Binning in Microsatellite Markers. Genome Research, 11:1104–1109.

Value

A data.frame with example SSR allele data

Examples

datafile <- system.file("extdata", "data.txt", package = "AlleloBin")
infofile <- system.file("extdata", "repeat_length.txt", package = "AlleloBin")
data <- read.table(datafile, header = FALSE)
info <- read.table(infofile, header = FALSE)
repeat_lens <- as.numeric(info[[1]])
allele_binning(data, repeat_lens, ploidy = 2)


Save AlleloBin results to Excel

Description

Utility function to export allele binning results into an Excel workbook. Each marker gets its own worksheet containing bin summary, allele calls, and marker summary with strict decimal formatting.

Usage

save_results(results, file)

Arguments

results

List of marker results from allele_binning()

file

Output Excel file path

Value

None (writes Excel file to disk)

Examples


xlsx_file <- system.file("extdata", "data.xlsx", package = "AlleloBin")
repeat_file <- system.file("extdata", "repeat_length.xlsx", package = "AlleloBin")

data_xlsx <- openxlsx::read.xlsx(xlsx_file)

# Ensure repeat_length is numeric vector, not data frame
repeat_length <- as.numeric(openxlsx::read.xlsx(repeat_file)[[1]])

results <- allele_binning(data_xlsx, repeat_length, ploidy = 2)
save_results(results, file.path(tempdir(), "AlleloBin_Output.xlsx"))