{"id":25176037,"url":"https://github.com/quantgen/bedmatrix","last_synced_at":"2025-05-06T23:18:44.302Z","repository":{"id":32453763,"uuid":"36033133","full_name":"QuantGen/BEDMatrix","owner":"QuantGen","description":"A matrix-like wrapper around PLINK .bed files","archived":false,"fork":false,"pushed_at":"2024-09-06T18:54:11.000Z","size":1928,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-06T23:18:38.692Z","etag":null,"topics":["bed","cran","genetics","genomics","plink","plink2","r","r-pkg"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dak/json","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuantGen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-21T19:29:11.000Z","updated_at":"2024-09-06T18:54:14.000Z","dependencies_parsed_at":"2022-06-26T22:33:23.874Z","dependency_job_id":null,"html_url":"https://github.com/QuantGen/BEDMatrix","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuantGen%2FBEDMatrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuantGen%2FBEDMatrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuantGen%2FBEDMatrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuantGen%2FBEDMatrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuantGen","download_url":"https://codeload.github.com/QuantGen/BEDMatrix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252782897,"owners_count":21803417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bed","cran","genetics","genomics","plink","plink2","r","r-pkg"],"created_at":"2025-02-09T13:15:52.784Z","updated_at":"2025-05-06T23:18:44.285Z","avatar_url":"https://github.com/QuantGen.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"BEDMatrix\n=========\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/BEDMatrix)](https://CRAN.R-project.org/package=BEDMatrix)\n\u003c!-- badges: end --\u003e\n\nBEDMatrix is an R package that provides a matrix-like wrapper around [.bed](https://www.cog-genomics.org/plink2/formats#bed), one of the genotype/phenotype file formats of [PLINK](https://www.cog-genomics.org/plink2), 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.\n\nThis package is deliberately kept simple. For computational methods that use BEDMatrix check out the [BGData package](https://CRAN.R-project.org/package=BGData).\n\n\nExample\n-------\n\nThis 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.\n\nTo 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):\n\n```R\npath \u003c- system.file(\"extdata\", \"example.bed\", package = \"BEDMatrix\")\n```\n\nTo wrap the example .bed file in a BEDMatrix object:\n\n```R\nm \u003c- BEDMatrix(path)\n#\u003e Extracting number of samples and rownames from example.fam...\n#\u003e Extracting number of variants and colnames from example.bim...\n```\n\nTo get the dimensions of the BEDMatrix object:\n\n```R\ndim(m)\n#\u003e [1] 50 1000\n```\n\nTo extract a subset of the BEDMatrix object:\n\n```R\nm[1:3, 1:5]\n#\u003e           snp0_A snp1_C snp2_G snp3_G snp4_G\n#\u003e per0_per0      0      1      1      1      0\n#\u003e per1_per1      1      1      1      1     NA\n#\u003e per2_per2      1      0      0      2      0\n```\n\n\nInstallation\n------------\n\nInstall the stable version from CRAN:\n\n```R\ninstall.packages(\"BEDMatrix\")\n```\n\nAlternatively, install the development version from GitHub:\n\n```R\n# install.packages(\"remotes\")\nremotes::install_github(\"QuantGen/BEDMatrix\")\n```\n\n\nDocumentation\n-------------\n\nFurther documentation can be found on [RDocumentation](https://www.rdocumentation.org/packages/BEDMatrix).\n\n\nContributing\n------------\n\n- Issue Tracker: https://github.com/QuantGen/BEDMatrix/issues\n- Source Code: https://github.com/QuantGen/BEDMatrix\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantgen%2Fbedmatrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantgen%2Fbedmatrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantgen%2Fbedmatrix/lists"}