Routines for reading and manipulating GWAS data in .bed files
Data from Genome-wide association studies
are often saved as a PLINK binary biallelic genotype table
To be useful, such files should be accompanied by a
.fam file, containing metadata on the rows of the table, and a
containing metadata on the columns.
.bim files are in tab-separated format.
The table contains the observed allelic type at
single-nucleotide polymorphism (SNP) positions
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
Missing values are coded as
A single column - one SNP position over all
m individuals - is packed into an
div(m + 3, 4) bytes (
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 https://github.com/dmbates/BEDFiles.jl.git#master Updating git-repo `https://github.com/dmbates/BEDFiles.jl.git` Updating registry at `~/.julia/registries/Uncurated` Updating git-repo `https://github.com/JuliaRegistries/Uncurated.git` Resolving package versions... Updating `~/.julia/environments/v0.7/Project.toml` [6f44c9a6] + BEDFiles v0.1.0 #master (https://github.com/dmbates/BEDFiles.jl.git) Updating `~/.julia/environments/v0.7/Manifest.toml` [6f44c9a6] + BEDFiles v0.1.0 #master (https://github.com/dmbates/BEDFiles.jl.git) [6fe1bfb0] + OffsetArrays v0.6.0 [10745b16] + Statistics
Use the backspace key to return to the Julia REPL.