s4hts / HTStream

A high throughput sequence read toolset using a streaming approach facilitated by Linux pipes
https://s4hts.github.io/HTStream/
Apache License 2.0
49 stars 9 forks source link

hts_Primers doesn't seem to read multi-fasta files correctly #239

Closed samhunter closed 3 years ago

samhunter commented 3 years ago

When hts_Primers is run with a fasta file containing more than one entry, the following error is reported (although the values change depending on the fasta file record IDs):

ERROR: Unhandled Exception: basic_string::substr: __pos (which is 9) > this->size() (which is 8)

hts version: $ hts_Primers --version v1.3.2-9-g438994d

To reproduce, download and unpack: test_data.zip

Running with a file containing two primers should cause the Uhandled Exception

hts_Primers -d 0 -l 0 -e 0 -r 2 -x -P ACATTACAGTGGTATCAACGCAGAGTACA \ -Q two_primers.fasta -1 Read1.fastq.gz -2 Read2.fastq.gz -L htslog.json

Running with a file containing one primer should produce normal output:

hts_Primers -d 0 -l 0 -e 0 -r 2 -x -P ACATTACAGTGGTATCAACGCAGAGTACA \ -Q one_primer.fasta -1 Read1.fastq.gz -2 Read2.fastq.gz -L htslog.json