bwa_mem2: Align the reads with bwa-mem2 and directly output bam file

View source: R/functions.R

bwa_mem2R Documentation

Align the reads with bwa-mem2 and directly output bam file

Description

Bwa-mem2 is faster than bwa-mem and produces the same results. This function also assigns Read group ID and sample name to the bam header, which is necessary for downstream GATK4 analysis. Checks for reference index file. If it does not exit, it is automatically created in the reference directory.

Usage

bwa_mem2(metadata, input_dir, output_dir, reference, t = 2)

Arguments

metadata

data frame;

input_dir

character; path to the input directory

output_dir

character; path to output directory

reference

character; path to the fasta genome reference file. Bwa-mem2 created index must be in the same directory.

t

numeric; number of threads to use; default-2


honzee/SNPsom documentation built on July 27, 2022, 12:45 a.m.