I am new to pacbio sequencing data. I just did some alignment of pacbio HiFI data using pbmm2. I have the bam now, I would like to collect some metrics on the alignment. I used to work on the illumina data, I used picard CollectAlignmentSummaryMetrics, CollectGcBiasMetrics, CollectInsertSizeMetrics to collect a series of alignment metrics. I was wondering if there is similar tools for pacbio data. I searched and did not find an answer.
We are mainly interested in aligned rate, sequence length, coverage, accuracy, and GC content. So I write some scripts for it. These scripts are inside the nextflow, the input is the bam file
samtools flagstat $bam \
| head -8 \
| tr " " "," \
| tr "+" " " \
| awk -F',' '{ print $1, $3}' \
| paste - - - - - - - - \
| awk '{print $1, $3, $5, $7, $9, $11, $2, $4, $6, $8, $10, $12 }' > align_prp
samtools depth $bam \
| awk '{sum+=$3; sumsq+=$3*$3} END { print sum/NR, sqrt(sumsq/NR - (sum/NR)**2)}' > coverage
samtools view $bam \
| awk '{ $35=length($10); sum+=$35; sumsq+=$35*$35} END { print sum/NR, sqrt(sumsq/NR - (sum/NR)**2)}' > length
samtools view $bam \
| cut -f 10 \
| fold -w 1 \
| awk '($1=="G" || $1=="C") {N++;} END {print (N/(1.0*NR)*100);}' > GC_content
But I am still interested to know if there are some package available there.