Skip to contents

BWA is a software package that aligns low-divergence sequences to a large reference genome, such as the human genome

Usage

bwa(subcmd = NULL, ..., bwa = NULL)

Arguments

subcmd

Sub-Command of BWA (e.g., "index", "mem").

...

<dynamic dots> Additional arguments passed to bwa command. Empty arguments are automatically trimmed. If a single argument, such as a file path, contains spaces, it must be quoted, for example using shQuote(). Details see: cmd_help(bwa()).

bwa

A string of path to bwa command.

Value

A command object.

Examples

if (FALSE) { # \dontrun{
# Index reference genome
bwa("index", "-a", "bwtsw", "reference.fa") |>
  cmd_run()

# Paired-end sequence alignment
bwa("mem", "-t", "4", "reference.fa", "read1.fq", "read2.fq") |>
  cmd_run(stdout = "output.sam")

# Single-end alignment (generate sai file)
bwa("aln", "-t", "4", "reference.fa", "read.fq") |>
  cmd_run(stdout = "read.sai")
} # }