Routines for reading and manipulating GWAS data in .bed files
Author dmbates
5 Stars
Updated Last
10 Months Ago
Started In
June 2018


Routines for reading and manipulating GWAS data in .bed files

Documentation PackageEvaluator Build Status

Data from Genome-wide association studies are often saved as a PLINK binary biallelic genotype table or .bed file. To be useful, such files should be accompanied by a .fam file, containing metadata on the rows of the table, and a .bim file, containing metadata on the columns. The .fam and .bim files are in tab-separated format.

The table contains the observed allelic type at n single-nucleotide polymorphism (SNP) positions for m individuals.

A SNP corresponds to a nucleotide position on the genome where some degree of variation has been observed in a population, with each individual have one of two possible alleles at that position on each of a pair of chromosomes. Three possible types can be observed are: homozygous allele 1, coded as 0x00, heterzygous, coded as 0x10, and homozygous allele 2, coded as 0x11. Missing values are coded as 0x01.

A single column - one SNP position over all m individuals - is packed into an array of div(m + 3, 4) bytes (UInt8 values).


This package requires Julia v0.7.0 or later, which can be obtained from or by building Julia from the sources in the repository.

The package has not yet been registered and must be installed using the repository location. Start julia and use the ] key to switch to the package manager REPL

(v0.7) pkg> add
  Updating git-repo ``
  Updating registry at `~/.julia/registries/Uncurated`
  Updating git-repo ``
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [6f44c9a6] + BEDFiles v0.1.0 #master (
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [6f44c9a6] + BEDFiles v0.1.0 #master (
  [6fe1bfb0] + OffsetArrays v0.6.0
  [10745b16] + Statistics 

Use the backspace key to return to the Julia REPL.

Please see the documentation for usage.