ERROR: max count before zero is less than min required count (4) duplicates removed
Running preseq from the latest release preseq-3.1.2.tar.gz
lc_extrap give the following error:
Singularity> preseq lc_extrap -P scaf1.1m.bam
ERROR: max count before zero is less than min required count (4) duplicates removed
However, converting the .bam to .bed first and then running lc_extrap on the .bed file completes as expected:
Singularity> bedtools bamtobed -i scaf1.1m.bam > scaf1.1m.bed
Singularity> preseq lc_extrap -P scaf1.1m.bed > lc_extrap.out
Any idea what's going wrong?
Example .bam and .bed files attached. bams.zip
I have the same issue. I use the preseq from bioconda which was built with --enable-hts .
wget https://depot.galaxyproject.org/singularity/preseq%3A3.1.2--h06ef8b0_1
singularity exec preseq:3.1.2--h06ef8b0_1 preseq lc_extrap -pe -output 187530_T1.ccurve.txt 187530_T1.bam
ERROR: max count before zero is less than min required count (4) duplicates removed
see also #49
(I also tried preseq:3.1.2--hfb6f838_0)
need -B or --bam,then we will encounter this problem: #57
but, -B option is not what was causing the issue.
preseq try to merge the paired-end reads, but there are multiple alignments in the bam. -v option can show that.
use samtools to fileter multiple alignments can fix it.
All the best.