Wrapper for STAR, HISAT2, or minimap2 alignment tools. Checks that the selected aligner is available on the system PATH before running.
Usage
bb_align(
fastq,
genome_index,
output_dir,
aligner = c("STAR", "HISAT2", "minimap2"),
threads = 4L,
paired = FALSE,
extra_args = NULL
)Arguments
- fastq
Character. Path(s) to FASTQ files. For paired-end, provide a character vector of length 2.
- genome_index
Character. Path to genome index directory (STAR) or index prefix (HISAT2, minimap2).
- output_dir
Character. New or empty output directory for BAM files.
- aligner
Character. One of
"STAR","HISAT2","minimap2".- threads
Integer. Number of threads. Default
4.- paired
Logical. Paired-end mode. If
TRUE,fastqmust have 2 elements. DefaultFALSE.- extra_args
Character or NULL. Additional arguments to pass to the aligner, one argument per element (for example
c("-x", "sr")). HISAT2 optional arguments must not contain whitespace or shell metacharacters: its upstream wrapper reparses them through a shell. FASTQ and index paths containing these characters are handled with temporary symbolic links.