| Title: | A Shiny Application for Allele Binning in Microsatellite Markers |
|---|---|
| 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. |
| Authors: | VP Prasanth [aut, cre], Subhash Chandra [aut], DA Hoisington [aut], B Jayashree [aut] |
| Maintainer: | VP Prasanth <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0.0 |
| Built: | 2026-10-11 10:24:36 UTC |
| Source: | https://github.com/vpprasanth/allelobin |
This function bins observed SSR allele sizes into discrete allele classes using repeat length information (Idury & Cardon, 1997).
allele_binning(data, repeat_lengths, ploidy = 2, progress = FALSE)allele_binning(data, repeat_lengths, ploidy = 2, progress = FALSE)
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 |
A list of results per marker: min/max allele, bins, frequencies
Launches the Shiny application for allele binning.
AlleloBin()AlleloBin()
No return value, launches 'Shiny' app
Example SSR allele dataset ('data.txt') and repeat length file ('info.txt') included with the package.
References Idury, R.M. & Cardon, L.R. (1997). A Simple Method for Automated Allele Binning in Microsatellite Markers. Genome Research, 11:1104–1109.
A data.frame with example SSR allele data
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)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)
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.
save_results(results, file)save_results(results, file)
results |
List of marker results from allele_binning() |
file |
Output Excel file path |
None (writes Excel file to disk)
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"))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"))