---
title: "Getting Started"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Getting Started}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = FALSE
)
```

Rminibwa installs a `minibwa` executable built from its vendored upstream
source, plus native R bindings for index-backed mapping.

```{r}
library(Rminibwa)
minibwa_available()
```

Check the packaged executable:

```{r}
minibwa_path()
minibwa_version()
```

Index a reference and map reads:

```{r}
prefix <- minibwa_index("ref.fa", threads = 8)
aln <- minibwa_map(prefix, "reads.fq.gz", format = "paf", threads = 8)
```

Write SAM or PAF output directly to a file by setting `output`:

```{r}
minibwa_map(prefix, c("read1.fq.gz", "read2.fq.gz"), output = "aln.sam")
```

The CLI layer is intentionally thin and stays close to upstream behavior. The
native batch API is the preferred hot path for in-process R workflows.
