'ALS-Binary': Allele Size to Binary Converter

Converts microsatellite allele sizes into binary matrices and provides a 'Shiny' interface.


ALS-Binary: A Shiny Application for Allele Size Conversion

ALS-Binary is a Shiny application designed to convert microsatellite allele size data into standardized outputs for genetic analysis.
It supports multiple file formats (.csv, .txt, .xlsx), handles both headered and headerless data, and produces Excel outputs with each marker on a separate sheet.
The tool provides a reproducible and user-friendly workflow for researchers working with SSR/microsatellite data.


๐Ÿ‘ฅ Authors

  • Prasanth VP โ€“ PhD Scholar in Statistics at CUSAT, Associate Director of Biostatistics at IQVIA
  • Dr. Subhash Chandra โ€“ Applied Statistician with 50+ years of experience in teaching, training, consulting, and leadership across academic and research environments worldwide

๐Ÿ“ง Contact: [email protected]
๐Ÿ”— Google Scholar โ€“ Prasanth VP
๐Ÿ”— Google Scholar โ€“ Subhash Chandra


โœจ Key Features

  • Flexible Input: Accepts .csv, .txt, and .xlsx formats with or without headers
  • Repeat Length Integration: Reads repeat length files for accurate allele binning
  • Interactive Previews: Displays raw data, repeat length information, binary outputs, and STRUCTURE outputs in separate tabs
  • Automated Conversion: Converts allele sizes into binary matrices and positional indices with progress tracking
  • Export Results: Downloads outputs into a single Excel file, each marker on a separate sheet
  • Help Documentation: Built-in help.md for detailed rationale and usage notes

๐Ÿ“– Rationale

Microsatellite markers (SSRs) are represented by allele sizes in base pairs.
Raw sizes are not directly comparable across datasets, so ALSโ€‘Binary standardizes them into two complementary outputs:

  • Binary Output: Presence/absence matrices (1/0) for each allele size, suitable for statistical analyses (e.g., PCA, AMOVA, clustering).
  • STRUCTURE Output: Positional indices of alleles relative to the sorted list per marker, required by population genetics software like STRUCTURE.
  • Missing Data: Input alleles coded as 0 are converted to ? in binary output and -9 in STRUCTURE output.

By generating both outputs simultaneously, ALSโ€‘Binary ensures compatibility with diverse downstream analyses while maintaining reproducibility.


๐Ÿ› ๏ธ Installation

# Install devtools if you haven't already
if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}

# Install ALS-Binary
devtools::install_github("vpprasanth/ALS_Binary")

๐Ÿš€ Quick Start

library(ALSBinary)

# Text file
# 1. Load raw allele size data (tab-delimited, no header)
my_data <- read.delim(system.file("extdata", "data.txt", package = "ALSBinary"), header = FALSE)
# Assign expected column names
colnames(my_data) <- c("Marker", "Genotype", "Allele_1", "Allele_2")
# 2. Load repeat length file (tab-delimited, no header)
repeat_info <- read.delim(system.file("extdata", "repeat_length.txt", package = "ALSBinary"), header = FALSE)
# Assign expected column names
colnames(repeat_info) <- c("RepeatLength")
# 3. Run the binary conversion
results <- allele_to_binary(my_data, repeat_info)


# Excel input
# 1. Load your raw allele size data
my_data <- readxl::read_excel(system.file("extdata", "data.xlsx", package = "ALSBinary"))
# 2. Load the corresponding repeat length file
repeat_info <- readxl::read_excel(system.file("extdata", "repeat_length.xlsx", package = "ALSBinary"))
# 3. Run the binary conversion
results <- allele_to_binary(my_data, repeat_info)

๐Ÿ“š Documentation

Full usage notes, rationale, and examples are available in help.md.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ALSBinary")

1.0.0 by Prasanth VP, 2 months ago


Browse source code at https://github.com/cran/ALSBinary


Authors: Prasanth VP [aut, cre] , Subhash Chandra [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports shiny, readr, readxl, DT

Suggests testthat


See at CRAN