I'm currently working with a bam file and I need to generate the percent ID of matches that are found in the CIGAR string. I'm having some trouble getting there, here are the libraries that I have.
Here are some of the codes that I'm working with.
###Gal is a gene alignments object where each element describes a genomic alignment
gal <- readGAlignments("Example.bowtie2.bam")
###I have a data table here that gives me the number of matches, insertions and deletions
The percent identity = match-(NM)/length.
I will appreciate the help.