I have got a BAM file from PacBio data and would like to read some of the metadata of reads in R, e.g. ip, pw, rq. See here for pacbio BAM format: http://pacbiofileformats.readthedocs.io/en/3.0/BAM.html
I have read the BAM into R with Rsamtools::scanBam('file.bam') and I have got a BAM file in R now but I don't know how to extract the ip, pw, rq info.
I have no problem extract sequencing info, mapq, flag and usual BAM tag. It's the metadata that I have a problem with, the additional columns in the BAM file.
I hope someone can help.