Accessing and Processing a 'Mega2' Genetic Database

Uses as input genetic data that have been reformatted and stored in a 'SQLite' database; this database is initially created by the standalone 'mega2' C++ program (available freely from <>). Loads and manipulates data frames containing genotype, phenotype, and family information from the input 'SQLite' database, and decompresses needed subsets of the genotype data, on the fly, in a memory efficient manner. We have also created several more functions that illustrate how to use the data frames as well as perform useful tasks: these permit one to run the 'pedgene' package to carry out gene-based association tests on family data using selected marker subsets, to run the 'SKAT' package to carry out gene-based association tests using selected marker subsets, to output the 'Mega2R' data as a VCF file and related files (for phenotype and family data), and to convert the data frames into CoreArray Genomic Data Structure (GDS) format.


Version 1.0.4 (2018-06-18)

-- Improvements to use compressed data created by Mega2 version 5.0.0 or higher.

Version 1.0.3 (2018-05-22)

-- Removed strict dependency on GenABEL because GenABEL has been archived.

Version 1.0.2 (2018-04-03)

  • Bug fix: The init_pedgene function now sets up the trait and pedigree structure correctly.

Version 1.0.0 (2017-08-22)

  • Initial CRAN release

Reference manual

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


1.0.4 by Daniel E. Weeks, 7 months ago

Report a bug at!forum/mega2-users

Browse source code at

Authors: Robert V. Baron [aut] , Daniel E. Weeks [aut, cre] , University of Pittsburgh [cph]

Documentation:   PDF Manual  

GPL-2 license

Imports AnnotationDbi, DBI, GenomeInfoDb, RSQLite, methods

Depends on SKAT, pedgene, gdsfmt

Suggests knitr, rmarkdown, formatR, TxDb.Hsapiens.UCSC.hg19.knownGene,

Linking to Rcpp

See at CRAN