Parse a BAM (Binary Alignment Map) file into a tidy tibble.
Value
A molpath_parsed object whose data slot is a
tibble with columns qname, flag,
rname, pos, mapq, cigar, seq, and
qual.
Details
Attempts Rsamtools::scanBam() first, then falls back to a system
call to samtools view.
If neither is available an informative error is raised.
Examples
# \donttest{
bam_file <- system.file("extdata", "example.bam", package = "molpathR")
if (nzchar(bam_file)) {
result <- mp_read_bam(bam_file)
print(result)
}
# }