BLASR Frequently Asked Questions

Yuan Li edited this page Apr 29, 2017 · 8 revisions

Frequently Asked Questions

Why I see error message 'ERROR, can not convert non-pacbio reads to pbbam record'?

This error message is usually reported by BLASR v5.1+ when input reads are in FASTA or FASTQ, while output file is SAM or BAM. For BLASR v5.1+ to produce SAM/BAM output given a FASTA or FASTQ input, input read names must conform to PacBio convention, which is


where zmw is an integer representing a zmw hole, and [start, end) is the 0-based coordinate interval representing the span of the query in the read, as above.

For example, given a generic read,


you may change it to


Can blasr produce SAM/BAM output when input is a FASTA file?

It depends.

  • Taking a generic fasta file as input, legacy blasr allows to generate a generic SAM output, which does not conform to current pacbio SAM/BAM specification. Legacy blasr does not generate BAM output directly.

  • Taking a generic fasta file as input, latest blasr CAN NOT generate SAM/BAM output, but it can generate other types of output, including m0, m1, m2, m3, m4 and m5 (i.e., via option '-m 5')

  • Taking a PacBio fasta file as input (where read names in a PacBio fasta file must conform to 'movie/zmw/start_end' format), latest blasr can generate PacBio SAM and BAM output which conforms to PacBio BAM specifications.

For example, given the following FASTA file as input, latest blasr can generate SAM/BAM output.

cat query.fasta

blasr query.fasta lambdaNEB.fa --sam --out aligned.sam

cat aligned.sam |grep -v '^@'
movie/0/0_64    16      lambda_NEB3011  1672    254     9=1I6=1I3=1D17=1I13=1I7=1I4=    * 00     TTGTGACCTTATCACATGCTGACAGCGTACAGCCCGTTTCACCACCTGGGTGGCAGATTGGTCAA        *       RG:Z:4b7697f4      np:i:1  qe:i:64 qs:i:0    zm:i:0  AS:i:-265       NM:i:6

blasr query.fasta lambdaNEB.fa --bam --out aligned.bam
ls aligned.bam

Why samFilter or samtoh5 crashed on SAM file created by BLASR

First of all, samFilter|samtoh5 should have been deprecated now. samFilter|samtoh5 used to be called by pbalign in order to produce alignments in CMP.H5 files with quality values. As PacBio moved from RSII to sequel, from HDF5 to BAM, there is a BAM receipt for processing data, making alignments and calling consensus.

You may read this wiki page for more info regarding changes to BLASR and PacBio SAM file format. Usually, samFilter|samtoh5 segfault is caused by the fact that blasr v5.3 SAM output files have been significantly changed, are not backward-compatible and cannot be used by samFilter.

Please convert your HDF files into BAM and use the latest blasr and pbalign to make alignments in BAM.

If for some reason, you still want to use HDF files, stick with legacy blasr and pbalign which are included by smrtanalysis 2.3.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.