1
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ Is this useful at all? biostars.org/p/9494195 $\endgroup$
    – Ram RS
    Commented Jun 9, 2023 at 20:38
  • $\begingroup$ No, I am not accessible to Revio, Sequel II and IIe systems. $\endgroup$
    – cautree
    Commented Jun 9, 2023 at 20:43
  • $\begingroup$ Have you tried --log-level INFO in pbmm2 align $\endgroup$ Commented Jun 12 at 20:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.