Incorrect check for aligner
dpryan79 opened this issue · 1 comments
I aligned data with minimap2 and made a BAM file out of it with samtools, which unfortunately means that samtools
is in the header:
@PG ID:minimap2 PN:minimap2 VN:2.24-r1122 CL:minimap2 -ax asm5 -t 4 combined.fa reads.fastq
@PG ID:samtools PN:samtools PP:minimap2 VN:1.15.1 CL:samtools view -Sbo alignments.bam -
that results in:
thread 'main' panicked at src/main.rs:254:9:
assertion `left == right` failed: Currently, only minimap2 is supported as an aligner. The bam file listed samtools.
left: "samtools"
right: "minimap2"
You might want to check for minimap2, samtools, or pbmm2 (unless it reports minimap2 in the header, I've never checked).
Hi @dpryan79,
Good catch! Right now, I don't know if we are relying on minimap2 specific flags (I think we are). So I think we still want to make sure minimap2 appears in the list of programs, but perhaps we should say that is must appear among the list, rather than be the first one?
In other words, samtools
could be indicative of anything (any alignments later processed with samtools
). So we probably don't want to accept just that, but certainly if it's minimap2
post-processed with samtools
we should accept it.
--Rob
P.S. Actually, @dpryan79 — I can see that precisely this functionality is implemented on the dev
branch ;P. I wonder if you might give this a try and see if it works.