Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oumarkme/geno2r
R package for reading genotype data
https://github.com/oumarkme/geno2r
Last synced: about 2 months ago
JSON representation
R package for reading genotype data
- Host: GitHub
- URL: https://github.com/oumarkme/geno2r
- Owner: oumarkme
- License: other
- Created: 2023-11-10T13:31:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-02T13:25:43.000Z (12 months ago)
- Last Synced: 2024-02-03T14:44:14.025Z (12 months ago)
- Language: R
- Homepage: http://www.oumark.net/geno2r/
- Size: 10.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geno2r
[![R-CMD-check](https://github.com/oumarkme/geno2r/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/oumarkme/geno2r/actions/workflows/R-CMD-check.yaml) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
The goal of geno2r is to easily import genotype data from various formats into R.
[HTSlib](https://github.com/samtools/htslib/) is wrapped and imported by [Rsamtools](https://bioconductor.org/packages/release/bioc/html/Rsamtools.html), to enhance the VCF reading speed. In order to efficiently read a VCF file, it should be compressed with [bgzip](https://www.htslib.org/doc/bgzip.html) and indexed with [tabix](https://www.htslib.org/doc/tabix.html).
## Installation
You can install the most recent version of geno2r from GitHub with:
``` r
#install.packages("remotes")
remotes::install_github("oumarkme/geno2r", force=TRUE)
```## Example
This is a basic example which shows you how to read VCF data to R with [`read_vcf()`](reference/read_vcf.html):
``` r
library(geno2r)
read_vcf(file = "human.vcf.gz", range="22:49379357") # or
read_vcf(file = "human.vcf.gz", range="22:49379357-49379357") # or
read_vcf(file = "human.vcf.gz", range=NULL)
```## Example data
You can find an example VCF file on [Github](https://github.com/oumarkme/geno2r/tree/main/vcf_data_example).