GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - QuantGen/BEDMatrix: A matrix-like wrapper around PLINK .bed files

BranchesTags
Open more actions menu

Latest commit

 

History

434 Commits
434 Commits

Folders and files

NameName
Last commit message
Last commit date
R
R
 
 
inst
inst
 
 
man
man
 
 
src
src
 
 
tests
tests
 
 
.Rbuildignore
.Rbuildignore
 
 
DESCRIPTION
DESCRIPTION
 
 
LICENSE
LICENSE
 
 
NAMESPACE
NAMESPACE
 
 
NEWS.md
NEWS.md
 
 
README.md
README.md
 
 

Repository files navigation

BEDMatrix

CRAN status

BEDMatrix is an R package that provides a matrix-like wrapper around .bed, one of the genotype/phenotype file formats of PLINK, the whole genome association analysis toolset. BEDMatrix objects are created in R by simply providing the path to a .bed file and once created, they behave similarly to regular matrices with the advantage that genotypes are retrieved on demand without loading the entire file into memory. This allows handling of very large files with limited use of memory.

This package is deliberately kept simple. For computational methods that use BEDMatrix check out the BGData package.

Example

This example uses a dummy .bed file that is bundled with this R package. It was generated using plink --dummy 500 1000 0.02 acgt --seed 4711 --out example with PLINK 1.90 beta 3.452.

To get the path to the example .bed file (system.file finds the full file names of files in packages and is only used to find the example data):

path <- system.file("extdata", "example.bed", package = "BEDMatrix")

To wrap the example .bed file in a BEDMatrix object:

m <- BEDMatrix(path)
#> Extracting number of samples and rownames from example.fam...
#> Extracting number of variants and colnames from example.bim...

To get the dimensions of the BEDMatrix object:

dim(m)
#> [1] 50 1000

To extract a subset of the BEDMatrix object:

m[1:3, 1:5]
#>           snp0_A snp1_C snp2_G snp3_G snp4_G
#> per0_per0      0      1      1      1      0
#> per1_per1      1      1      1      1     NA
#> per2_per2      1      0      0      2      0

Installation

Install the stable version from CRAN:

install.packages("BEDMatrix")

Alternatively, install the development version from GitHub:

# install.packages("remotes")
remotes::install_github("QuantGen/BEDMatrix")

Documentation

Further documentation can be found on RDocumentation.

Contributing

  • Issue Tracker: https://github.com/QuantGen/BEDMatrix/issues
  • Source Code: https://github.com/QuantGen/BEDMatrix

About

A matrix-like wrapper around PLINK .bed files

Topics

bedcrangeneticsgenomicsplinkplink2rr-pkg

Resources

Readme
License
Activity
Custom properties

Stars

18 stars

Watchers

4 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.