Skip to main content

Getting Started with ExonR

ExonR is an R package that provides bindings to Exon.

Installation

ExonR is available in a few ways. The easiest way is to install it from R-universe.

install.packages('exonr', repos = c('https://wheretrue.r-universe.dev', 'https://cloud.r-project.org'))

For both Windows and macOS on x86_64, the pre-built libraries should be a quick install. For other platforms, the package will be built from source. To do that, you'll need to install rust. The main Rust website has a guide for installing rust. Once you have rust installed, you can install ExonR from source with the command above.

Usage

For the available functions see: https://wheretrue.r-universe.dev/exonr/doc/manual.html.

In short the current functions facilitate reading various file formats into Arrow data structures.

For example, to read a FASTA file as an Arrow RecordBatchStreamReader, you can do the following:

library(exonr)

fasta_batch_reader <- exonr::read_fasta_file('path/to/file.fasta')

From there, you can convert the object into a data frame like so:

df <- as.data.frame(fasta_batch_reader)